$$
\int \!\left |1-x\right |{dx}=-{\frac {\left (
1-x\right )\left |1-x\right |}{2}}
$$
