TITLE: Evaluate $\int_{0}^{\pi/2}\cos^{2n}(x)\text{d}x$.
QUESTION [5 upvotes]: I try this. Notice that,
$$
\begin{split}
\cos^{2n}x &= \left(\frac{e^{ix}+e^{-ix}}{2}\right)^{2n} = \frac{1}{2^{2n}} \sum_{k=0}^{2n} \binom{2n}{k}e^{ikx}e^{-i(2n-k)x} \\ &= \frac{1}{2^{2n}} \sum_{k=0}^{2n} \binom{2n}{k}e^{i(2k-2n)x} \end{split}
$$
The terms with $k\ne n$ integrate to zero over $[0,\pi/2]$, and we are left with
$$
\int_0^{\pi/2}\cos^{2n}x \,dx = \int_0^{\pi/2}\frac{1}{2^{2n}}\binom{2n}{n} \,dx = \frac{\pi}{2^{2n+1}}\binom{2n}{n}
$$
I'm right or not?

REPLY [3 votes]: I like this elegant proof and you are right. However, perhaps the logic doesn't quite follow, it may just be how you've written it for brevity.
A given component $e^{i(2k-2n)x}$ does not necessarily have
$$\int_{0}^{\frac{\pi}{2}}e^{i(2k-2n)x} dx = 0$$
e.g. take $k=n+1$. However, we in fact have that
$$\int_{0}^{\frac{\pi}{2}}e^{-2kix} + e^{2kix}dx = 2\int_{0}^{\frac{\pi}{2}} \cos\left(2kx\right)dx=0$$
and this is why your proof holds and symmetry of the binomial coefficient.