Your long division is o.k.
Hint:
Obtain the derivative of ln(x^2+4)...
For the integrand , do long division:
Integrate the sum term by term and factor out constants:
Expanding the integrand gives
:
Integrate the sum term by term and factor out constants:
For the integrand }, substitute and :
The integral of is :
The integral of is :
The integral of is :
Substitute back for :