Solve $f(x) = |x+1|−|x|+3|x−1|−2|x−2|−(x+2)=0$ $f(x) = |x+1|−|x|+3|x−1|−2|x−2|−(x+2)=0$
I saw this problem, and I couldn’t think of a good way to do this (initially thought about isolating a term with the modulus sign and squaring, but that seemed to take too long). The solution said something along the lines of:
‘ We have to solve f (x) = 0 in the five regions of the x-axis determined by the modulus functions’. Could someone please elaborate on what this means. Many thanks.
 A: For $x < -1$, you have $|x + 1| = x + 1$ and for $x \geq -1$ you have $|x + 1| = -x - 1$. So if you split into $x < -1$ and $x \geq -1$ cases you can get rid of the absolute value sign for that term. You can do a similar thing for the other absolute value symbols that show up, so you end out having to separately consider the following cases:
$$ x < -1$$
$$-1 \leq x < 0$$
$$0 \leq x < 1$$
$$1 \leq x < 2$$
$$x \geq 2$$
Note that you can put the endpoints in either of the adjacent intervals, but you should specify one or the other to make sure you get all solutions and don't have duplicates.
A: We have $|x-a| = \begin{cases}x-a,& \text{if } x\ge a \\ -(x-a), & \text{if } x< a\end{cases}$
So, $f(x) = \begin{cases}-(x+1) +x-3(x-1)+2(x-2)-(x+2) &  \text{for } x <-1 \\
(x+1) +x-3(x-1)+2(x-2)-(x+2) &\text{for }-1\le x <0 \\ (x+1) -x  -3(x-1)+2(x-2)-(x+2) &  \text{for } 0\le x<1 \\
(x+1)-x+3(x-1)+2(x-2)-(x+2)  &\text{for }1\le x<2 \\
(x+1)-x+3(x-1)-2(x-2)-(x+2) & \text{for } x\ge2\end{cases}, $
Simplify these and equate to $0$ to get the values of $x$
