What is the integral of powers of sines and cosines over one period? I am looking for an expression for the integral
\begin{equation*}
I_{n,m}=\int_0^{2\pi} \cos^n(x)\sin^m(x) \, dx
\end{equation*}
where $n,m$ are arbitrary positive integers. Thanks
HINT

The problem is how to reduce the cosine and sine with degrees to cosine and sine of multiple arguments, since $\cos(nx)$ and $\sin(mx)$ are orthogonal on the interval $(0,2\pi):$
$$\int_0^{2\pi}\cos(nx)\sin(mx)=0,$$
$$\int_0^{2\pi}\cos(nx)\cos(mx)=\int_0^{2\pi}\sin(nx)\sin(mx)=
\begin{cases}
2\pi\text{ for }n=m=1\\
\pi\text{ for }n=m\not=1\\
0\text{ for }n\not=m.
\end{cases}$$

To reduce, it's possible to use the formula
$$2\cos(nx)=z^n+\bar z^n,\quad 2i\sin(mx)=z^m-\bar z^m,\quad z=e^{ix},\quad \bar z=e^{-ix},$$
then 
$$2^n\cos^n(x)=(z+\bar z)^n = \sum_{k=0}^h
\genfrac{(}{)}{0}{}{n}{k}\left(z^{n-2k}+\bar z^{n-2k}\right)+(n-2h-1)\genfrac{(}{)}{0}{}{n}{h}$$
$$=2\sum_{k=0}^h
\genfrac{(}{)}{0}{}{n}{k}\cos(n-2k)x + (n-2h-1)\genfrac{(}{)}{0}{}{n}{h},$$
where $h=\left[\dfrac{n}2\right]$;
$$(2i)^m\sin^m(x)=(z-\bar z)^n$$
$$
=\sum_{k=0}^{h'}(-1)^k\genfrac{(}{)}{0}{}{m}{k}\left(z^{m-2k}+(-1)^m\bar z^{m-2k}\right) + (-1)^{h'}(m-2h'-1)\genfrac{(}{)}{0}{}{n}{h'}$$
$$=
\begin{cases}
2\sum_{k=0}^l(-1)^k\genfrac{(}{)}{0}{}{m}{k}\cos(m-2k)x + (-1)^l\genfrac{(}{)}{0}{}{n}{l}\text{ for }m=2l\\
2i\sum_{k=0}^l(-1)^k\genfrac{(}{)}{0}{}{m}{k}\sin(m-2k)x\text{ for }m=2l+1
\end{cases}$$
These are dealt with in pretty much any Calculus text.
  If either sine or cosine is to an odd power, a simple substitution reduces it to an algebraic integral:

1) $\int \sin^n(x)\cos^{2k+1}(x)\, dx= \int \sin^n(x) \cos^{2k}(x) (\cos(x)\,dx)$
  Let $u= \sin(x)$ so that $du= \cos(x)\,dx$, $\cos^2(x)= 1- \sin^2(x)= 1- u^2$ and $\cos^{2k}(x)= (1- u^2)^k$.  The integral becomes $\int u^n(1- u^2)^k \,du$.

2) $\int \sin^{2k+ 1}(x)\cos^m(x)\,dx= \int \sin^{2k}(x)\cos^m(x)(\sin(x) \, dx)$
  Let $u= cos(x)$ so that $du= -\sin(x)\,dx$, $\sin^2(x)= 1- \cos^2(x)= 1- u^2$, and $\sin^{2k}(x)= (1- u^2)^k$.  The integral becomes $\int (1- u^2)^ku^m \,du$.

If both sine and cosine are to an even power use $\sin^2(x)= (1- \cos(2x))/2$ and $\cos^2(x)= (1+ \cos(2x))/2$, repeatedly if necessary, to reduce to a form in which either sine or cosine has an odd power.