5. In the set of real numbers, solve the equation

$$
|x-| 2 x-|3 x-1|||=1
$$

## Second Year - B Category
5. Let's assume first $x \leqslant \frac{1}{3}$. Then we have $|3 x-1|=1-3 x$, so the equation reduces to

$$
1=|x-| 2 x-|3 x-1|||=|x-| 2 x-(1-3 x)||=|x-| 5 x-1|| \text{. }
$$

For $x \leqslant \frac{1}{5}$ we have $|5 x-1|=1-5 x$, so the equation further reduces to $1=|x-| 5 x-1||=$ $|x-(1-5 x)|=|6 x-1|$, i.e., $6 x-1= \pm 1$, which has solutions $x=\frac{1}{3}$ and $x=0$, of which the first is discarded because it does not satisfy the condition $x \leqslant \frac{1}{5}$; for $x>\frac{1}{5}$ we have $|5 x-1|=5 x-1$, so the equation further reduces to $1=|x-| 5 x-1||=|x-(5 x-1)|=|1-4 x|$, i.e., $1-4 x= \pm 1$, which has solutions $x=0$ and $x=\frac{1}{2}$, both of which we discard because they are not in the interval $\frac{1}{5} < x < \frac{1}{3}$. Then we have $|3 x-1|=3 x-1$, so the equation reduces to

$$
1=|x-| 2 x-|3 x-1|||=|x-| 2 x-(3 x-1)||=|x-| 1-x|| \text{. }
$$

For $x \leqslant 1$ we have $|1-x|=1-x$, so the equation further reduces to $1=|x-| 1-x||=$ $|x-(1-x)|=|2 x-1|$, i.e., $2 x-1= \pm 1$, which has solutions $x=1$ and $x=-1$, of which the latter is discarded because it does not satisfy the condition $x>\frac{1}{3}$; for $x>1$ we have $|1-x|=x-1$, so the equation further reduces to $1=|x-| 1-x||=|x-(x-1)|=|1|=1$, so the solutions in this case are all numbers that satisfy the condition $x>1$.

Therefore, the solutions to the equation are $x=0$ and all real numbers $x$ for which $x \geqslant 1$.

## Second Grade - B Category