10

Solve the equation

$$ \lfloor x^2\rfloor-3\lfloor x \rfloor +2=0 $$

where $\lfloor x\rfloor $ denotes floor function.

My Attempt:

Let $x = n+f$, where $n= \lfloor x \rfloor \in \mathbb{Z} $, $f=x-\lfloor x \rfloor = \{x\} $, and $0\leq f<1$. Then using $\lfloor n+f \rfloor = n$ gives us

$$ \begin{align} \lfloor (n+f)^2 \rfloor -3 \lfloor n+f \rfloor +2 &= 0\\ n^2+\lfloor f^2+2nf \rfloor -3n+2 &= 0 \end{align} $$

How can I solve the equation from here?

user64742
  • 2,226
juantheron
  • 56,531
  • This is much more interesting than anything normally encountered in precalculus. Can anyone think of some more tags? – Stefan Smith Dec 03 '13 at 04:05

4 Answers4

6

The way I would approach it is to first observe that the zeroes of $y^2-3 y+2$ are at $y=1$ and $y=2$. Because these zeroes are integers, then $x=1$ and $x=2$ are part of the solution set.

To get the rest of the solution set, we must find all other $x$ near these zeroes that do not change the values of either $\lfloor x \rfloor$ or $\lfloor x^2 \rfloor$. Near $x=1$, this is when $x \in \left (1,\sqrt{2}\right)$; near $x=2$, we have $x \in \left (2,\sqrt{5} \right )$.

Ron Gordon
  • 142,110
  • Is it clear that a solution can't be near another integer, which doesn't solve the equation by itself, but the extra in $\lfloor x^2 \rfloor$ works out? – ronno Dec 03 '13 at 03:19
  • @ronno: clear to me. Imagine if you found a non-integer that satisfies the equation. Then the integer part of that real must satisfy the equation. But the only integers that satisfy are $x=1$ and $x=2$, so the solution cannot be near any other integer. – Ron Gordon Dec 03 '13 at 03:21
  • Why must the integer part of the real satisfy the equation? – ronno Dec 03 '13 at 03:22
  • @ronno: must I explain to you how the floor function works? Seems you understand it quite well from your solution. – Ron Gordon Dec 03 '13 at 03:25
  • 1
    Suppose the equation was $\lfloor x^2 \rfloor-4\lfloor x \rfloor + 2$ (I just changed the $3$ to $4$). Then $x=1.5$ is a solution, but $x=1$ is not. – ronno Dec 03 '13 at 03:35
  • 1
    @ronno: OK, note that near $x=1.5$, $\lfloor x^2 \rfloor = 2$ and $\lfloor x \rfloor = 1$, so this satisfies the equation. Thus we want all $x$ near $1.5$ such that $\lfloor x^2 \rfloor = 2$ and $\lfloor x \rfloor = 1$; this would be the interval $x \in \left (\sqrt{2},\sqrt{3}\right )$. This is what I meant - the interval we want is the interval that stays the same integer for both $x^2$ and $x$. My explanation in the comments was relevant to that equation, so I see where you are coming from now; my explanation in my post, however, holds up fine. – Ron Gordon Dec 03 '13 at 03:45
5

First note that $\lfloor x^2 \rfloor \ge \lfloor x \rfloor ^2$. Now, if we let $y = \lfloor x \rfloor$, then $y^2 -3y+2 \le 0$ and $y $ is an integer, so $y=1$, or $2$.

Then, let $x = y+f$, with $f \in (0,1)$. If $y=1$, then $$\lfloor2f+f^2\rfloor = 0 \iff 2f+f^2 <1 \iff f < \sqrt{2}-1$$

If $y=2$, then $$\lfloor4f+f^2\rfloor = 0 \iff 4f+f^2 <1 \iff f < \sqrt{5}-2$$

So the solutions for $x$ comprise exactly the set $[1,\sqrt2) \cup [2,\sqrt 5)$.

ronno
  • 13,054
1

Note that if $x\lt0$, then $\lfloor x^2\rfloor-3\lfloor x\rfloor+2\ge5$, so any solution $x=n+f$ with $0\le f\lt1$ must have $n\ge0$. Picking up at the OP's equation $n^2+\lfloor f^2+2nf\rfloor-3n+2=0$ and letting $r$ denote the non-negative integer $\lfloor f^2+2nf\rfloor$, we find

$$(2n-3)^2=1-4r$$

Thus $r$ must be $0$, which implies $(2n-3)^2=1$, so that $n=1$ or $2$.

If $n=1$, then $r=0$ means $f^2+2f\lt1$, or $(f+1)^2\lt2$, and thus $0\le f\lt\sqrt2-1$, so that $1\le x\lt\sqrt2$.

If $n=2$, then $r=0$ means $f^2+4f\lt1$, or $(f+2)^2\lt5$, and thus $0\le f\lt\sqrt5-2$, so that $2\le x\lt\sqrt5$.

Barry Cipra
  • 81,681
1

If $x$ is positive, then it must be at most $4,$ so $\lfloor x \rfloor$ is at most $3.$ If $\lfloor x \rfloor = 0,$ then your equation is $x^2 - 3 x +2 = 0,$ so $(x-1)(x-2) = 0,$ so no solutions. If $\lfloor x \rfloor = 1,$ then if $y$ is the fractional part of $x,$ we have: $\lfloor (y+1)^2 \rfloor - 1 = 0,$ so $\lfloor (y+1)^2 \rfloor = 1$, so any $y < \sqrt{2} - 1$ works. If $\lfloor x \rfloor = 2,$ then $\lfloor (y+2)^2\rfloor = 4,$ so any $y < \sqrt{5} - 1$ works. You get the picture.

apnorton
  • 17,949
Igor Rivin
  • 26,467