
3. Find the number of triples $(x, a, b)$ where $x$ is a real number and $a, b$ belong to the set $\{1,2,3,4,5,6,7,8,9\}$ such that

$$
x^{2}-a\{x\}+b=0
$$

where $\{x\}$ denotes the fractional part of the real number $x$. (For example $\{1.1\}=0.1=$ $\{-0.9\}$.


Solution: Let us write $x=n+f$ where $n=[x]$ and $f=\{x\}$. Then

$$
f^{2}+(2 n-a) f+n^{2}+b=0
$$

Observe that the product of the roots of (1) is $n^{2}+b \geq 1$. If this equation has to have a solution $0 \leq fa$. Hence $n \leq 1$. If $n \leq-4$, then again $(n+1)^{2}+b \geq 10>a$. Thus we have the range for $n:-3,-2,-1,0,1$. If $n=-3$ or $n=1$, we have $(n+1)^{2}=4$. Thus we must have $4+b1$. For $a=9$, we get 7 values of $b$; for $a=8$ we get 6 values of $b$ and so on. Thus we get $2(7+6+5+4+3+2+1)=56$ values for the triple $(x, a, b)$.

Suppose $n=-1$ so that $(n+1)^{2}=0$. In this case we require $b<a$. We get $8+7+6+5+$ $4+3+2+1=36$ values for the triple $(x, a, b)$.

Thus the total number of triples $(x, a, b)$ is $20+56+36=112$.
