\int|x|\,dx=C+\int_0^x|t|\,dt=\left\{\begin{array}{ll}\frac{x^2}2,& x>0\\-\frac{x^2}2,&x\leq 0.\end{array}\right.