Question:medium

Find the value of \(\displaystyle\int_{-1}^{2}|x^{3}-x|\,dx\).

Show Hint

Find the sign of x^3-x on each subinterval and integrate piecewise.
Updated On: Sep 23, 2026
Show Solution

Solution and Explanation

Step 1: Factoring to locate all roots at once:
\(x^3-x=x(x-1)(x+1)\) has roots exactly at the integers \(-1,0,1\), all inside \([-1,2]\), so the interval naturally splits into \([-1,0],[0,1],[1,2]\).

Step 2: Determining signs via the factored form's parity:
For \(x\in(-1,0)\): one negative factor among \(x,(x-1),(x+1)\)... more directly, testing \(x=-0.5\) as before gives positive; \(x\in(0,1)\) gives negative; \(x\in(1,2)\) gives positive — matching a standard alternating sign pattern for a cubic with three real roots.

Step 3: Integrating with the correct sign on each piece and summing:
Using \(F(x)=\tfrac{x^4}4-\tfrac{x^2}2\): total \(=[F(0)-F(-1)] - [F(1)-F(0)] + [F(2)-F(1)] = \tfrac14+\tfrac14+\tfrac94=\tfrac{11}{4}\).

Final Answer:
\[ \boxed{\dfrac{11}{4}} \]
Was this answer helpful?
0