---
tag: YHN341V2E6
kind: proof
name: Proof of the Wallis product by integrals of powers of sine
msc: [11Y60]
proves: 0XCYA4YERS
uses: [0WB57D9488, 0C1VYVNV2N, 00R4MWW532, 0V2DV29EGT, 07ZMX4ANJS, 00KAFBR32E, 026BJBQNGJ, 03H7WZ4T3K, 0VGMHCF4SC, 06SESV7GQY, 0RXX2PT1MQ, 0JZGW75C5Z, 0Z9JB71BS0, 08Y1BBQTK9, 080RWVVSB6, 0MBWQKM8QR, 0Q3HYFT9RQ, 0GXCXCX3QN, 0XMF00T4XQ, 0A74SX55QP, 07XBM3A9J5, RZ0Z2BTMT4]
sources:
  - url: https://en.wikipedia.org/wiki/Wallis_product
    locator: Proof using integration
---

## Proof

We compare the integrals $I_n = \int_0^{\pi/2} \sin^n x \, dx$ for even and odd $n$, and use the squeeze theorem.

1. Let $\sin$ and $\cos$ be the [[sine and cosine|0WB57D9488]], and let $\pi$ be the [[number pi|0C1VYVNV2N]]. So $\pi/2$ is the only zero of $\cos$ in $[0, 2]$.
2. From the series, $\sin 0 = 0$ and $\cos 0 = 1$. By the [[derivative of sine|00R4MWW532]] and of [[cosine|0V2DV29EGT]], both functions are differentiable on $\R$. So they are [[continuous|07ZMX4ANJS]].
3. Claim: $\cos x > 0$ for $0 \le x < \pi/2$. Otherwise $\cos x \le 0$ for such an $x$, and $x > 0$ since $\cos 0 = 1$.
4. Then the [[intermediate value theorem|00KAFBR32E]] on $[0, x]$ gives $c \in [0, x]$ with $\cos c = 0$. But $c \le x < \pi/2 \le 2$, so $c$ is a zero of $\cos$ in $[0, 2]$ other than $\pi/2$. This contradicts step 1, so the claim holds.
5. By steps 3 and 1, $\sin' = \cos \ge 0$ on $[0, \pi/2]$. So $\sin$ is [[increasing|026BJBQNGJ]] on $[0, \pi/2]$, and $\sin x \ge \sin 0 = 0$ there.
6. By the [[Pythagorean identity|03H7WZ4T3K]], $\sin^2 x \le 1$. With step 5, $0 \le \sin x \le 1$ for $x \in [0, \pi/2]$.
7. For $n \ge 0$, the function $\sin^n$ is continuous, as a [[product of continuous functions|0VGMHCF4SC]] (with $\sin^0 = 1$). So it is [[Riemann integrable|06SESV7GQY]] on $[0, \pi/2]$, and $I_n$ is defined.
8. Reduction formula. Let $n \ge 2$, $u(x) = \sin^{n-1} x$ and $v(x) = -\cos x$. By the [[chain rule|0RXX2PT1MQ]], the [[power rule|0JZGW75C5Z]] and the [[constant multiple rule|0Z9JB71BS0]], $u'(x) = (n-1) \sin^{n-2} x \cos x$ and $v'(x) = \sin x$.
9. These derivatives are continuous, by step 2 and the continuity of products used in step 7. So [[integration by parts|08Y1BBQTK9]] on $[0, \pi/2]$ applies:
$$I_n = \int_0^{\pi/2} u v' \, dx = u(\tfrac{\pi}{2}) v(\tfrac{\pi}{2}) - u(0) v(0) + (n - 1) \int_0^{\pi/2} \sin^{n-2} x \cos^2 x \, dx.$$
10. The boundary terms vanish, since $v(\pi/2) = -\cos(\pi/2) = 0$, and $u(0) = 0$ because $n - 1 \ge 1$.
11. Replace $\cos^2 x$ by $1 - \sin^2 x$ and use the [[linearity of the integral|080RWVVSB6]]. This gives $I_n = (n-1)(I_{n-2} - I_n)$, so $n I_n = (n - 1) I_{n-2}$ for $n \ge 2$.
12. By the [[integral of a power|0Q3HYFT9RQ]] with exponent $0$, $I_0 = \pi/2$. By the [[integral of sine|0GXCXCX3QN]], $I_1 = \cos 0 - \cos(\pi/2) = 1$.
13. By induction on $n$ with step 11, for all $n \ge 0$,
$$I_{2n} = \frac{\pi}{2} \prod_{k=1}^{n} \frac{2k - 1}{2k}, \qquad I_{2n+1} = \prod_{k=1}^{n} \frac{2k}{2k + 1}.$$
The case $n = 0$ is step 12. The step from $n$ to $n + 1$ multiplies by $\frac{2n+1}{2n+2}$ and by $\frac{2n+2}{2n+3}$.
14. By step 13, every $I_n$ is a product of positive numbers, so $I_n > 0$.
15. By step 6, $0 \le \sin^{n+1} x \le \sin^n x$ on $[0, \pi/2]$. By the [[monotonicity of the integral|0MBWQKM8QR]], $I_{n+1} \le I_n$ for all $n \ge 0$.
16. Let $n \ge 1$. Step 15 gives $I_{2n+1} \le I_{2n} \le I_{2n-1}$. Step 11 with index $2n + 1$ gives $I_{2n-1} = \frac{2n+1}{2n} I_{2n+1}$.
17. Divide by $I_{2n} > 0$. Then $r_n = I_{2n+1} / I_{2n}$ satisfies $\frac{2n}{2n+1} \le r_n \le 1$.
18. Let $P_n = \prod_{k=1}^{n} \frac{4k^2}{4k^2 - 1}$ be the partial products of the [[infinite product|RZ0Z2BTMT4]]. Since $4k^2 - 1 = (2k - 1)(2k + 1)$, step 13 gives
$$r_n = \frac{2}{\pi} \prod_{k=1}^{n} \frac{2k}{2k+1} \cdot \frac{2k}{2k-1} = \frac{2}{\pi} P_n.$$
19. By steps 17 and 18, $\frac{\pi}{2} \left(1 - \frac{1}{2n+1}\right) \le P_n \le \frac{\pi}{2}$ for $n \ge 1$.
20. By the [[Archimedean property|0A74SX55QP]], $\frac{1}{2n+1} \to 0$. By the [[algebra of limits|07XBM3A9J5]], the lower bound in step 19 tends to $\frac{\pi}{2}$. The upper bound is the constant $\frac{\pi}{2}$.
21. By the [[squeeze theorem|0XMF00T4XQ]], $P_n \to \frac{\pi}{2}$. So the partial products of $\prod_{n \ge 1} \frac{4n^2}{4n^2 - 1}$ converge to $\pi/2$.

## Idea

The integrals of $\sin^n$ over $[0, \pi/2]$ satisfy a simple recursion from integration by parts. So the even ones carry a factor $\pi/2$, and the odd ones are rational. They decrease in $n$, and consecutive odd ones have ratio tending to $1$. So the ratio of an odd one to the neighbouring even one tends to $1$, and this ratio is $2/\pi$ times a partial Wallis product.
