Integration by Parts involving Trigonometric Functions and Recurrence Formula

Integration by Parts is made of the product rule of differentiation. The derivative of $uv$ is $u’v + uv’$ and integrates both sides.

\begin{aligned} \require{color} (uv)’ &= u’v + uv’ \\ uv &= \int u’v + \int uv’ \\ \int u’v &= uv-\int uv’ \text{ or } \int uv’ = uv-\int u’v \end{aligned}

Worked Examples of Integration by Parts

$\displaystyle \text{Let }A_n = \int_{0}^{\frac{\pi}{2}} \cos^{2n} x dx \text{ and } B_n = \int_{0}^{\frac{\pi}{2}} x^2 \cos^{2n} x dx, \text{where } n \text{ is an integer, } n \ge 0 \text{ and } A_n > 0, \ B_n > 0. \\ \displaystyle \text{The recurrence formula is } n A_n = \frac{2n-1}{2} A_{n-1}.$

$\displaystyle (a) \ \ \ \text{Show that } A_n = 2n \int_{0}^{\frac{\pi}{2}} x \sin x \cos^{2n-1} x dx \text{ for } n\ge 1.$

\begin{aligned} \require{color} \color{green} u &= \cos^{2n}x, v’ = 1 \\ \color{green} u’ &= 2n \cos^{2n-1}x (-\sin x), v = x \\ \end{aligned} \\
\begin{aligned} \require{color} \displaystyle A_n &= \Big[x \cos^{2n}x\Big]_{0}^{\frac{\pi}{2}}-\int_{0}^{\frac{\pi}{2}} 2n \cos^{2n-1} (-\sin x) x dx &\color{red} \int uv’ = uv-\int u’v \\ \therefore A_n &= 2n \int_{0}^{\frac{\pi}{2}} x \sin x \cos^{2n-1} x dx \end{aligned}

$\displaystyle (b) \ \ \ \text{Show that } \frac{A_n}{n^2} = \frac{2n-1}{n} B_{n-1}-2 B_n \text{ for } n \ge 1. \\$

\begin{aligned} \require{color} \displaystyle u &= \sin x \cos^{2n-1} x \\ u’ &= \cos x \cos^{2n-1} x + \sin x (2n-1) \cos^{2n-2} x (-\sin x) \\ &= \cos^{2n} x-(2n-1) \cos^{2n-2} x \sin^2 x \\ &= \cos^{2n} x-(2n-1) \cos^{2n-2} x (1-\cos^2 x) \\ &= \cos^{2n} x-(2n-1) \cos^{2n-2} x + (2n-1) \cos^{2n} x \\ &= 2n \cos^{2n} x-(2n-1) \cos^{2n-2} x \\ v’ &= x \\ v &= \frac{1}{2} x^2 \\ \color{green} \int uv’ &\color{red}= uv-\int u’v \\ A_n &= 2n \Big[\sin x \cos^{2n-1} x \times \frac{1}{2} x^2 \Big]_{0}^{\frac{\pi}{0}}-2n \int_{0}^{\frac{\pi}{2}} \Big[2n \cos^{2n} x-(2n-1) \cos^{2n-2} x \Big] \times \frac{1}{2} x^2 dx \\ &= -n \int_{0}^{\frac{\pi}{2}} 2n x^2 \cos^{2n} x dx + n \int_{0}^{\frac{\pi}{2}} (2n-1) x^2 \cos^{2n-2} x dx \\ &= -2n^2 \int_{0}^{\frac{\pi}{2}} x^2 \cos^{2n} x dx + (2n-1)n \int_{0}^{\frac{\pi}{2}} x^2 \cos^{2n-2} x dx \\ A_n &= -2n^2 B_n + (2n-1)n B_{n-1} \\ \therefore \frac{A_n}{n^2} &= -2 B_n + \frac{2n-1}{n} B_{n-1} \color{red} \cdots (1) \end{aligned}

$\displaystyle (c) \ \ \ \text{Show that } \frac{1}{n^2} = \frac{2 B_{n-1}}{A_{n-1}}-\frac{2 B_n}{A_n} \text{ for } n \ge 1. \\$

