TITLE: How to integrate $|x| \cdot x$
QUESTION [8 upvotes]: How to integrate this manually?
$$
\int |x|\cdot x ~dx 
$$
My tries so far:
$$
\int |x|\cdot x ~dx = (x^2/2)\cdot|x| - \int (x²/2)\cdot \mathop{\mathrm{sign}}(x) ~dx 
$$
Trying it again, but using sign(x) as first parameter, because sign(x) is not derivable further.
$$
 \int \mathop{\mathrm{sign}}(x)\cdot(x²/2) ~dx =|x|\cdot (x^2/2) - \int |x|\cdot x ~dx 
$$
Great, as nothing would have been done.
Next try, using the signum function
$$
|x|\cdot x = \mathop{\mathrm{sign}}(x)\cdot x^2
$$
$$
 \int \mathop{\mathrm{sign}}(x)\cdot |x| ~dx = x^2-\int|x|\cdot x^2~dx
$$
$$
 \int |x|\cdot x^2 ~dx =x²\cdot \mathop{\mathrm{sign}}(x)\cdot x^2-\int x^2\cdot \mathop{\mathrm{sign}}(x)\cdot 2x ~dx
$$
which seems to be a never ending chain again.
Any ideas?

REPLY [3 votes]: For $x>0$, this is the integral of $x^2$ which is $\frac{x^3}{3}$. For $x<0$, is the integral of $-x^2$, which is $-\frac{x^3}{3}$. This is just
$\frac{|x^3|}{3}$