<s>[INST] Evaluating $\int |x|^3 \; dx $ $$\int |x|^3 \; dx $$
In my module it is suggest to use integration by parts, 
$$ \text{ Set }I = \int (|x|^3 \cdot 1) \; dx = |x|^3 \cdot x - \int \color{red}{\frac {x^3}{|x|^3}3x^2}\cdot x \; dx$$ 
$$ \implies I = |x|^3 \cdot x - \color{red}{3\int |x|^3\;} dx$$
$$ \implies I = \frac 1 4 |x|^3 \cdot x +C $$
I am having trouble understanding the red parts, to be precise the differentiation of $|x|^3 $.
I will also appreciate if somebody  wants to share a different approach (if any).
Thanks,
 [/INST] Let $\displaystyle I= \int|x|^3 dx$
\begin{align*}I =& \int x^2|x| dx \\
=& |x|\int x^2 dx - \int\frac{d}{dx}(|x|)\left(\int x^2 dx \right)dx \\
=&\frac{|x|x^3}{3} - \int\left(\frac{|x|}{x}\cdot\frac{x^3}{3}\right)dx  \text{ since } \frac{d}{dx}(|x|) = \frac{|x|}{x} \\
=&\frac{|x|x^3}{3} - \frac{1}{3}\int|x|x^2dx \\
=&\frac{|x|x^3}{3}  - \frac{I}{3}\end{align*}
That implies,
\begin{align*}I + \frac{I}{3} =& \frac{|x|x^3}{3} \\
\frac{4I}{3}  =& \frac{|x|x^3}{3} \\
4I =& |x|(x^3)\end{align*}
Therefore $\displaystyle I = \frac{|x|x^3}{4}$
</s>