Integral of $\int_0^{2\pi}\cos^n(x)\,dx$.

Funny enough, someone just posted a question on the Power-reduction formula two hours ago. Using that, you readily get the result

$$\frac{2\pi}{2^n}\binom{n}{n/2}\;.$$


It is also possible with partial integration, though getting the closed formula from the other solution is not as easy to see.

$$ C(n):=\int_0^{2\pi}\!\!\!\cos^n(x)\,dx =\int_0^{2\pi}\!\!\!\cos^{n-1}(x)\cos(x)\,dx $$ partial integration gives

$$ = (n-1)\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\sin^2(x)\,dx$$ $$ =(n-1)\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\left(1-\cos^2(x)\right)\,dx $$ $$ \Rightarrow \int_0^{2\pi}\!\!\!\cos^n(x)\,dx = \frac{n-1}{n}\int_0^{2\pi}\!\!\!\cos^{n-2}(x)\,dx $$

So in short: $C(0)=2\pi$, $C(1)=0$ and $$C(n)=\frac{n-1}{n}C(n-2) = \frac{(n-1)!!}{n!!} 2\pi\quad \text{for }n\text{ even} .$$


Qiaochu Yuan's hint seems to be the simplest approach: By the binomial theorem for any $n\geq0$ one has $$2^n\cos^n x=(e^{ix}+e^{-ix})^n=\sum_{k=0}^n {n\choose k} (e^{ix})^k\ (e^{-ix})^{n-k}=\sum_{k=0}^n {n\choose k} e^{(2k-n)ix}\ .\qquad(*)$$ Since $$\int_0^{2\pi}e^{i\ell x}\ dx=\cases{2\pi&$\quad(\ell=0)$\cr 0&$\quad(\ell\ne0)$\cr}$$ at most one term on the right of $(*)$ contributes to the integral $J_n:=\int_0^{2\pi}\cos^n x\ dx$. When $n$ is odd then $2k-n\ne0$ for all $k$ in $(*)$, therefore $J_n=0$ in this case. When $n$ is even then $k=n/2$ gives the only contribution to the integral, and we get $$\int_0^{2\pi} \cos^n x\ dx={2\pi\over 2^n}{n\choose n/2}\ .$$

Tags:

Calculus