3

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|$

Hanul Jeon
  • 27,376
Joshua
  • 71

1 Answers1

1

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$?

voldemort
  • 13,182
  • 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? – Joshua Jan 16 '14 at 01:38
  • You are right. I already considered x=1 in the case $-3 \leq x \leq 1$ – voldemort Jan 16 '14 at 01:43
  • but when x=1 |x-1|=0, it is not negative, why don't we express x >= 1 but x > 1?? – Joshua Jan 16 '14 at 01:51
  • They are the same at point $1$ @Joshua – gaoxinge Jan 16 '14 at 01:52
  • 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. – David K Sep 10 '14 at 02:01