Solving $x^2-\lfloor x\rfloor -4=0$

148 Views Asked by At

$$x^2-\lfloor x\rfloor -4=0$$

I plotted a graph for this, and it is pretty easy to find the solution graphically. However, how do I do it numerically?

enter image description here

graphically the solutions are 2.449 and -1.414

6

There are 6 best solutions below

0
On BEST ANSWER

Following through on the edited equation :
$\displaystyle x^2 - \lfloor x\rfloor - 4 = 0$,
the real challenge is to attack this problem analytically, without Calculus,
given that the query includes the algebra-precalculus tag.
This means that such Calculus methods as taking the derivative are barred.

This also means, (since an analytical method is being sought), that it is better to avoid graphical analysis, if possible.

Since $\displaystyle x^2 - 4 = \lfloor x\rfloor$, which is an integer, you need to find $x$ such that $x^2$ is an integer.

Let $n \in \Bbb{Z}, n \geq 0$ be taken so that $n = x^2.$

You now have to consider two distinct cases:


$\underline{\text{Case 1:} ~n - 4 \geq 0}.$
Since $\lfloor x\rfloor = (n-4) \geq 0$, and $x^2 = n$, you know that
$\displaystyle \lfloor x\rfloor = \left\lfloor ~\left| ~\sqrt{n} ~\right| ~\right\rfloor \geq 0.$

Therefore, $\displaystyle (n-4) = \left\lfloor ~\left|\sqrt{n}\right| ~\right\rfloor.$
Therefore, $\displaystyle (n-4) \leq \left| ~\sqrt{n} ~\right| < (n-3).$

Therefore,
$\displaystyle (n^2 - 8n + 16) \leq n < (n^2 - 6n + 9) \implies $
$\displaystyle (n^2 - 9n + 16) \leq 0 < (n^2 - 7n + 9) \implies $

$\displaystyle \left(n - \frac{9}{2}\right)^2 - \frac{17}{4} \leq 0 < \left(n - \frac{7}{2}\right)^2 - \frac{13}{4}.$

With $(n-4)$ assumed $\geq 0$
note that $[7 - (9/2)]^2 - (17/4) > 0$ and $[5 - (7/2)]^2 - (13/4) < 0$.

Therefore, if there is any solution, when $(n-4) \geq 0$ it will require that
$7 > n > 5.$

Manually checking $x^2 = n = 6$, with $\lfloor x\rfloor = (n-4) = 2$, you see that $2 \leq \sqrt{6} < 3.$

Therefore, $n = x^2 = 6 \implies x = |\sqrt{6}|$ is in fact a solution.


$\underline{\text{Case 2:} ~n - 4 < 0}.$
Since $\lfloor x\rfloor = (n-4) < 0$, and $x^2 = n$, you know that
$\displaystyle \lfloor x\rfloor = \left\lfloor ~- \left| ~\sqrt{n} ~\right| ~\right\rfloor < 0.$

Therefore, $\displaystyle (n-4) = \left\lfloor ~- \left|\sqrt{n}\right| ~\right\rfloor.$
Therefore, $\displaystyle (n-4) \leq - \left| ~\sqrt{n} ~\right| < (n-3) \leq 0 $ [because $(n-4) < 0$].

Therefore,
$\displaystyle (n^2 - 8n + 16) \geq n > (n^2 - 6n + 9) \implies $
$\displaystyle (n^2 - 9n + 16) \geq 0 > (n^2 - 7n + 9) \implies $

$\displaystyle \left(n - \frac{9}{2}\right)^2 - \frac{17}{4} \geq 0 > \left(n - \frac{7}{2}\right)^2 - \frac{13}{4}.$

With $(n-4)$ assumed $< 0$
note that $[3 - (9/2)]^2 - (17/4) < 0$ and $[1 - (7/2)]^2 - (13/4) > 0$.

Therefore, if there is any solution, when $(n-4) < 0$ it will require that
$3 > n > 1.$

Manually checking $x^2 = n = 2$, with $\lfloor x\rfloor = (n-4) = -2$, you see that $-2 \leq - \sqrt{2} < -1.$

Therefore, $n = x^2 = 2 \implies x = -| \sqrt{2}|$ is in fact a solution.

3
On

You have shown the graph of the quadratic equation in your question. However, you have the cubic equation.

$$x^3=\lfloor x \rfloor+4$$

Let , $x>0$ then

$$\lfloor x \rfloor ≤x<\lfloor x \rfloor+1$$

$$(\lfloor x \rfloor)^3-4 ≤x^3-4<(\lfloor x \rfloor+1)^3-4$$

$$(\lfloor x \rfloor)^3-4 ≤\lfloor x \rfloor<(\lfloor x \rfloor+1)^3-4$$

Let, $\lfloor x \rfloor=m>0,$

$$\begin{cases}(m+1)^3-m-4>0 \\m^3-m-4≤0 \end{cases} $$

$$\implies \begin{cases} m^3+3m^2+2m-3 >0 \\ m^3-m-4≤0\end{cases}$$

$$\implies m=1$$

$$x^3=5 \implies x=\sqrt[3]5.$$


I leave the rest of the x <0 case to you.

2
On

If $|x|\geq 3$, then $x^2 > x+4 \geq \lfloor x \rfloor +4$, and no solution is possible. Therefore the only solutions have $\lfloor x \rfloor = -3, -2, -1, 0, 1,$ and $2$. Let's see if $\lfloor x \rfloor = -3$ works:

