Compute
Since we are taking the integral of an absolute value, we want to break the expression in the absolute value into intervals on which it is either always positive or always negative, and evaluate the integrals of the pieces separately. So, examining we have zeros of
at
. If the expression is going to change sign it must do so at these points. So,
So, we break the integral into pieces (which we can do since the integral is additive with respect to the interval of integration by Theorem 1.17 of Apostol),
Now we can use the formula for the integral of a polynomial to calculate each of these separately,
Putting all of these pieces together, we have,