a)
b)
a) Should be easy to solve from the last step.
b) Use the trigonometric identitities: , and note that
I would maybe guess that you're having trouble with figuring out how to integrate them rather than expanding it so, continuing from Specs post.
You can separate the integral in a) to be...
And then using the fact that , you should be able to solve these.
For part b) use and after you've used the identities given in Specs post.