I don't know how you can all remember integrals like or off the top of your head. I prefer to remember the procedures, and in this case, to reduce everything to sines and cosines and use substitution - at least then I only have to remember a couple of fundamental integrals
You should be able to remember"
Of course, if m is odd, you can do the same thing, switching "sine" and "cosine".If, in the integral , n is odd, say n= 2k+ 1, you can factor out one "sine" to use with the differential: , then use to get
and now the substitution u= cos(x), so that du= -sin(x)dx, makes that a polynomial integtration:
This also works if either m or n (or both) are negative but gives a "rational function" integtral rather than a polynomial integral.
The specific formulas others gave may be quicker for specific values of m or n, but that is, in my opinion, the simplest general method.
(If both m and n are even, you can use and/or to reduce the powers.)