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$
Clearly $f=0$ is an obvious solution
Otherwise $0<f<1$
$$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