11

I am trying to solve the integral $\int_0^{2\pi} \cos^{2n}\theta d\theta$ using residues. I get the wrong answer so could you please say what I am doing wrong?

We start with the substitution $z = e^{i\theta}$. Then $d\theta = \frac{dz}{iz}$ and $\cos \theta = (z + z^{-1})/2$. So our integral now looks like $\frac{1}{i2^{2n}}\int_{|z|=1} \frac{(z+z^{-1})^{2n}}{z}dz$. The inner part of the integral has a singularity at $z = 0$. So we expand it as a Laurent series around the origin. $\frac{(z+z^{-1})^{2n}}{z} = \frac{1}{z}\sum_{t=0}^{2n}\binom{2n}{t}z^{2n-t}z^{-t} = \sum_{t=0}^{2n}\binom{2n}{t}z^{2n-2t-1}$. The residue of that beast is the coefficient of $1/z$, that is $\binom{2n}{n}$. Therefore the integral is equal to $\frac{2\pi i}{i2^{2n}}\binom{2n}{n} = \frac{\pi}{2^{2n-1}}\binom{2n}{n}$. But this is the wrong answer! Please help me!

I know that this can be solved using partial integration but I don't want that!

Trey
  • 111

1 Answers1

2

The methodology and resulting solution in the OP are correct. We can easily corroborate the result using straightforward real analysis, without successive integration by parts. Rather, we exploit symmetry and the relationship between the Beta and Gamma functions. To that end we now proceed to independently evaluate the integral.

We have

$$\begin{align}\int_0^{2\pi}\cos^{2n}(\theta)\,d\theta&=4\int_0^{\pi/2}\cos^{2n}(\theta)\,d\theta\\\\ &=2B\left(1/2,n-1/2\right)\\\\ &=2\frac{\Gamma(1/2)\Gamma(n+1/2)}{\Gamma(n+1)}\\\\ &=2\frac{\sqrt\pi \left(\sqrt\pi (2n-1)!!\right)}{2^nn!}\\\\ &=\frac{2\pi}{2^n\,n!}\frac{(2n)!}{2^n\,n!}\\\\ &=\frac{\pi}{2^{2n-1}}\binom{2n}{n} \end{align}$$

as was to be shown!

Mark Viola
  • 184,670
  • 1
    Where is my mistake? I've got that the integral equals 0: $$ \int 0^{2\pi}\cos^{2n}xdx={1\over2}\Re(\int_0^{2\pi}(e^{ix})^{2n}dx)=\ {1\over 2}\Re(\int{|z|=1}{z^{2m}\over iz}dz)={1\over 2}\Re({1\over i}\int_{|z|=1}z^{2n-1}dz) $$ and the last element equals $0$ since $z^{2n-1}$ is entire and $|z|=1$ is a closed curve. – J. Doe May 26 '19 at 12:59
  • 3
    The real part of $e^{inx}$ is $\cos(nx)\ne \cos^n(x)$ – Mark Viola May 26 '19 at 14:24