Values of $x$ satisfying $\lfloor{x^2\rfloor}=\left(\lfloor{x\rfloor}\right)^2$

Prove that values of $$x$$ satisfying $$\lfloor{x^2\rfloor}=\left(\lfloor{x\rfloor}\right)^2$$ is $$(0,\sqrt{2})\cup \mathbb{Z}$$

My try:

Its trivial that every integer satisfies the given equation.

Now if $$x$$ is not an integer we have $$x=m+f$$ where $$m \in \mathbb{Z}$$ and $$0 \lt f \lt 1$$

We have $$\lfloor{x\rfloor}=m$$

We have $$\lfloor{(m+f)^2\rfloor}=m^2$$

$$\implies$$

$$\lfloor{f^2+2mf\rfloor}=0$$ $$\implies$$

$$0 \le f^2+2mf \lt 1 \tag{1}$$

As per the comments, i understood my mistake.

Clearly $$m$$ cannot be negative integer since:

$$f^2+2mf \lt 0$$ which contradicts$$(1)$$

So $$m$$ is a non negative integer and for all such $$m$$, we have $$f^2+2mf \ge 0$$

Also from $$(1)$$ we have $$f^2+2mf \lt 1$$ $$\implies$$

$$f \in (0, \sqrt{m^2+1}-m)$$

Hence the final solution set is:

$$x \in [m, \sqrt{m^2+1})$$ $$\forall$$ non negative integers $$m$$

• Is that really true? What about x=3.1? Or am I overlooking something? – Martin R Mar 21 at 18:09
• Clearly $m=3,f=.1$ satisfy the last condition. Another easy scenario is $f=0$ – lab bhattacharjee Mar 21 at 18:12
• For $x=3.1$ you have $\lfloor{x^2\rfloor}=\lfloor{9.61\rfloor}= 9 = \left(\lfloor{x\rfloor}\right)^2$ – Martin R Mar 21 at 18:15

Clearly $$f=0$$ is an obvious solution

Otherwise $$0

$$f^2+2mf<1\implies f<\sqrt{1+m^2}-|m|$$

$$f(f+2m)\ge0\iff f+2m\ge0\iff2m\ge-f\ge -1\iff m\ge0$$ as $$m$$ is an integer

$$\newcommand{\fl}[1]{\left \lfloor #1\right \rfloor}$$

To see this, note that the function $$g(x) = \fl{x^2} - [\fl{x}]^2$$ takes only integer values, but is also zero at every integer.
However, also note that the function $$\fl{\cdot}$$ is right continuous, because for any point $$l$$, we can find a right neighbourhood of $$l$$ having the same floor as $$l$$, by keeping the neighbourhood small enough so that we don't include the integer after $$l$$. Then within this neighbourhood, the floor function will be constant, thus satisfying right continuity at $$l$$.
With compositions and so on preserving right continuity, one sees that $$g$$ is right continuous.
Now, by right continuity at each integer, with say $$\epsilon = \frac 12$$, you can find a right neighbourhood of each integer such that the value of $$g(x)$$ is within half of zero. However, $$g(x)$$ takes only integer values so this forces $$g(x) = 0$$ in that interval!