# A trig integral with a tangent substitution

From Complex Function Theory by Palka, an example shows for positive integers $$n$$ that $$\int_0^\pi \sin^{2n}t \; dt=\frac{\pi}{4}\binom{2n}{n}$$ using the Residue Thm, and I understood his derivation. But he went on to say that this can be found using familiar techniques, he mentions the substitution $$u= \tan (t/2)$$ and to do partial fractions.

I like attempting to evaluate integrals b/c they often involve clever tricks (that I usually can't think of, but appreciate once I see), so I wanted to give this one a try.

Using the suggested substitution $$\cos t=2 \cos^2 \frac{t}{2}-1= \frac{2}{u^2+1}-1$$ and $$2du= \sec^2(t/2)$$ $$\leftrightarrow$$ $$dt=2du/(u^2+1)$$ (converting from tan to cos I drew a right triangle w/ legs 1 and $$u$$), so $$\begin{split} \int_0^\pi \sin^{2n}t \; dt =& \int_0^\pi ( \sin^2t)^n \; dt= \int_0^\pi \big( \frac{1- \cos 2t}{2}\big)^n \; dt \\ =& \frac{1}{2^{n+1}}\int_0^{2 \pi}(1- \cos t)^n \; dt = \frac{1}{2^{n+1}}\int_{- \pi}^\pi (1- \cos t)^n \; dt \\ =& \frac{1}{2^{n+1}}\int_{- \infty}^\infty \big( 1- \frac{2}{u^2+1}+1 \big)^n \frac{2}{u^2+1}\; du \\ =& \int_{- \infty}^\infty \frac{u^{2n}}{(u^2+1)^{n+1}}\; du \end{split}$$ but the integrand doesn't look any easier to deal with. How should I proceed from here? Partial fractions should result in a linear combination of terms $$1/(u^2+1)^k$$, so even assuming I can do the decomp for general $$n$$, I realize I don't know how to integrate it for $$k \neq 1$$.
Thanks a lot in advance for any help.

• I would rather compute the last integral by integrating it by parts instead of using partial fractions. – Kavi Rama Murthy Feb 22 '19 at 23:17
• Actually I was thinking that too, I was thinking what to use for $f(u)$ and $g'(u)$ but remain stuck – Jason Feb 22 '19 at 23:19
• Write the integrand as product of $\frac u {(u^{2}+1)^{n+1}}$ and $u^{2n-1}$. Note that $\frac u {(u^{2}+1)^{n+1}}$ is the derivative of $-\frac 1 {2n} \frac 1 {(u^{2}+1)^{n+1}}$ – Kavi Rama Murthy Feb 22 '19 at 23:21
• I really appreciate your patience so far. When I write it out, I get $I_n= \pi \prod_{k=1}^n (2k-1)/2k$. I want to introduce factorials, but I'm being thrown off because every other number is being skipped. (eg, the numerator looks like 1*3*5*...) – Jason Feb 23 '19 at 0:49
• That is a double factorial en.wikipedia.org/wiki/Double_factorial – Henry Lee Feb 23 '19 at 21:35

Let $$I_n=\int_0^\pi \sin^{2n}t \; dt.$$ Then by integration by parts, you has $$\begin{eqnarray*} I_n&=&\int_0^\pi\sin^{2n-1}t\sin tdt\\ &=&-\int_0^\pi\sin^{2n-1}td\cos t=(2n-1)\int_0^\pi\cos^2 t\sin^{2n-2}tdt\\ &=&(2n-1)\int_0^\pi(1-\sin^2t)\sin^{2n-2}tdt\\ &=&(2n-1)I_{n-1}-(2n-1)I_n \end{eqnarray*}$$ from which one has $$I_n=\frac{2n-1}{2n}I_{n-1}.$$ Thus $$\begin{eqnarray*} I_n&=&\frac{2n-1}{2n}I_{n-1}=\frac{2n-1}{2n}\frac{2n-3}{2(n-1)}I_{n-2}\\ &=&\cdots=\frac{2n-1}{2n}\frac{2n-3}{2(n-1)}\cdots\frac{1}{2}I_0\\ &=&\frac{(2n-1)!!}{(2n)!}\pi=\frac{(2n-1)!!(2n-2)!!}{(2n)!(2n-2)!!}\pi\\ &=&\frac{(2n-1)!}{2^{2n-1}n!(n-1)!}\pi=\frac{2n(2n-1)!}{2n2^{2n-1}n!(n-1)!}\pi\\ &=&\frac{(2n)!}{2^{2n}(n!)^2}\pi=\frac{\pi}{4^n}\binom{2n}{n}. \end{eqnarray*}$$

• If we continue with the bottom result, we get: $$I_n=\frac{2n-1}{2n}I_{n-1}=\frac{(2n-1)(2n-3)}{2n(2n-2)}I_{n-2}$$ so it looks like we can express this in terms of factorial and double factorial to express in terms of $I_0$ – Henry Lee Feb 23 '19 at 21:26
• @HenryLee, you are right. – xpaul Feb 23 '19 at 21:31
• @xpaul thx so much for the answer! Would you say the substitution $u= \tan (t/2)$ is not needed? I'm just confused why that was a comment in the book. – Jason Mar 4 '19 at 21:12
• @Jason, your right, it is not needed. – xpaul Mar 5 '19 at 0:37

Here's a completely different method. For $$a,b\in\Bbb C$$ such that $$\operatorname{Re}a,\operatorname{Re}b>-1$$, we define $$I(a,b)=\int_0^{\pi/2}\sin(x)^{a}\cos(x)^bdx$$ Sub.: $$t=\sin(x)^2\Rightarrow 2t^{-1/2}(1-t)^{-1/2}dt=dx$$ Hence $$I(a,b)=2\int_0^1t^{\frac{a-1}2}(1-t)^{\frac{b-1}2}dt=2\int_0^1t^{\frac{a+1}2-1}(1-t)^{\frac{b+1}2-1}dt$$ Then recall the definition of the Beta function $$\mathrm B(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}dt=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$ Where $$\Gamma(s)=\int_0^\infty t^{s-1}e^{-t}dt$$ is the Gamma function, which extends the definition of factorial to all complex $$s$$ ($$\Gamma(s)=(s-1)!$$).

We then see immediately that $$I(a,b)=\frac{\Gamma(\frac{a+1}2)\Gamma(\frac{b+1}2)}{2\Gamma(\frac{a+b}2+1)}$$ Choosing $$a=2n$$ and $$b=0$$, and using $$\Gamma(1/2)=\sqrt\pi$$: $$J_n=I(2n,0)=\frac{\sqrt\pi}2\frac{\Gamma(n+1/2)}{\Gamma(n+1)}=\frac{\sqrt\pi}{2n}\frac{\Gamma(n+1/2)}{\Gamma(n)}\qquad \text{assuming}\ \ n>0$$ Then we recall the Legendre duplication formula: $$\Gamma(s+1/2)=2^{1-2s}\sqrt\pi \frac{\Gamma(2s)}{\Gamma(s)}$$ $$\frac{\Gamma(s+1/2)}{\Gamma(s)}=2^{1-2s}\sqrt\pi \frac{\Gamma(2s)}{\Gamma^2(s)}$$ Then using $$\Gamma(s)=(s-1)!$$ and the definition of $${2s\choose s}$$, we have $$\frac{\Gamma(2s)}{\Gamma^2(s)}=\frac{s}2{2s\choose s}$$ so $$\frac{\Gamma(s+1/2)}{\Gamma(s)}=\frac{s\sqrt\pi}{4^s}{2s\choose s}$$ And $$J_n=\frac{\pi}{2^{2n+1}}{2n\choose n}$$ And from symmetry about $$x=\pi/2$$, we have that $$\int_0^\pi \sin(x)^{2n}dx=\frac\pi{4^n}{2n\choose n}$$ QED

$$\newcommand{\bbx}{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}{\mathcal{#1}} \newcommand{\mrm}{\mathrm{#1}} \newcommand{\pars}{\left(\,{#1}\,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}{\left\vert\,{#1}\,\right\vert}$$ \begin{align} \int_{0}^{\pi}\sin^{2n}\pars{t}\dd t & = \int_{-\pi/2}^{\pi/2}\cos^{2n}\pars{t}\dd t = 2\int_{0}^{\pi/2}\cos^{2n}\pars{t}\dd t = 2\bracks{z^{n}} \sum_{\ell = 0}^{\infty}z^{\ell}\int_{0}^{\pi/2}\cos^{2\ell}\pars{t}\dd t \\[5mm] & = 2\bracks{z^{n}}\int_{0}^{\pi/2} \sum_{\ell = 0}^{\infty}\bracks{z\cos^{2}\pars{t}}^{\ell}\dd t = 2\bracks{z^{n}}\int_{0}^{\pi/2}{\dd t \over 1 - z\cos^{2}\pars{t}} \\[5mm] & = 2\bracks{z^{n}}\int_{0}^{\pi/2}{\sec^{2}\pars{t}\dd t \over \sec^{2}\pars{t} - z} = 2\bracks{z^{n}}\int_{0}^{\pi/2}{\sec^{2}\pars{t}\dd t \over \tan^{2}\pars{t} + 1 - z} \\[5mm] & = 2\bracks{z^{n}}{1 \over \root{1 - z}} \int_{0}^{\pi/2}{\bracks{\sec^{2}\pars{t}/\root{1 - z}}\dd t \over \bracks{\tan\pars{t}/\root{1 - z}}^{2} + 1} \\[5mm] & = 2\bracks{z^{n}}{1 \over \root{1 - z}} \int_{0}^{\infty}{\dd t \over t^{2} + 1} = \pi\bracks{z^{n}}\pars{1 - z}^{-1/2} = \pi{-1/2 \choose n}\pars{-1}^{n} \\[5mm] & = \bbx{{\pi \over 4^{n}}{2n \choose n}} \end{align}

Note that $$\ds{{-1/2 \choose n} = {1 \over \pars{-4}^{n}}{2n \choose n}}$$.