Definite Integral of Polynomial of Sine and Cosines I was wondering if there is a way to compute definite integral 
\begin{align}
I(m,n) :=\int_{0}^{\pi} \sin^m (\theta) \cdot \cos^{n}(\theta) \ \mathrm{d} \theta
\end{align}
in general for integer-valued $m$ and $n$. This problem arises when I try to compute integrals of trigonometric functions over a high dimensional sphere.
In fact I am more interested in the asymptotic order of this integral. I was wondering how $I(m,n)$ behaves when $n$ goes to infinity. For example, what is the limit of $\lim _{n\rightarrow \infty} I(2, n)$?
 A: I'd try to expand 
$$\cos^n(x) = \frac{(e^{ix}+e^{-ix})^n}{2^n} = \frac{e^{-inx}(e^{2ix}+1)^n}{2^n} = \frac{e^{-inx}}{2^n}\sum_{k=0}^n {n\choose k} e^{2ikx}$$
$$\sin^m(x) = \frac{(e^{ix}-e^{-ix})^m}{(2i)^m} = \frac{e^{-imx}(e^{2ix}-1)^m}{(2i)^m} = (-1)^m\frac{e^{-imx}}{(2i)^m}\sum_{l=0}^m {m\choose l} (-1)^l e^{2ilx}$$
$$\cos^n(x) \sin^m(x) =\frac{(-1)^m}{2^{n+m}i^m}\sum_{l=0}^m \sum_{k=0}^n {m\choose l} {n\choose k} (-1)^l e^{\textstyle i(2l+2k-n-m)x}  $$
for $a \in \mathbb{Z}^*$ we know that $\int_0^\pi e^{2 i a x} dx = 0$ so that 
$$\int_0^\pi \sin^m(x) \cos^n(x) dx = \pi \frac{(-1)^m}{2^{n+m}i^m}\sum_{(l,k) \in E_{n,m}} {m\choose l} {n\choose k} (-1)^l $$
where $E_{n,m} = \left\{ (l,k) \ | \ 2l+2k=n+m, l \in \{0 \ldots m\}, k \in \{0 \ldots n\} \right\}$
this also tells us that the result is non-zero only when $m$ and $n$ are even (if $m$ is odd the result is imaginary and if $m+n$ is odd $E_{n,m}$ is empty)
A: When at least one of the exponents is odd, substitute $\sin^2 x = (1 - \cos^2 x)$ and $\cos^2 x = (1 - \sin^2 x)$ as in:
$$
\begin{eqnarray}
\int \sin^3 x \cos ^4 x \, \textrm{d}x &=& \int \sin^2 x \cos^4 x(\sin x \, \textrm{d}x) \\
 &=& \int (1 - \cos^2 x) cos^4 x (\sin x \, \textrm{d}x) \\
 &=& \int \cos ^4 x \sin x \, \textrm{d}x - \int \cos^6 x \sin x \, \textrm{d}x \\
 &=& \frac{-\cos^5 x}{5} + \frac{\cos^7 x}{7} + C \\
\end{eqnarray}
$$
When both $m$ and $n$ are even, substitute $\sin^2 x = \frac{1 - \cos 2x}{2}$ and $\cos^2 x = \frac{1 + \cos 2x}{2}$ as in:
$$
\begin{eqnarray}
\int \sin^2 x \cos^4 x \, \textrm{d}x &=& \int \left(\frac{1 - \cos 2x}{2}\right) \left(\frac{1 + \cos 2x}{2}\right)^2 \, \textrm{d}x \\
 &=& \frac{1}{8} \int \, \textrm{d}x + \frac{1}{8} \int \cos 2x \, \textrm{d}x - \frac{1}{8} \int \cos^2 2x \, \textrm{d}x - \frac{1}{8} \int \cos^3 2x \, \textrm{d}x \\
 &=& \frac{x}{8} + \frac{1}{16} \sin 2x - \frac{1}{8} \int \frac{1 + \cos 4x}{2} \, \textrm{d}x - \frac{1}{8} \int (1 - \sin^2 2x) \cos 2x \, \textrm{d}x \\
 && ... \\
 &=& \frac{x}{16} + \frac{\sin^3 2x}{48} - \frac{\sin 4x}{64} + C
\end{eqnarray}
$$
This requires computing the indefinite integral on which to apply your interval, which might be painful for high values of $m$ or $n$. I hope someone has a better answer.
