8
$\begingroup$

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}$$

$\endgroup$
  • 1
    $\begingroup$ Use the binomial expansion of the integrand. You can easily obtain an answer in terms of a finite summation. $\endgroup$ – Mark Viola Jun 23 '15 at 22:33
  • $\begingroup$ And in that summation all but one term has integral $0$. At least after the right initial step... $\endgroup$ – David C. Ullrich Jun 23 '15 at 22:35
  • $\begingroup$ @Dr.MV, you are referring to the second integral in terms of u, correct? $\endgroup$ – JacksonFitzsimmons Jun 23 '15 at 22:36
  • 1
    $\begingroup$ You'll have an answer as fast as I can type it. Hang on... $\endgroup$ – David C. Ullrich Jun 23 '15 at 22:38
  • 1
    $\begingroup$ See Wallis' integrals. $\endgroup$ – Lucian Jun 24 '15 at 1:21
7
$\begingroup$

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} $$

$\endgroup$
  • $\begingroup$ Thank you for giving me multiple methods. $\endgroup$ – JacksonFitzsimmons Jun 23 '15 at 23:23
  • $\begingroup$ You're welcome. I started writing my answer before Bernard posted his answer, which also uses integration by parts. $\endgroup$ – robjohn Jun 23 '15 at 23:30
6
$\begingroup$

Integrate by parts, setting $$u=\cos^{2n-1}x,\enspace \operatorname{d}\mkern-2mu v=\cos x\operatorname{d}\mkern-2mu x,\enspace\text{whence}\quad \operatorname{d}\mkern-2mu u=-(2n-1)\cos^{2n-2}x \operatorname{d}\mkern-2mux,\enspace v= \sin x $$ Let's call $I_{2n}$ the integral. One obtains: $$I_{2n}=\Bigl[\sin x\mkern1mu\cos^{2n-1}x\Bigr]_0^{\tfrac\pi2}+(2n-1)(I_{2n-2}-I_{2n})=(2n-1)(I_{2n-2}-I_{2n})$$ whence the recurrence relation: $$I_{2n}=\frac{2n-1}{2n}I_{2n-2}.$$ Now write all these relations down to $n=1$, multiply the equalities thus obtained and simplify.

$\endgroup$
3
$\begingroup$

First, note that $\int_0^{\pi/2}=\frac14\int_0^{2\pi}$ by various symmetries.

Now say $\cos(t)=\frac12(e^{it}+e^{-it})$ and apply the binomial theorem. You get terms consisting of various powers of $e^{it}$. All those terms have integral $0$ except the middle one: $(e^{it})^n(e^{-it})^n=1$. So you get $$\frac14\int_0^{2\pi}\cos^{2n}(t)\,dt=\frac142^{-2n}(2\pi)C(2n,n),$$where $C()$ is a binomial coefficient.

The answer you want must now follow by induction (unless I dropped a factor, in which case it follows by induction from the corrected version of the above).

$\endgroup$
  • $\begingroup$ It's nice to see you again. It's been a while. $\endgroup$ – robjohn Jun 23 '15 at 23:30
  • $\begingroup$ Nice to be seen... $\endgroup$ – David C. Ullrich Jun 23 '15 at 23:34
3
$\begingroup$

First, note that it is:

$$\frac{1}{4}\int_{0}^{2\pi} \cos^{2n}x\,dx$$

Now $$\cos^{2n}(x)=\frac{1}{2^{2n}}\left(e^{ix}+e^{-ix}\right)^{2n}$$. And for integer $m\neq 0$, $\int_{0}^{2\pi}e^{imx}\,dx = 0$.

So you only care about the constant term of $(e^{ix}+e^{-ix})^{2n}$, which is $\binom{2n}{n}$.

So the integral is:

$$\frac{1}{4}\cdot 2\pi \cdot \frac{1}{2^{2n}} \binom{2n}{n}=\frac{\pi}{2}\frac{1}{2^{2n}}\binom{2n}{n}$$

Then prove that $$\frac{\binom{2n}{n}}{2^{2n}} = \prod_{k=1}^n \frac{2k-1}{2k}$$

You can prove this last by induction:

$$\binom{2(n+1)}{n+1} = \frac{(2n+1)(2n+2)}{(n+1)(n+1)}\binom{2n}{n}=2\frac{2(n+1)-1}{2(n+1)}\binom{2n}{n}$$

