<s>[INST] Solve $[\frac{x^2-x+1}{2}]=\frac{x-1}{3}$ How can one solve the equation :
$[\frac{x^2-x+1}{2}]=\frac{x-1}{3}$ ?
Such that $[x]$ is the integer part of $x$.
By definition : 
$[\frac{x^2-x+1}{2}]<=\frac{x^2-x+1}{2}<[\frac{x^2-x+1}{2}]+1$.
So :
$\frac{x-1}{3}<=\frac{x^2-x+1}{2}<\frac{x-1}{3}+1$.
1)
$\frac{x-1}{3}<=\frac{x^2-x+1}{2}$ <=> $3x^2-5x+5>0$.
2)
$\frac{x^2-x+1}{2}<\frac{x-3}{2}+1$ <=> $3x^2-5x-1<0$.
How can I solve the system ?
 [/INST] The key is to recognize that the left hand side is, by definition of the floor function, an integer, so the right hand side must also be an integer, and hence we must have $x=3k+1$ for some $k\in\mathbb{Z}$.  This gives (on doing a little algebra)
$${x^2-x+1\over2}={3k(3k+1)\over2}+{1\over2}$$
Note that $2$ divides either $k$ or $3k+1$, so $3k(3k+1)/2$ in an integer for any $k$, hence
$$\big\lfloor{x^2-x+1\over2}\big\rfloor={3k(3k+1)\over2}$$
Thus the equation to solve (for integer $k$) is
$${3k(3k+1)\over2}=k$$
But the only integer solution is $k=0$, since $k\not=0$ implies $3(3k+1)=2$.  So $x=1$ is the only real solution to the original equation.
</s>