TITLE: Definite integral of even powers of Cosine.
QUESTION [8 upvotes]: I'm looking for a step-by-step solution to the following integral, in terms of n$$\int_0^{\frac{\pi}{2}} \cos^{2n}(x) \  {dx}$$I actually KNOW that the solution is$${\frac{\pi}{2}} \prod_{k=1}^n \frac{2k-1}{2k}$$ But I would like to know how to get there. This is not homework, this is to further my own understanding. My own efforts to solve this consisted of expanding $\cos(x)$ in terms of $e^{ix}$ but this proved to be fruitless, leading me only to the following integral, where $u=e^{ix}$ $$-i\int_1^i \left({\frac{1+u^2}{2u}}\right)^{2n}  \ {du}$$

REPLY [8 votes]: There are several approaches. One, that has been given in previous answers, uses the fact that $\cos(\theta)=\frac12(e^{i\theta}+e^{i\theta})$ and that $\int_0^{2\pi}e^{in\theta}\,\mathrm{d}\theta=2\pi$ if $n=0$, and vanishes otherwise, to get
$$
\begin{align}
\int_0^{\pi/2}\cos^{2n}(\theta)\,\mathrm{d}\theta
&=\frac14\int_0^{2\pi}\cos^{2n}(\theta)\,\mathrm{d}\theta\\
&=\frac1{4^{n+1}}\int_0^{2\pi}\left(e^{i\theta}+e^{i\theta}\right)^{2n}\,\mathrm{d}\theta\\
&=\frac{2\pi}{4^{n+1}}\binom{2n}{n}
\end{align}
$$

Another approach is to integrate by parts
$$
\begin{align}
\int_0^{\pi/2}\cos^{2n}(\theta)\,\mathrm{d}\theta
&=\int_0^{\pi/2}\cos^{2n-1}(\theta)\,\mathrm{d}\sin(\theta)\\
&=(2n-1)\int_0^{\pi/2}\sin^2(\theta)\cos^{2n-2}(\theta)\,\mathrm{d}\theta\\
&=(2n-1)\int_0^{\pi/2}\left(\cos^{2n-2}(\theta)-\cos^{2n}(\theta)\right)\,\mathrm{d}\theta\\
&=\frac{2n-1}{2n}\int_0^{\pi/2}\cos^{2n-2}(\theta)\,\mathrm{d}\theta\\
\end{align}
$$
and use induction to get
$$
\int_0^{\pi/2}\cos^{2n}(\theta)\,\mathrm{d}\theta
=\frac\pi2\prod_{k=1}^n\frac{2k-1}{2k}
$$

Note that
$$
\begin{align}
\frac\pi2\prod_{k=1}^n\frac{2k-1}{2k}
&=\frac\pi2\frac{(2n)!}{(2^nn!)^2}\\
&=\frac{\pi}{2^{2n+1}}\binom{2n}{n}
\end{align}
$$