I'm trying to solve $$\lfloor \sqrt x \rfloor = \left\lfloor \frac{x}{2} \right\rfloor$$ for real $x$. Obviously this can't be true for any negative reals, since the root isn't defined for such.
My approach is the following: Let $x=:n+r$, $n \in \mathbb{N}_0, 0\leq r < 1$.
For the left hand side $\lfloor \sqrt {n+r} \rfloor = \lfloor \sqrt {\lfloor n+r\rfloor} \rfloor = \lfloor \sqrt n \rfloor$ holds (without further proof).
$$\left\lfloor \frac{x}{2} \right\rfloor = \left\lfloor \frac{n+r}{2} \right\rfloor = \left\{ \begin{array}{l l} \frac{n}{2} & \quad \text{for n even} \\ \frac{n-1}{2} & \quad \text{for n odd} \end{array}\right.$$
Now I don't really know if that'd lead me in the right direction, but I'll write my thoughts down anyways.
Let $\sqrt n =: n'+r'$, $n \in \mathbb{N}_0, 0\leq r < 1$.
Therefore $\lfloor n'+r' \rfloor = n'$. And $n = (n'+r')^2 = n'^2 +2n'r' +r'^2$
For which $n',r'$ holds $$ n' < n'^2 + 2n'r' + r'^2.$$
Well and now I'm stuck and don't know how to proceed.
I'd appreciate any help.
It is completely obvious that $x$ must be a non-negative real number. We decompose it as the following format:
$$x=k^2+n+r$$
in which $k^2$ is the largest integer less than or equal to $x$ in which is a squre of an integer number. So it is completely apparent that
$$n<(k+1)^2-k^2\rightarrow n<2k+1$$ $r$ is a real number such that $0\leq r<1$
We can say that $k\leq\sqrt{x}<k+1$, hence $\lfloor \sqrt{x}\rfloor=k$.
So the problem reduces to $k=\lfloor \frac{k^2+n+r}{2}\rfloor$.
So from the above eqaulity we can deduce
$\lfloor\frac{k^2}{2}\rfloor\leq k$, but for $k\geq 3$, the left hand side of the inequlity grows much faster than the right hand side, hence it is true only for three values for $k$. In other words $k=0,1,2$.
$k=0:$
In this case $n<2k+1=1$, hence we can say that $n=0$, so we have $$k=\lfloor \frac{k^2+n+r}{2}\rfloor\rightarrow 0=\lfloor\frac{r}{2}\rfloor\rightarrow 0\leq r<2$$ which is a true inequlity for all values of $r$(note that at the first we assumed $0\leq r<1$).
So in this case $x$ reduces to $k^2+n+r=0+0+r=r$ for all values of $r$, so $x\in[0,1)$
$k=1:$
In this case we have
$$k=\lfloor \frac{k^2+n+r}{2}\rfloor\rightarrow 1=\lfloor\frac{1+n+r}{2}\rfloor$$ In addition we have $$n<2k+1=3\rightarrow n=0,1,2$$ We can say $$1=\lfloor\frac{1+n+r}{2}\rfloor\rightarrow 1\leq n+r<3$$ in which for $n=0$, this condition is not satisfied, but is satisfied for $n=1,2$. Hence in this case we have:
$$x=k^2+n+r=1+1+r=2+r$$ or $$x=k^2+n+r=1+2+r=3+r$$ So $x\in[2,4)$
$k=2:$
In this case we have $$2=\lfloor\frac{4+n+r}{2}\rfloor\rightarrow 0\leq n+r<2$$ but in this case $n<2k+1=5\rightarrow n=0,1,2,3,4$. But for $n=2,3,4$, the condition of $0\leq n+r<2$ is not satisfied and hence we can say in this case $$x=k^2+n+r=4+n+r=4+0+r\space\space\space\space or\space\space\space x=4+1+r$$ So in this case $x\in[4,6)$
So the solution for the intended equality is the union of these intevals:
$$x\in[0,1)\cup [2,4)\cup [4,6)\rightarrow x\in[0,1)\cup [2,6)$$