TITLE: Using Residue theorem to evaluate $ \int_0^\pi \sin^{2n}\theta\, d\theta $
QUESTION [7 upvotes]: can you please guide me on evaluating this integral using residue theorem and binomial theorem
$$
\int_0^\pi \sin^{2n}\theta\, d\theta
$$
for $n = 1,2,3$
Honestly, I do not even know where to start, since it has no singularity.
And what is also the correct contour for this one?
Thanks in advance and more power.

REPLY [3 votes]: Although this doesn't use contour integration, we can use $\sin(x)=\frac{e^{ix}-e^{-ix}}{2i}$ and the binomial theorem to get
$$
\begin{align}
\int_0^\pi\sin^{2n}(x)\,\mathrm{d}x
&=\frac12\int_0^{2\pi}\sin^{2n}(x)\,\mathrm{d}x\\
&=\frac12\left(-\frac14\right)^n\int_0^{2\pi}\left(e^{ix}-e^{-ix}\right)^{2n}\,\mathrm{d}x\\
&=\frac12\left(-\frac14\right)^n\int_0^{2\pi}\sum_{k=0}^{2n}\binom{2n}{k}(-1)^ke^{2i(2n-k)x}e^{-ikx}\,\mathrm{d}x\\
&=\frac12\left(-\frac14\right)^n\binom{2n}{n}(-1)^n2\pi\\
&=\frac\pi{4^n}\binom{2n}{n}
\end{align}
$$