You can
put this solution on YOUR website!This is a tricky one. It involves a substitution which "converts" rational
functions of sin and/or cos into "plain" rational functions which may be
more easily integrated. The substituion is based on a right triangle with
legs of 2z and (1-z^2) and a hypotenuse of (1+z^2). And let the angle
between the hypoentuse and the (1-z^2) leg be called x. In this triangle:

And, thru the use of 1/2 angle trig identities:

or z = tan((1/2)x)
which leads to:

Now we can substitute in for sin(u) and, if we had one, cos(u), and for du:

Multiplying the numerator and denominaor of the fraction by (1+z^2) we get:

And, if we complete the square in the denominator we can have an integral
of the du/(a^2 + u^2) variety (an arctan):

This fits the pattern of the intergation formula:

So

Substituting back in for z we get:

of, if you like rationalized denominators:

the derivative of which, believe it or not, is

!