devarshi-dt-logo

Question:

Evaluate: ∫-22|x³-x|dx

Solution:

x³-x = x(x²-1) = x(x+1)(x-1)
Thus, the function is positive in the range (-∞,0)∪(1,∞)
The integral thus can be split and written as below:
∫-22|x³-x|dx = ∫-20(x³-x)dx + ∫01(x-x³)dx + ∫12(x³-x)dx
= [x⁴/4 - x²/2]-20 + [x²/2 - x⁴/4]01 + [x⁴/4 - x²/2]12
= 0 - (16/4 - 4/2) + (1/2 - 1/4) + (16/4 - 4/2) - (1/4 - 1/2)
= 0 - (4 - 2) + (1/4) + (4 - 2) - (-1/4)
= 0 - 2 + 1/4 + 2 + 1/4
= 1/2
= 0.5