Prove or disprove that $\forall x \in\mathbb{R}, \lfloor x^2 \rfloor = \lfloor x \rfloor^2$

194 Views Asked by At

Statement: Prove or disprove that $\forall x \in\mathbb{R}, \lfloor x^2 \rfloor = \lfloor x \rfloor^2$.

What I've tried: Let $x$ be a particular but arbitrary chosen real number. By definition of floor, $$\exists m \in\mathbb{Z}: \lfloor x^2 \rfloor = m \le x^2 \lt m + 1$$ Let's take a square root of each part of the inequation. $$\sqrt{m} \le \lvert x \rvert \lt \sqrt{m+1}$$ The inequation above defines flooring for $x$ relatively to $x^2$: $$\lfloor x \rfloor = \sqrt{m}$$

We need to prove that $\lfloor x^2 \rfloor = \lfloor x \rfloor^2$, but as was shown above, $\lfloor x^2 \rfloor = m$ and $\lfloor x \rfloor = \sqrt{m}$. Because $m = (\sqrt{m})^2$ this statement is true.

Q.E.D.

2

There are 2 best solutions below

0
On

$$\exists x= \left({\frac{7}{5}}\right) \in \mathbb{R} \colon \lfloor \left({\frac{7}{5}}\right)^2\rfloor \not = \lfloor \left({\frac{7}{5}}\right)\rfloor^2$$

0
On

The mistake in the proof, as pointed out already in comments, is the implicit assumption that $\sqrt m$ is an integer, which you must believe in order to write $\lfloor x\rfloor = \sqrt m$.

This is also a clue to how to find counterexamples.

It is true (using the definition of the floor function) that $$ \forall x\in\mathbb R:\exists m\in\mathbb Z: \lfloor x^2 \rfloor = m \leq x^2 < m + 1. $$ From this we can derive the true statement that $$ \forall x\in\mathbb R:\exists m\in\mathbb Z: \sqrt m \leq \lvert x \rvert < \sqrt{m+1}. $$

However, this is not a description of taking the floor of $\lvert x \rvert$, because in the definition of the floor function we require the two bounds to be consecutive integers. We do not generally find that $\sqrt m$ is an integer when $m$ is an integer, and we certainly do not generally find that $\sqrt m$ and $\sqrt{m+1}$ are consecutive integers; the only case in which they are consecutive integers is when $m = 0$.

In the case where $x$ is non-negative (so that $\lvert x\rvert = x$) and $m$ is a perfect square, it turns out to be true that $\lfloor x^2 \rfloor = \lfloor x \rfloor^2$, because then $\sqrt m$ is an integer and $$ \sqrt m \leq \lvert x \rvert = x < \sqrt{m+1} \leq \sqrt m + 1 $$ shows that $\lfloor x \rfloor = \sqrt m$.

In the case where $x$ is non-negative and $m$ is not a perfect square, however, $m$ is positive but there is no integer between $\sqrt m$ and $\sqrt{m+1}$, so $$ \lfloor \sqrt m\rfloor < \sqrt m \leq x < \sqrt{m+1} \leq \lfloor \sqrt m\rfloor + 1. $$

By the definition of the floor function, this says $\lfloor x\rfloor = \lfloor \sqrt m\rfloor$, and therfore

$$ \lfloor x\rfloor^2 < (\sqrt m)^2 = m = \lfloor x^2\rfloor. $$

So it is really easy to find counterexamples to the statement. Just take any positive integer $k$ and choose a number $x$ such that $\sqrt{k^2 + 1} \leq x < k+1$. Then $ \lfloor x\rfloor^2 < \lfloor x^2\rfloor $. If you take $k=1$, you find that any $x$ such that $\sqrt 2 \leq x < 2$ is a counterexample.

And what about negative non-integer values of $x$? Then $x = \lfloor x\rfloor + \delta$, where $0 < \delta < 1$, so

$$ \lfloor x\rfloor^2 = (x - \delta)^2 = x^2 + (\delta^2 - 2x \delta). $$

But since $x$ is negative, $\delta^2 - 2x \delta$ is positive, and therefore

$$ \lfloor x^2\rfloor \leq x^2 < \lfloor x\rfloor^2. $$

So an even easier counter example is any negative number that is not an integer.


As a general strategy for problems like this, when you don't know if the statement is true, it pays to look for counterexamples first, or at least concurrently with looking for a proof. This statement is obviously true for integers, so try some non-integers.

If it turns out the statement is true after all, the failures of your attempted counterexamples may give some clues toward the proof.