You can put this solution on YOUR website!
First factor the sin's:
Then replace with :
Then multiply:
Separate into two integrals:
Since the derivative of cos is -sin we almost have cos to some power times the derivative of cos in each integral. We just need the factors of -1:
"Pulling" the unwanted -1's outside the integrals:
which simplifies to:
Now we have cos to some power times the derivative of cos. These are now simple integrals:
which is equivalent to the answer you provided.