How many solutions does the equation

$$
\{x\}^{2}=\left\{x^{2}\right\}
$$

have in the interval $[1 ; 100]$? $(\{u\}-a$ is the fractional part of $u$ - the difference between $u$ and the greatest integer not greater than $u$.)
I. solution. Let's complete a part of the graph of the functions $f(x)=\{x\}^{2}$ and $g(x)=\left\{x^{2}\right\}$. The function $f$ is periodic, with the smallest period being 1, and the branches of the curve are translations of the arc of the normal parabola (Figure 1).

$1986-05-205-1 . \mathrm{eps}$

Figure 1

The graph of $g$ can be obtained by slicing the graph of the function $x \rightarrow x^{2}$ horizontally, unit by unit, and then translating the half-open curve segments parallel to the $y$-axis so that their starting points fall on the $x$-axis (Figure 2).

$1986-05-205-2 . \mathrm{eps}$

Figure 2

Now consider the graphs of the two functions over one period of $f$, on the interval $[k, k+1)$, where $k \geqq 1$ is an integer. Here, the graph of $g$ has as many branches as there are integers in the range of $x \rightarrow x^{2}$ when $x$ varies over the interval $[k, k+1)$. Since this function is strictly increasing, the number of branches is $(k+1)^{2}-k^{2}$ (Figure 3).

$1986-05-206-1 . \mathrm{eps}$

Figure 3

It is clear that, except for the last one, each of these branches intersects the graph of $f$ exactly once. (The first branch has its starting point on the $x$-axis, which is common with the graph of $f$.) This means that the equation (1) has $(k+1)^{2}-k^{2}-1$ solutions in the interval $[k, k+1)$.

Accordingly, the number of roots in the interval $[k, k+1)$ is

$\sum_{k=1}^{99}\left((k+1)^{2}-k^{2}-1\right)$.

In the sum, the square numbers appear with alternating signs, except for the first and the last, so the above sum is $100^{2}-1^{2}-99=9900$. Since in addition to these, $x=100$ is also a solution, the equation has 9901 solutions in the interval [1, 100].

Remark. In the above solution, we wrote: "it is clear that" the branches of the graph of $g$ intersect the graph of $f$ at one point. Indeed, we made concessions for the sake of clarity, but the graphs were derived from the image of the function $x \rightarrow x^{2}$, whose properties are well known. What might be missing from the solution is a precise statement of which properties of the quadratic function we are actually referring to.

## $1986-05-206-2 . \mathrm{eps}$

Figure 4

The existence of at least one common point for each branch is indeed obvious, and the fact that there is no more than one follows from the fact that both curve segments can be extended to parabolas, which are translations of the graph of $x \rightarrow x^{2}$; one parallel to the $x$-axis, the other parallel to the $y$-axis (Figure 4). If two congruent parabolas have more than one common point, then the two curves are identical.

For those who still find this "obvious" statement about the existence of a common point questionable - they are right - we will write down the equation that the $x$-coordinate of the intersection point of the extended parabolas must satisfy.

The $k$-th arc of the graph of $f$ is given by $y=(x-k)^{2}$, and the $i$-th arc of the graph of $g$ in the interval $[k, k+1)$ can be extended to the parabola $y=x^{2}-\left(k^{2}+i\right)$. Thus, for the $x$-coordinate of the intersection point of the curves, we have $(x-k)^{2}=x^{2}-\left(k^{2}+i\right)$, or $x=k+\frac{i}{2 k}$, where $i=0,1, \ldots, 2 k$.

These roots, except for the last one, indeed fall within the interval $[k, k+1)$, so the original equation has exactly $2 k$, or $\left((k+1)^{2}-k^{2}-1\right)$ solutions in the interval $[k, k+1)$. This gives us the solutions of (1), although this was not our task.

II. solution. Let $k \geqq 1$ be an integer, and consider the solutions of (1) in the interval $[k, k+1)$. If $k \leqq x < k+1$, let $x=k+\alpha$; then clearly $\alpha=\{x\}$. Substituting into (1), we get

$$
\alpha^{2}=\left\{(k+\alpha)^{2}\right\}=\left\{k^{2}+2 k \alpha+\alpha^{2}\right\}
$$

Here, since $0 \leqq \alpha^{2}<1$, we have $\alpha^{2}=\left\{\alpha^{2}\right\}$. Now, the fractional part of two numbers is equal if and only if the difference of the two numbers is an integer. Thus, we get that $\left(k^{2}+2 k \alpha+\alpha^{2}\right)-\alpha^{2}=k^{2}+2 k \alpha$ is an integer, and since $k$ is an integer, $2 k \alpha$ is also an integer. Therefore, if $k \geqq 1$, then $k+\alpha$ is a solution of (1) for exactly those $0 \leqq \alpha<1$ for which $2 k \alpha$ is an integer. Since there are exactly $2 k$ such integers, $0,1,2, \ldots, 2 k-1$, the equation has exactly $2 k$ solutions in the interval $[k, k+1)$.

Thus, (1) has a total of $1+\sum_{k=1}^{99} 2 k=9901$ roots in the interval [1, 100] (since $x=100$ is also a solution).

Remark. The equation (1) clearly has $N^{2}-N+1$ roots in the interval $[1 ; N]$, if $N$ is an integer. If, instead of (1), we are looking for the number of solutions of the equation $\{x\}^{n}=\left\{x^{n}\right\}$, then using the reasoning of the first solution, we get that the number of roots in the interval $[1 ; N]$ is

$$
1+\sum_{k=1}^{N-1}\left((k+1)^{n}-k^{n}-1\right)=N^{n}-N+1
$$