How do you solve the equation #abs(x-a)=b#?

1 Answer
Aug 30, 2017

Answer:

#x={(a+b,color(white)("xxx"),"if " x>=a),(a-b,,"if "x < a):}#

Explanation:

This requires a piece-wise solution with the pieces dependant upon whether #(x-a)# is positive or negative.

#{: ("if " (x-a) >= 0,"then "abs(x-a)=x-a,rarr x-a=b" becomes " x=a+b), ("if "(x-a) < 0,"then "abs(x-a)=a-x,rarr a-x=b" becomes " a-b=x) :}#