Evaluate the integral $\int_{-1}^{1}\left\vert\, x^{3} - x\,\right\vert\,{\rm d}x$ I'm trying to solve:
$$\int_{-1}^{1}\left\vert\, x^{3} - x\,\right\vert\,{\rm d}x$$
I tried to solve this integral as follows:
solving $x^{3} - x = 0$ which implies $x = 0$ , $x = -1$ or $x = 1$. The problem is at which point will I break the integral ?. Since all of these points lie inside the interval of integration.
The answer is $1/2$. Any help will be appreciated.

To solve this, notice that absolute value yields both a positive and a negative result.
Notice, when $x = -1, 1$, $f(x) = 0$
When $0 <x < 1$, $f(x) < 0$
And when $-1 <x < 0$, $f(x) > 0$
Therefore, we can say that, by spliting the integrals.
$$\int_{-1}^1|x^3-x|dx=\int_{-1}^0(x^3 - x)dx+\int_0^1(x-x^3)dx$$
Solving, we get:
$$\left[\frac{x^4}{4} - \frac{x^2}{2}\right]_{-1}^0 = \frac{1}{2} - \frac{1}{4} = \frac{1}{4}$$
And 
$$\left[\frac{x^2}{2} - \frac{x^4}{4}\right]_{0}^1 = \frac{1}{2} - \frac{1}{4} = \frac{1}{4}$$
So,
$$\frac{1}{4} + \frac{1}{4} = \frac{1}{2}$$
