Find the roots of the equation $x^2-[x]=4$ where $[x]$ is the greatest integer less than or equal to $x$. Show that there is no rational number $x$ satisfying the equation $x^2-[x]=4$. Find the roots of the equation $x^2-[x]=4$ where $[x]$ is the greatest integer less than or equal to $x$.
I tried to solve this equation but stuck.
For the first part i supposed $x=\frac{p}{q}$ be the solution of the equation.
$$\frac{p^2}{q^2}-4=\left[\frac{p}{q}\right]$$
Now LHS is rational and RHS is an integer. Therefore our assumption is wrong. There is contradiction. So its roots are not rational.
$x^2-4=[x]\implies (x-2)(x+2)=[x]$
How should i move ahead? Please guide me. Its roots are $-\sqrt2,\sqrt6$.
Is my method of solving the first part correct?

Using $\displaystyle \bullet \lfloor x \rfloor \leq x$
So here Given $x^2-4 = \lfloor x \rfloor $
So we get $x^2-4\leq x\Rightarrow x^2-x-4\leq 0$
So we get $\displaystyle \frac{1-\sqrt{17}}{2}\leq x\leq \frac{1+\sqrt{17}}{2}$
So we get Approx $-1.6\leq x \leq 2.55$
So we get $\lfloor x \rfloor =-2,-1,0,1,2$
Now we will form Different cases.
$\; \bullet \; $ If $\lfloor x \rfloor  = -2\Rightarrow -1.66\leq x<-1\;,$ Put  into $x^2-4=\lfloor x \rfloor\;,$ we get $x^2-4=-2$
So we get $x^2=\left(\sqrt{2}\right)^2\Rightarrow x=\pm \sqrt{2}$
So we get $x=-\sqrt{2}\;,$ bcz above $-2\leq x<-1$.
$\; \bullet \; $ If $\lfloor x \rfloor  = -1\Rightarrow -1\leq x<0\;,$ Put  into $x^2-4=\lfloor x \rfloor\;,$ we get $x^2-4=-1$
So we get $x^2=\left(\sqrt{3}\right)^2\Rightarrow x=\pm \sqrt{3}$
So we get no real value of $x$ bcz above $-1\leq x<0$.
$\; \bullet \; $ If $\lfloor x \rfloor  = 0\Rightarrow 0\leq x<1\;,$ Put  into $x^2-4=\lfloor x \rfloor\;,$ we get $x^2-4=0$
So we get $x^2=\left(2\right)^2\Rightarrow x=\pm 2$
So we get no real value of $x$ bcz above $0 \leq x<1$.
$\; \bullet \; $ If $\lfloor x \rfloor  = 1\Rightarrow 1\leq x<2\;,$ Put  into $x^2-4=\lfloor x \rfloor\;,$ we get $x^2-4=1$
So we get $x^2=\left(\sqrt{5}\right)^2\Rightarrow x=\pm \sqrt{5}$
So we get no real value of $x$ bcz above $1\leq x<2$.
$\; \bullet \; $ If $\lfloor x \rfloor  = 2\Rightarrow 2\leq x<2.55\;,$ Put  into $x^2-4=\lfloor x \rfloor\;,$ we get $x^2-4=2$
So we get $x^2=\left(\sqrt{6}\right)^2\Rightarrow x=\pm \sqrt{6}$
So we get $x = \sqrt{6}$ bcz above $2\leq x<2.55$.
So we get $x=-\sqrt{2}$ and $x=\sqrt{6}$ are only two solution.
