How can I compute this Integral for integer $n$ from $0$ to $\pi/2$ $$\int_{0}^{\pi/2}\cos^{2n+1}(x)dx?$$
5 Answers
Keywords: Wallis integrals.
For $k\geq 0$ integer, define \begin{align}J_k=\int_0^{\frac{\pi}{2}}\cos^{2k+1} x\,dx\end{align}
Perform integration by parts, ($(\sin x)^\prime=\cos x$ ) \begin{align}J_{k+1}&= \int_0^{\frac{\pi}{2}}\cos^{2k+3} x\,dx\\ &=\Big[\sin x\cos^{2k+2} x\Big]_0^{\frac{\pi}{2}}+(2k+2)\int_0^{\frac{\pi}{2}}\sin^ 2x\cos^{2k+1} x\,dx\\ &=(2k+2)\int_0^{\frac{\pi}{2}}\sin^ 2x\cos^{2k+1} x\,dx\\ &=(2k+2)\int_0^{\frac{\pi}{2}}\left(1-\cos^ 2x\right)\cos^{2k+1} x\,dx\\ &=(2k+2)\left(J_{k}-J_{k+1}\right) \end{align}
Therefore,
\begin{align}J_{k+1}&=\frac{2k+2}{2k+3}J_k\end{align}
Observe that,
\begin{align}J_0&=\int_0^{\frac{\pi}{2}} \cos x\,dx\\ &=\Big[\sin x\Big]_0^{\frac{\pi}{2}}\\ &=1 \end{align}
Addendum:
One obtains:
\begin{align}\boxed{J_k=\frac{2^kk!}{\big(2(k-1)+3\big)\big(2(k-2)+3\big)...\times 3}}\end{align}
- 15,643
Notice that
$$ \cos^{2n+1} x = (\cos^2 x)^n \cos x = (1 - \sin^2x )^n \cos x$$
Thus, upon the substitution $t=\sin x$,
$$ \int\limits_0^1 (1-t^2)^n dt $$
Alternatively, one can use integration by parts to observe that
\begin{align*} \int\limits_0^{\pi/2} \cos^{2n+1} x dx &= \int\limits_0^{\pi/2} \cos^{2n} x d(\sin x) \\ &= \sin x \cos^{2n} x \big|_0^{\pi/2} + \int\limits_0^{\pi/2} \sin^2 x \cos^{2n-1} dx \end{align*}
- 4,027
-
How do you compute the latter integral? – FDP Jan 27 '19 at 09:43
-
binomial expansion or you can use reduction formula using integration by parts in the first integral – James Jan 27 '19 at 09:49
-
You can obtain directly a recurring formula. $(1-x^2)^n$ is useless here. See: Wallis integrals https://en.wikipedia.org/wiki/Wallis%27_integrals – FDP Jan 27 '19 at 09:57
$$\dfrac{d(\cos^mx\sin x)}{dx}=\cos^{m+1}x-m\cos^{m-1}x\sin^2x=\cos^{m+1}x-m\cos^{m-1}x(1-\cos^2x)=(m+1)\cos^{m+1}x-m\cos^{m-1}x$$
Integrating both sides wrt $x,$ $$(m+1)I_{m+1}=mI_{m-1}+\cos^mx\sin x|_0^{\pi/2}$$ where $\displaystyle I_m=\int_0^{\pi/2}\cos^mx \ dx, I_1=?$
For $m+1\ne0,$ $$I_{m+1}=\dfrac{mI_{m-1}}{m+1}$$
$m+1=2n+1\implies$ $$I_{2n+1}=\dfrac{2nI_{2n-1}}{2n+1}=\prod_{r=1}^n\dfrac{2r}{2r+1}I_1=?$$
- 279,016
-
See also : https://math.stackexchange.com/questions/3056064/proving-reduction-formula-using-integration-by-parts/3056081#3056081 and https://math.stackexchange.com/questions/2964330/reduction-formula-for-integral-int-1-a2x2n-dx/2964337#2964337 – lab bhattacharjee Jan 27 '19 at 11:00
Using the beta function and Legendre's duplication formula, the integral is
$$\begin{aligned} \int_{0}^{\pi/2}\cos^{2n+1}x\,\mathrm{d}x &= \frac{1}{2}\frac{\Gamma(1/2)\Gamma(1+n)}{\Gamma(3/2+n)} = \frac{\sqrt{\pi}}{2}\frac{\Gamma(1+n)}{(n+1/2)\Gamma(1/2+n)} \\ &= \frac{\sqrt{\pi}}{2}\frac{1}{n+1/2}\frac{2^{2n}}{\sqrt{\pi}}\frac{\Gamma^{2}(1+n)}{\Gamma(1+2n)} = \frac{2^{2n}}{1+2n}\frac{(n!)^{2}}{(2n)!} \\ &= \frac{2^{n}}{1+2n}\frac{n!}{(2n-1)!!} = \boxed{\frac{1}{1+2n}\frac{(2n)!!}{(2n-1)!!}.}\end{aligned}$$
- 895
Let $$I(a,b)=\int_0^{\pi/2}\sin(x)^a\cos(x)^b\mathrm dx$$ for any complex $a,b$ such that $\mathrm{Re}\,a,\mathrm{Re}\,b>-1$. Then preform the substitution $t=\sin(x)^2$ to see that $$I(a,b)=\frac12\int_0^1t^{\frac{a-1}2}(1-t)^{\frac{b-1}2}\mathrm dt$$ $$I(a,b)=\frac12\int_0^1t^{\frac{a+1}2-1}(1-t)^{\frac{b+1}2-1}\mathrm dt$$ Then recall the definition of the Beta function: $$\mathrm{B}(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\mathrm dt=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$ Which gives our integral: $$I(a,b)=\frac{\Gamma(\frac{a+1}2)\Gamma(\frac{b+1}2)}{2\Gamma(\frac{a+b}2+1)}$$ and your integral is given by $$J_n=\int_0^{\pi/2}\cos(x)^{2n+1}\mathrm dx=I(0,2n+1)=\frac{\Gamma(\frac{1}2)\Gamma(\frac{2n+1}2+\frac12)}{2\Gamma(\frac{2n+1}2+1)}$$ And noting that $\Gamma(s+1)=s\Gamma(s)$, as well as $\Gamma(1/2)=\sqrt\pi$, we have $$J_n=\frac{\sqrt\pi}{4n+2}\frac{\Gamma(\frac{2n+1}2+\frac12)}{\Gamma(\frac{2n+1}2)}$$ Then we recall the Legendre duplication formula: $$\Gamma\left(s+\frac12\right)=2^{1-2s}\sqrt{\pi}\frac{\Gamma(2s)}{\Gamma(s)}$$ And from $\frac{\Gamma(2n)}{\Gamma^2(n)}=\frac{n}2{2n\choose n}$, we have that $$\frac{\Gamma(s+\frac12)}{\Gamma(s)}=\frac{s\sqrt\pi}{2^{2s}}{2s\choose s}$$ Hence with $s=\frac{2n+1}2$, $$J_n=\frac{\sqrt\pi}{4n+2}\frac{\frac{2n+1}2\sqrt\pi}{2^{2\frac{2n+1}2}}{2\frac{2n+1}2\choose \frac{2n+1}2}$$ $$J_n=\frac{\pi}{2^{2n+3}}{2n+1\choose n+\frac12}$$
- 18,002