you are doing it right..after integrating, you have to substitute back the value of u, which is tanx.
Edit: A correction is needed in the step where you found dx. Look at the post below.
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?