SOLUTION: could you please explain: write y=|x-5|+|x+5| as a piecewise function

Algebra ->  Absolute-value -> SOLUTION: could you please explain: write y=|x-5|+|x+5| as a piecewise function      Log On


   



Question 889099: could you please explain: write y=|x-5|+|x+5| as a piecewise function
Answer by josgarithmetic(39623) About Me  (Show Source):
You can put this solution on YOUR website!
y=|x-5|+|x+5|
Four conditions to use.

x-5%3E=0 and x%2B5%3E=0. Also means x>=5 and x>=-5 which means 5%3C=x .
y=x-5%2Bx%2B5
y=2x.

x-5%3C0 and x%2B5%3E=0. Also means x<5 and x>=-5 or -5%3C=x%3C5.
y=-x%2B5%2Bx%2B5
y=10.

x-5%3E=0 and x%2B5%3C0. This is x>=-5 and x<5 or -5%3C=x%3C5.
y=x-5-%28x%2B5%29
y=x-5-x-5
y=-10. You canNOT add absolute values to result in a negative value. This condition
therefore makes no sense.

x-5%3C0 and x%2B5%3C0. Means x<5 and x<-5, equivalent to x%3C-5.
y=-%28x-5%29-%28x%2B5%29
y=-x%2B5-x-5
y=-2x

RESULT
-------------------------
y=-2x if x%3C-5
y=10 if -5%3C=x%3C=5
y=2x if 5%3Cx
-------------------------