I want to prove that:
$$\lfloor\sqrt{x}\rfloor=\lfloor\sqrt{\lfloor x\rfloor}\rfloor$$
It's true that (by definition of floor operation):
$$\lfloor\sqrt{x}\rfloor\leq\sqrt{x}<\lfloor\sqrt{x}\rfloor+1$$
$$\lfloor\sqrt{\lfloor x\rfloor}\rfloor\leq\sqrt{\lfloor x\rfloor}<\lfloor\sqrt{\lfloor x\rfloor}\rfloor+1$$
But I don't know what comes next. Tried multiple conversions of those inequalities, but I did not see anything. Can you help?
Best Answer
Using the implicit condition $x\ge 0$, we have for $n\in\mathbb N_0$ $$\lfloor\sqrt x\rfloor <n\iff \sqrt x<n\iff x<n^2$$ and $$\left\lfloor \sqrt{\lfloor x\rfloor}\right\rfloor <n\iff \sqrt{\lfloor x\rfloor}<n\iff\lfloor x\rfloor <n^2\iff x<n^2.$$ Since both $\lfloor\sqrt x\rfloor$ and $\left\lfloor \sqrt{\lfloor x\rfloor}\right\rfloor$ are in $\mathbb N_0$, this suffices to show equality.