Integration with trig functions

Hi I'm stuck on a problem (I don't know if I am doing it correctly):

I have been given a hint to substitute x^2 with tan^2(u).

When I do this it becomes now using the identity of tan^2 = sec^2 - 1 i get it becomes .

I know that to make it so the integral is with respect to (u) I find the differential of x= tan^2(u) which when I rearrange becomes . Here is where I am confused, does the above just become because sec and cos cancelling each other out? or is there something that I have missed out?

Thanks for any help