# Find the number of possible solution of |[x]-2x|=4

Find the number of possible values of x of the equation |[x]-2x|=4. |x| represent absolute value of x. [x] represent greatest integer lesser than x. I plotted the curve in desmos.com and got the following values x=3.5,4 & x=-4,-4.5 but got the idea of the values after having a look at the curve. Can someone suggest ways of finding value directly.

• Since $|[x]-2x|$ is equal to either $[x]-2x$ or $2x-[x]$ and the result must be an integer, then $2x$ is an integer. This means that either $x$ is an integer, or an integer $+1/2$. If $x$ is an integer then $[x]=x$ and the equation becomes $|x|=4$. So, $x=\pm4$. If $x+1/2$ is an integer, then $[x]=x-1/2$ and the equation becomes $|x+1/2|=4$. So, $x=\pm4-1/2$.
– user577471
Jul 21, 2018 at 2:14

We have $x=[x]+\{x\}$ where $\{x\}$ is the fractional part and $[x]=n\in\mathbb Z$

So $[x]-2x=n-\underbrace{[2n]}_{=\ 2[n]}-\{2x\}=-n-\underbrace{\{2x\}}_{=\ 0,1}=\pm 4\iff \begin{cases}\{x\}=0 & n=-4\text{ or }4\\\{x\}=\frac 12 & n=-5\text{ or }3\end{cases}$

Giving $x\in\{-4,4,-5+\frac 12,3+\frac 12\}$

Take a deep breath and do it.

Note $[x]$ is an integer and $4$ is an integer so $2x$ is an integer so either $x$ is an integer or $x = n + \frac 12$ for some integer $n$.

If $x$ is an integer then $|[x] - 2x| = |x-2x| = |-x| = 4$ and $x = \pm 4$.

If $x = n+\frac 12$ then $|[x] + 2(x)| = |n - 2n - 1| = |-n-1| = 4$ so $n+1 =\pm4$ and $n = 3$ or $n = -5$ and so $x = 3\frac 12$ or $-4\frac 12$.

So solutions are $x = -4\frac 12, -4, 3, 3\frac 12$.