Solve the equation $\lfloor x^2\rfloor-3\lfloor x \rfloor +2=0$ 
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?

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 )$.
