Writing an absolute value as a piecewise function