\begin{aligned} \require{color} \displaystyle n A_n &= \frac{2n-1}{2} A_{n-1} &\color{red} \text{given} \\ \frac{2 A_n}{A_{n-1}} &= \frac{2n-1}{n} \\ \frac{A_n}{n^2} &= -2 B_n + \frac{2 A_n}{A_{n-1}} B_{n-1} &\color{red} \text{substitute to } (1) \\ \therefore \frac{1}{n^2} &= \frac{2 B_{n-1}}{A_{n-1}}-\frac{2 B_n}{A_n} &\color{red} \text{divide both sides by } n^2 \end{aligned}

$\displaystyle (d) \ \ \ \text{Show that } \sum_{k=1}^{n} \frac{1}{k^2} = \frac{\pi^2}{6}-\frac{2 B_n}{A_n} \\$

\begin{aligned} \require{AMSsymbols} \require{color} \displaystyle \sum_{k=1}^{n} \frac{1}{k^2} &= \frac{1}{1^2} + \frac{1}{2^2} + \frac{1}{3^2} + \cdots + \frac{1}{n^2} \\ &= \frac{2 B_0}{A_0}-\frac{2 B_1}{A_1} + \frac{2 B_1}{A_1}-\frac{2 B_2}{A_2} + \frac{2 B_2}{A_2} – \frac{2 B_3}{A_3} + \cdots + \frac{2 B_{n-1}}{A_{n-1}}-\frac{2 B_n}{A_n} \\ &= \frac{2 B_0}{A_0}-\frac{2 B_n}{A_n} \color{red} \cdots (2) \\ B_0 &= \int_{0}^{\frac{\pi}{2}} x^2 \cos^{0} x dx \\ &= \int_{0}^{\frac{\pi}{2}} x^2 dx = \Big[\frac{x^3}{3} \Big]_{0}^{\frac{\pi}{2}} = \frac{\pi^3}{24} \\ A_0 &= \int_{0}^{\frac{\pi}{2}} \cos^0 x dx \\ &= \int_{0}^{\frac{\pi}{2}} dx = \big[x \big]_{0}^{\frac{\pi}{2}} = \frac{\pi}{2} \\ \newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}} \color{green} (2) &= \frac{2 \ddfrac{\pi^3}{24}}{\ddfrac{\pi}{2}}-\frac{2 B_n}{A_n} \\ \therefore \sum_{k=1}^{n} \frac{1}{k^2} &= \frac{\pi^2}{6}-\frac{2 B_n}{A_n} \end{aligned}

$\displaystyle (e) \ \ \ \text{Given } \sin x \ge \frac{2x}{\pi} \text{ for } 0 \le x \le \frac{\pi}{2} \text{ show that } B_n \le \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2} \Bigg)^n dx. \\$

\begin{aligned} \require{color} \displaystyle \sin^2 x &\ge \frac{4x^2}{\pi^2} \\ -\sin^2 x &\le-\frac{4x^2}{\pi^2} \\ 1-\sin^2 x &\le 1-\frac{4x^2}{\pi^2} \\ \cos^2 x &\le 1-\frac{4x^2}{\pi^2} \\ \cos^{2n} x &\le \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n \\ x^2 \cos^{2n} x &\le x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n \\ \int_{0}^{\frac{\pi}{2}} x^2 \cos^{2n} x dx &\le \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx \\ \therefore B_n &\le \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx \end{aligned}

$\displaystyle (f) \ \ \ \text{Show that } \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx = \frac{\pi^2} {8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} dx.$

\begin{aligned} \require{AMSsymbols} \require{color} \displaystyle \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx &= \int_{0}^{\frac{\pi}{2}} x \times x \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx \color{green} \cdots (3) \\ \color{red} u &\color{red}= x, u’ = 1 \\ \color{red} v’ &\color{red}= x \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n \\ \frac{d}{dx} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} &= (n+1) \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n \times \Big(-\frac{8x}{\pi^2}\Big) \\ \frac{-\pi^2}{8(n+1)}\frac{d}{dx} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} &= x \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n \\ \color{red} v &\color{green}= \frac{-\pi^2}{8(n+1)} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} \\ \color{red} (3) &= \frac{-\pi^2}{8(n+1)} \Bigg[x\Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1}\Bigg]_{0}^{\frac{\pi}{2}} + \frac{\pi^2}{8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} dx \\ \therefore \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx &= \frac{\pi^2} {8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} dx \end{aligned}

$\displaystyle (g) \ \ \ \text{Show that } B_n \le \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt \le \frac{\pi^3}{16(n+1)} A_n \text{ using the substitution } x = \frac{\pi}{2} \sin t.$

