x3−x=x(x2−1)=x(x+1)(x−1)Thus, the function is positive in the range (−1,0)∪(1,∞)
The integral thus can be split and written as below:
∫2−1|x3−x|dx
=∫0−1(x3−x)dx+∫10(x−x3)dx+∫21(x3−x)dx
=[x44−x22]0−1+[x22−x44]10+[x44−x22]21
=0−(14−12)+12−14+4−2−(14−12)
=14+14+2+14
=2.75