Remember that the function $f(x) = |x|$ is defined as:

\eqalign{ y &= x \ {\rm for } \ x\geq 0 \cr &= -x \ {\rm for } \ x < 0 .}

Split up the domain of the function.