Your mistake is at the point where you say 'This leads to the messy:'.
The integral on the LHS is of the standard form
(after you have multiplied top and bottom of the integrand by -4 ).
You seem to have lost the negative sign in your integration. With that, the RHS becomes
which then creates a .