How to integrate odd and even powers of sine and cosine