I understand how to solve 1 absolute value as a piecewise function. $f(x)=|x-1|$ $$ f(x)= \begin{cases} x-1& \text{if }x\ge1\\ 1-x&\text{if }x<1 \end{cases} $$

But when a function involving 2 absolute values (or maybe more), I get stuck.

What are the steps to take in order to solve function like this? $f(x)=|x-1|-|x+3|$


Note that the "changes" happen only at the points 1 and -3. If $x<-3$ then $|x+3|=3-x$ and $|x-1|=1-x$ (by definition of ||). Can you complete the problem now by considering what happens when $-3 \leq x \leq 1$ and $x > 1$?

  • $\begingroup$ when - 3<= x <= 1, (1-x)-(x+3), when x > 1, (x-1)-(x+3),is it correct? I don't understand what do you express x>1 but not x>=1, because when x=1, |x-1|=0,why do we change the sign? $\endgroup$ – Joshua Jan 16 '14 at 1:38
  • $\begingroup$ You are right. I already considered x=1 in the case $-3 \leq x \leq 1$ $\endgroup$ – voldemort Jan 16 '14 at 1:43
  • $\begingroup$ but when x=1 |x-1|=0, it is not negative, why don't we express x >= 1 but x > 1?? $\endgroup$ – Joshua Jan 16 '14 at 1:51
  • $\begingroup$ They are the same at point $1$ @Joshua $\endgroup$ – gaoxinge Jan 16 '14 at 1:52
  • $\begingroup$ It's like the definition of $|x - 1|,$ which has a case for $x \ge 1$ and another case for $x < 1.$ You could just as well make one case $x > 1$ and the other case $x \le 1.$ Either way is fine, as long as every value fits in one of the cases. We usually don't let a value belong to two cases simultaneously. $\endgroup$ – David K Sep 10 '14 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.