$\endgroup$
  • $\begingroup$ Hum constant term of $\left(e^{ix}+e^{-ix}\right)^{2n}$ is $\binom{2n}{n}$, can you explain me ? ^^ $\endgroup$ – ParaH2 Jun 23 '15 at 22:48
  • $\begingroup$ If you expand $(a+a^{-1})^{2n}$ via the binomial theorem, then the constant terms is $\binom{2n}{n}$. All the other terms are of the form $Ca^k$ for $k\neq 0$. Not sure how to make that more clear. $\endgroup$ – Thomas Andrews Jun 23 '15 at 22:49
  • $\begingroup$ Ok, and why are you seeking constants terms ? $\endgroup$ – ParaH2 Jun 23 '15 at 22:51
  • $\begingroup$ Because the integrals of all the other terms are zero, as I noted. So the only term that contributes a non-zero value to the integral is the constant term. @Shadock $\endgroup$ – Thomas Andrews Jun 23 '15 at 22:52
  • $\begingroup$ OK thank you, I'm a chemist, I have some knowlegde in maths because i love them, I'm ridiculous here haha ^^ $\endgroup$ – ParaH2 Jun 23 '15 at 22:55
2
$\begingroup$

You were on the right track using Euler's Identity and writing $\cos x=\frac12(e^{ix}+e^{-ix})$. Proceeding accordingly we have,

$$\begin{align} \int_0^{\pi/2}\cos^{2n}x\,dx&=\int_0^{\pi/2}\left(\frac{e^{ix}+e^{-ix}}{2}\right)^{2n}dx\\\\ &=\frac{1}{4^n}\int_0^{\pi/2}\sum_{k=0}^{2n}\binom{2n}{k}e^{ikx}e^{-ix(2n-k)}dx\\\\ &=\frac{1}{4^n}\sum_{k=0}^{2n}\binom{2n}{k}\int_0^{\pi/2}e^{ix2(k-n)}dx\\\\ &=\frac{1}{4^n}\sum_{k=0}^{2n}\binom{2n}{k}\frac{\pi}{2}\delta_{nk}+\frac{1}{4^n}\sum_{k=0, k\ne n}^{2n}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)} \tag 1\\\\ &=\frac{\pi}{2}\frac{1}{4^n}\binom{2n}{n}\\\\ &=\frac{\pi}{2}\frac{1}{4^n}\frac{(2n)!}{(n!)^2}\\\\ &=\frac{\pi}{2}\left(\frac{1}{2^n\,n!}\right)\left(\frac{(2n)!}{2^n\,n!}\right)\\\\ &=\frac{\pi}{2}\left(\frac{1}{(2n)!!}\right)\left((2n-1)!!\right)\\\\ &=\frac{\pi}{2}\frac{(2n-1)!!}{(2n)!!}\\\\ &=\frac{\pi}{2}\prod_{k=1}^{n}\frac{2k-1}{2k} \end{align}$$

as was to be shown!!

Note that the second sum in $(1)$ is purely imaginary and, thereby, must vanish. One can easily show it vanishes by exploiting symmetry. We now explicitly show this.

$$\begin{align} \sum_{k=0, k\ne n}^{2n}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)} &=\sum_{k=0}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)}+\sum_{k=n+1}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)}\\\\ &=\sum_{k=0}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)}+\sum_{m=0}^{n-1}\binom{2n}{2n-m}\frac{(-1)^{m-n}}{i2(n-m)} \text{substituting m=2n-k} \\\\ &=\sum_{k=0}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)}-\sum_{k=0}^{n-1}\binom{2n}{2n-k}\frac{(-1)^{k-n}}{i2(k-n)} \\\\ &=\sum_{k=0}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}-1}{i2(k-n)}-\sum_{k=0}^{n-1}\binom{2n}{k}\frac{(-1)^{n-k}}{i2(k-n)} \text{Using}\,\, \binom{2n}{2n-k}= \binom{2n}{k} \\\\ &=0 \end{align}$$

as was to be shown!

$\endgroup$
  • $\begingroup$ $\delta_{nk}$ ? $\endgroup$ – ParaH2 Jun 23 '15 at 22:43
  • 1
    $\begingroup$ Why is the integral from $$\int_{0}^{\pi/2}e^{2(k-n)ix}\,dx=\frac{\pi}{2}\delta_{nk}?$$ It's true for $\int_{0}^{\pi}$ or $\int_0^{2\pi}$, but not sure if for $\int_0^{\pi/2}$. $\endgroup$ – Thomas Andrews Jun 23 '15 at 22:44
  • $\begingroup$ The Kronecker Delta. It is $1$ when the indices are equal and $0$ otherwise. $\endgroup$ – Mark Viola Jun 23 '15 at 22:44
  • $\begingroup$ $\delta_{nk}=\delta_{n,k}=1$ if $n=k$, $0$ otherwise. $\endgroup$ – David C. Ullrich Jun 23 '15 at 22:45
  • $\begingroup$ @ThomasAndrews All of the other terms are purely imaginary and cancel by symmetry. $\endgroup$ – Mark Viola Jun 23 '15 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.