# Necessary and sufficient condition that $\lceil \sqrt { \lfloor x \rfloor } \rceil = \lceil \sqrt { x } \rceil$

I am stumped at the following paragraph, which comes from Concrete Mathematics, Chapter 3, Section 2, Page 73:

What is a necessary and sufficient condition that $\lceil \sqrt { \lfloor x \rfloor } \rceil = \lceil \sqrt { x } \rceil$? We have observed that equality holds when $x = 3.142$ but not when $x = 1.618$; further experimentation shows that it fails also when $x$ is between $9$ and $10$. Oho. Yes. We see that bad cases occur whenever $m^2 \lt x \lt m^2 + 1$, since this gives $m$ on the left and $m + 1$ on the right. In all other cases where $\sqrt { x }$ is defined, namely when $x = 0$ or $m^2 + 1 \le x \le (m + 1)^2$, we get equality. The following statement is therefore necessary and sufficient for equality: Either $x$ is an integer or $\sqrt { \lfloor x \rfloor }$ isn't.

Starting from the bold sentence, I cannot follow it. The book says that when $m^2 \lt x \lt m^2 + 1$, the equation does not hold. But how did the authors come to this conclusion, by reasoning rather than just by observing some particular cases? And how can I derive the final conclusion (The necessary and sufficient condition is that either $x$ is an integer or $\sqrt { \lfloor x \rfloor }$ isn't.) from it?

• Yes, the words "experimentation shows" means they're initially stating it's an observation with no proof yet. Jul 8, 2016 at 8:00

The book says that when $m^2 \lt x \lt m^2 + 1$, the equation does not hold. But how did the authors come to this conclusion, by reasoning rather than just by observing some particular cases?

For $m^2 \lt x \lt m^2 + 1$ where $m$ is a non-negative integer, since $m\lt \sqrt x\lt\sqrt{m^2+1}\le m+1$ we get $$\left\lceil\sqrt{\lfloor x\rfloor}\right\rceil=m\lt m+1=\lceil\sqrt x\rceil$$ so the equality does not hold.

And how can I derive the final conclusion (The necessary and sufficient condition is that either $x$ is an integer or $\sqrt { \lfloor x \rfloor }$ isn't.) from it?

We may suppose that $m^2\le x\lt (m+1)^2$ separating it into three cases :

Case 1 : $x$ is an integer. We easily see that the equality holds.

Case 2 : $m^2\lt x\lt m^2+1$. We've already seen that the equality does not hold.

Case 3 : $m^2+1\le x\lt (m+1)^2$ but $x$ is not an integer

There is no integer $n$ such that $m^2+1\le n^2\lt (m+1)^2$, so in this case, $\sqrt{\lfloor x\rfloor}$ is not an integer.

So, we get $$m\lt \sqrt{m^2+1}\le \sqrt{\lfloor x\rfloor }\le \sqrt{(m+1)^2-1}\lt m+1\implies \left\lceil\sqrt{\lfloor x\rfloor }\right\rceil=m+1=\lceil\sqrt{x}\rceil$$ So, in this case, the equality holds.

Therefore, the necessary and sufficient condition is that either $x$ is an integer or $\sqrt{\lfloor x\rfloor}$ isn't.

• This answer is pretty awesome, and it is precisely what I need. Thank you very much! Jul 8, 2016 at 11:47
• @DecongLiu: You are welcome. Jul 8, 2016 at 11:57