Number of roots of $\lfloor\frac x3\rfloor=\frac x2$ How many roots does the equation $$\left\lfloor\frac x3\right\rfloor=\frac x2$$ have?

*

*$1$

*$2$

*$3$

*infinitely many

I checked that $x=0$ and $x=-2$ are the answers, so I think the answer is $(2)$. but I don't know how to solve the problem in general.
 A: hint
Put $ x=3X$.
the equation becomes
$$\lfloor X\rfloor =\frac 32 X$$
which gives
$$X-\lfloor X\rfloor =-\frac X2\in[0,1)$$
So, there are three cases
$1) X\in(-2,-1) \implies$
$$ X=\frac{-4}{3}\implies x=-4$$
$2) X\in[-1,0)\implies $
$$X=\frac{-2}{3}\implies x=-2$$
$3) X=0=x$.
In conclusion, it has three roots.
A: First observe that
$$\color{blue}{\frac x3 } \ge \left\lfloor\frac x3\right\rfloor=\color{blue}{\frac x2} \implies x \le 0 \\
\color{blue}{\frac x3 - 1} \le \left\lfloor\frac x3\right\rfloor=\color{blue}{\frac x2} \implies x \ge -6$$
Now, from the equation, notice that $x/2$ is an integer which means $x$ is an even number. Therefore, the candidates are $x \in \{-6, -4,-2,0\}$.
Checking for all these four values we get $x = -4$ or $x = -2$ or $x = 0$.
So, the equation has $3$ roots.
A: 
$$\left\lfloor \frac{x}{3} \right\rfloor = \frac{x}{2}$$

Hint Since $\left\lfloor \frac{x}{3} \right\rfloor$ is an integer, any solution $x$ must be a multiple of $2$. Now, for $x > 0$ we have $$\left\lfloor \frac{x}{3} \right\rfloor \leq \frac{x}{3} < \frac{x}{2} ,$$ and for $x \leq -6$ we have
$$\left\lfloor \frac{x}{3} \right\rfloor > \frac{x}{3} - 1 \geq \frac{x}{2} ,$$ leaving only a few possibilities to check manually.
