I've just started to learn about integration and can't even solve these examples:
Could someone show me how to do it?
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.