If you have with , then .
Subbing back in yields .
Recall the double angle identity: .
Letting , we have .
Clearly , but maybe not so clearly: , because if you draw out the triangle, the angle whose sine is will have cosine .
Thus the final answer is .
=Thus, , which is what I assume you were integrating.
I hope this helped.