I am trying to solve the integral:

This is what I did:

So that the integral is:

Then I did polynomial division, and got that:

=

But the according to Wolfram, the answer that I should have got from the integral I started solving, is not the same as the answer to this new integral.

What mistake did I do?