Solve $|x| +| x-1| <5$
Attempt:
We have $4$ cases:
$1.\quad x>0$ and $x>1\implies x>1$
$2.\quad x>0$ and $x<1$
$3.\quad x<0$ and $x<1 \implies x<0$
$4.\quad x<0$ and $x>1$ can't happen
For the first case:
$x+x-1<5\\2x<6\\ x<3$
For the second case:
if $x<0$ so $x<3$ true for all $x$
For the third case:
this is also true for all $0<x<1$
My final answer is wrong. Can someone show me how to solve this?
If you want to solve it by considering of cases, so we have three cases:
$x>1$, which gives $2x-1<5$ and $1<x<3$;
$0<x\leq1$, which gives $x-x+1<5$ and $0<x\leq1$;
$x\leq0$, which gives $-x-x+1<5$ and $-2<x\leq0$.
Finely we get $-2<x<3$.