|x-1|=\left\{\begin{array}{cc}x-1 & x\geq 1\\ -x+1 & x<1\end{array}\right.