I don't understand where I'm wrong in my reasoning about this inequality: $$\big\vert x - \vert 1-x\vert\big\vert < 1$$ Attempts $$\vert 1-x\vert = \begin{cases} 1-x & \text{if}\quad x\leq 1 \\ x-1 & \text{if}\quad x > 1 \end{cases}$$ So then I have $$\begin{cases} \vert x - (1-x)\vert < 1 & \text{if}\quad x\leq 1 \\ \vert x - (x-1)\vert < 1& \text{if}\quad x>1 \end{cases}$$ But the second one is false, since it reads $\vert 1 \vert < 1$, and the first one reduces to $$\vert 2x - 1 \vert < 1$$ Here again I have two cases $$\begin{cases} 2x-1 < 1 & \text{if}\quad x \geq 1/2 \\ 1-2x < 1 & \text{if}\quad x < 1/2 \end{cases}$$ with the condition above of $x \leq 1$. The solution of this is $x \geq 1/2$, hence the final solution reads $x \in\left[\frac12, 1\right]$.
Yet the solution should be $-1 < x < 1$ or $1 < x < 3$.
I don't get it.
Here is what Mathematica says: