Solve $x-\lfloor x\rfloor= \frac{2}{\frac{1}{x} + \frac{1}{\lfloor x\rfloor}}$ Could anyone advise me how to solve the following problem:
Find all $x \in \mathbb{R}$ such that $x-\lfloor x\rfloor= \dfrac{2}{\dfrac{1}{x} + \dfrac{1}{\lfloor x\rfloor}},$ where $\lfloor *\rfloor$ denotes the greatest integer function. 
Here is my attempt:
Clearly, $x \not \in \mathbb{Z}.$
$\dfrac{x}{\lfloor x \rfloor} - \dfrac{\lfloor x \rfloor}{x}= 2$
$ \implies x^2 -2x\lfloor x \rfloor - \lfloor x \rfloor ^2 = 0$
$\implies  x = (1 \pm \sqrt2 )\lfloor x \rfloor $ 
$\implies \{x\} = \pm\sqrt2 \lfloor x \rfloor$
Thank you. 

Completing the square gives
$$
x^2-2x\lfloor x\rfloor+\lfloor x\rfloor^2=2\lfloor x\rfloor^2
$$
so
$$
(x-\lfloor x\rfloor)^2=2\lfloor x\rfloor^2
$$
Since $0\le x-\lfloor x\rfloor<1$, we conclude $\lfloor x\rfloor=0$ that's disallowed by the starting equation.
