# Using Residue theorem to evaluate $\int_0^\pi \sin^{2n}\theta\, d\theta$

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.

Let $z=e^{i \theta}$, then $d\theta=dz/(i z)$ and $\sin{\theta} = (z-1/z)/(2 i)$. Then the integral becomes

$$\frac12\frac{-i}{(2 i)^{2 n}} \oint_{|z|=1} \frac{dz}{z} \left( z-z^{-1}\right)^{2 n} =\frac12 \frac{-i}{(2 i)^{2 n}} \oint_{|z|=1} dz \frac{(z^2-1)^{2 n}}{z^{2 n+1}}$$

As you can see, you have a pole of order $2 n+1$ in the integrand. To apply the residue Theorem, you need to evaluate $i 2 \pi$ times the residue at the pole at $z=0$, which is

$$\frac{\pi}{(2 i)^{2 n}} \frac{1}{(2 n)!} \left[\frac{d^{2 n}}{dz^{2 n}}\left ( z^2-1\right)^{2 n}\right]_{z=0}$$

Now, by Rodrigues' formula for Legendre polynomials, the latter expression is

$$\left[\frac{d^{2 n}}{dz^{2 n}}\left ( z^2-1\right)^{2 n}\right]_{z=0} = 2^{2 n} (2n)! P_n(0)$$

We can also use the binomial theorem to extract an explicit expression for the residue. Note that

$$\left ( z^2-1\right)^{2 n} = \sum_{k=0}^{2 n} \binom{2 n}{k} z^{2 k} (-1)^k$$

Taking the $2 n$th derivative and setting $z=0$ leaves only the $n$th term in the sum, so we get

$$\left[\frac{d^{2 n}}{dz^{2 n}}\left ( z^2-1\right)^{2 n}\right]_{z=0} = (-1)^n \frac{(2 n)!^2}{(n!)^2}$$

Therefore, the integral is

$$\frac{\pi}{2^{2 n}} \binom{2 n}{n}$$

• Wow! That's very cool. Thank you very much, we had just been taught Rodrigues and Legendre in my other class, so I can also use them in Complex Analysis. Very great. You guys are the best. I really appreciate it. – user1824371 Aug 26 '13 at 18:35
• (+1) As in my non-residue answer, you can also use the binomial theorem to compute the coefficient of $z^{2n}$ in $\left(z^2-1\right)^{2n}$ to be $(-1)^n\binom{2n}{n}$ to get the residue of $\frac{\left(z^2-1\right)^{2n}}{z^{2n+1}}$ at $z=0$. – robjohn Aug 27 '13 at 15:14
• @robjohn: of course - I just wanted to use the general expression for the residue in terms of a derivative as an illustration. – Ron Gordon Aug 27 '13 at 15:15
• What makes it okay to reparametrize $sin\ \theta$ from $0 < \theta < \pi$ to $z \in \{|z| = 1\}$? Why can you take in all of the unit circle, why not restrict to the boundary upper half of the unit circle? What is the difference? – iaenstrom Aug 20 at 11:56
• @iaenstrom: $\sin^{2 n}{\theta}$ is an even function. – Ron Gordon Aug 20 at 18:50

We can use this answer, with $a=2n$ and $b=0$, to get \begin{align} \int_0^{\pi}\sin^{2n}(x)\,\mathrm{d}x &=2\int_0^{\pi/2}\sin^{2n}(x)\,\mathrm{d}x\\ &=2\int_0^{\pi/2}\cos^{2n}(x)\,\mathrm{d}x\\ &=2\cdot\frac{\pi2^{-2n-1}\Gamma(2n+1)}{\Gamma(n+1)\Gamma(n+1)}\\ &=\frac\pi{4^n}\binom{2n}{n} \end{align}

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}