$\text{From } (e) \text{ and } (f),$
\begin{aligned} \require{color} \displaystyle B_n &\le \int_{0}^{\frac{\pi}{2}} x^2 \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^n dx = \frac{\pi^2} {8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} dx \\ B_n &\le \frac{\pi^2} {8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4x^2}{\pi^2}\Bigg)^{n+1} dx \color{green} \cdots (4) \\ dx &= \frac{\pi}{2} \cos t dt \\ x &= 0 \rightarrow t = 0 \\ x &= \frac{\pi}{2} \rightarrow t = \frac{\pi}{2} \\ \color{red} (4) \cdots B_n &\le \frac{\pi^2}{8(n+1)} \int_{0}^{\frac{\pi}{2}} \Bigg(1-\frac{4}{\pi^2} \frac{\pi^2}{2^2} \sin^2 t \Bigg)^{n+1} \frac{\pi}{2} \cos t dt \\ &= \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \big(1-\sin^2 t\big)^{n+1} \cos t dt \\ &= \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \big(\cos^2 t\big)^{n+1} \cos t dt \\ &= \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt \\ \therefore B_n &\le \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt \color{red} \cdots (5) \\ \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt &\le \int_{0}^{\frac{\pi}{2}} \cos^{2n} t dt \color{red} \text{ for } 0 \le t \le \frac{\pi}{2}\\ \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt &\le A_n \\ \therefore \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt &\le \frac{\pi^3}{16(n+1)} A_n \color{red} \cdots (6) \\ \therefore B_n &\le \frac{\pi^3}{16(n+1)} \int_{0}^{\frac{\pi}{2}} \cos^{2n+3} t dt \le \frac{\pi^3}{16(n+1)} A_n \color{red} \text{ by } (5) \text{ and } (6) \end{aligned}

$\displaystyle (h) \ \ \ \text{Show that } \frac{\pi^2}{6}-\frac{\pi^3}{8(n+1)} \le \sum_{k=1}^{n} \frac{1}{k^2} \lt \frac{\pi^2}{6}.$

\begin{aligned} \require{AMSsymbols} \require{color} \displaystyle \frac{2 B_n}{A_n} &= \frac{\pi^2}{6}-\sum_{k=1}^{n} \frac{1}{k^2} \color{red} \cdots (7) &\color{red} \text{by } (d) \\ B_n &\le \frac{\pi^3}{16(n+1)} A_n &\color{red} \text{by } (g) \\ \frac{B_n}{A_n}B_n &\le \frac{\pi^3}{16(n+1)} \\ \frac{2 B_n}{A_n}B_n &\le \frac{\pi^3}{8(n+1)} \color{red} \cdots (8) \\ \frac{\pi^2}{6}-\sum_{k=1}^{n} \frac{1}{k^2} &\le \frac{\pi^3}{8(n+1)} &\color{red} \text{by } (7) \text{ and } (8) \\ \frac{\pi^2}{6}-\frac{\pi^3}{8(n+1)} &\le \sum_{k=1}^{n} \frac{1}{k^2} &\color{red} \cdots (9) \\ \sum_{k=1}^{n} \frac{1}{k^2} &= \frac{\pi^2}{6}-\frac{2 B_n}{A_n} &\color{red} \text{by } (7) \\ \sum_{k=1}^{n} \frac{1}{k^2} &< \frac{\pi^2}{6} \color{red} \cdots (10) &\color{red} \frac{2 B_n}{A_n} > 0 \\ \therefore \frac{\pi^2}{6}-\frac{\pi^3}{8(n+1)} &\le \sum_{k=1}^{n} \frac{1}{k^2} \lt \frac{\pi^2}{6} &\color{red} \text{by } (9) \text{ and } (10) \end{aligned}

$\displaystyle (i) \ \ \ \text{Find } \lim_{n\to\infty} \sum_{k=1}^{n} \frac{1}{k^2}.$

\begin{aligned} \require{AMSsymbols} \require{color} \displaystyle \lim_{n\to\infty} \frac{\pi^3}{8(n+1)} &= 0 \\ \frac{\pi^2}{6}-0 &\le \lim_{n\to\infty} \sum_{k=1}^{n} \frac{1}{k^2} \lt \frac{\pi^2}{6} \\ \therefore \lim_{n\to\infty} \sum_{k=1}^{n} \frac{1}{k^2} &= \frac{\pi^2}{6} \end{aligned}