$$x^2-(-3)-4 = 0$$

$$x = \pm 1$$

But neither $\lfloor 1 \rfloor$ nor $\lfloor -1 \rfloor$ equals $-3$ so we have no solution here.

Now try $\lfloor x \rfloor =-2$

$$x^2-(-2)-4 = 0$$

$$x = \pm \sqrt{2}$$

We see that $\lfloor \sqrt{2} \rfloor \neq -2$ so that's not a solution, but $\lfloor -\sqrt{2} \rfloor = -2$ so we have a solution.

Check the other 4 cases similarly and find that $x=\sqrt{6}$ is the other solution.

0
On

Let $f(x) = x^2 - x - 4$, $g(x) = x^2-\lfloor x\rfloor -4$. Then as $\lfloor x \rfloor ≤ x$ for all real $x$, multiplying both sides by $-1$ gives $g(x) = x^2 - (\lfloor x\rfloor + 4) ≥ x^2 - (x + 4) ≥ f(x)$, $x \in \mathbb R$, with $g(x) = f(x)$ when $x$ is an integer.

$f(x) = 0 \implies x = \frac{1 ± \sqrt{17}}{2} \approx -1.56, 2.56$ using the quadratic formula. Let us deal with the two roots separately.

From the above, $f(x)$ crosses the $x$-axis between $x = -2$ and $x = -1$. Since $f(-2) = g(-2) = 2$ (importantly, $2$ is positive) and $g(x) ≥ f(x)$, $g(x)$ also crosses the $x$-axis between $-2$ and $-1$, so $\lfloor x \rfloor = -2$, hence $g(x) = 0 \implies x^2 - (-2) - 4 = 0, x = -\sqrt{2}$.

Similarly, we know $f(x)$ crosses the $x$-axis between $2$ and $3$. Thus $\lfloor x \rfloor = 2$, and $g(x) = 0 \implies x^2 - 2 - 4 = 0, x = \sqrt{6}$.

0
On

$$x^2-\lfloor x\rfloor -4=0$$

Let $x = n + \alpha$ where $n \in \Bbb Z$ and $\alpha \in [0,1)$.

\begin{align} x^2 - \lfloor x \rfloor - 4 &= 0 \\ (n + \alpha)^2 - n - 4 &= 0 \\ (n + \alpha)^2 &= n + 4 \\ n + \alpha &= \pm \sqrt{n + 4} \\ \end{align}

Note $n \ne 0$.

If $n > 0$, then \begin{align} x = n + \alpha = \sqrt{n + 4} &\implies n \le x < n+1 \\ &\implies n^2 \le n+4 < (n+1)^2 \end{align} Since $2^2 \le 2+4 < (2+1)^2$, then $n = 2$ and $\color{magenta}{x = \sqrt 6}$.

If $n < 0$, then \begin{align} x = n + \alpha = -\sqrt{n + 4} &\implies n \le x < n+1 \le 0 \\ &\implies n^2 \ge n+4 > (n+1)^2 \end{align} Since $(-2)^2 \ge -2+4 > (-2+1)^2$, then $n = -2$ and $\color{magenta}{x = -\sqrt 2}$.

CHECK

$\sqrt{6}^2-\lfloor \sqrt{6} \rfloor - 4 = 6 - 2 - 4 \overset{\checkmark}{=} 0$

$(-\sqrt{2})^2-\lfloor (-\sqrt{2}) \rfloor - 4 = 2 + 2 - 4 \overset{\checkmark}{=} 0$

0
On

Claim: Either $2\le x < 3$ or $-2 \le x < -1$.

Proof: If $x \ge 3$ then $x^2 \ge 3x = x + 2x \ge x + 6 > [x]+4$ so $x^2-[x]-4 > 0$.

If $-1 \le x < 2$ then $x^2 < 4; [x] \ge -1$ and so $x^2 < 3 \le [x]+4$ so $x^2-[x]-4 < 0$.

If $x< -2$ then $x^2 > 4; [x]\le -3$ and so $x^2 > 4 > [x]+4$ and $x^2 -[x]-4 > 0$.

...

So $[x] = \pm 2$.

Let $r = x - [x]$ so $0 \le r < 1$.

So we have $x^2 -[x] -4 = (r\pm 2)^2 - (\pm 2) - 4 = 0$.

Now we can just use the quadratic formula.

If $[x] =2$ then $(r +2)^2 - 2-4 =0$ so $r^2 +4r -2 =0$ and $r = \frac {-4 + \sqrt{16+8}}4=-2 \pm \sqrt {6}$. But as we need $0 \le r < 1$ we must have $r = -2+\sqrt 6$ and $x = 2 +r = \sqrt 6$ (and as it happens $2< \sqrt 6 < 3$).

If $[x]=-2$ then $(r-2)^2 + 2-4=0$ so $r^2 -4r + 2=0$ and $r = \frac {4\pm \sqrt {16-8}}2 = 2\pm\sqrt 2$ but as $0 \le r < 1$ we must have $r =2-\sqrt 2$ and $x = -2 +r = -\sqrt 2$ (and as it happens $1< \sqrt 2 < 2$ so $-2\le \sqrt 2 < 1$.)

So $x = \{\sqrt 6, -\sqrt 2\}$.