华里士公式
$$
\begin{aligned}
\int_0^\frac{\pi}{2} \sin^n x \mathrm{d} x= \int_0^\frac{\pi}{2} \cos^n x \mathrm{d} x&=
\begin{cases}
\frac{(n-1)!!}{n!!}\cdot\frac{\pi}{2} & n=2k,k\in N.\\
\frac{(n-1)!!}{n!!} & n=2k+1,k\in N.\\
\end{cases}\\
&=\begin{cases}
\frac{n-1}{n}\cdot \frac{n-3}{n-2} \cdots \frac{1}{2} \cdot \frac{\pi}{2} & n=2k,k\in N.\\
\frac{n-1}{n}\cdot \frac{n-3}{n-2} \cdots \frac{2}{3} & n=2k+1,k\in N.\\
\end{cases}
\end{aligned}
$$
证明
设 $I_n = \int_0^{\frac{\pi}{2}} \sin^n x \mathrm{d} x$ ,则有:
$$
\begin{aligned}
I_n &= – \int_0^{\frac{\pi}{2}}\sin^{n-1} x \mathrm{d} \cos x \\
&= \cos x \sin^{n-1} x \bigg|_0^\frac{\pi}{2} – \int_0^{\frac{\pi}{2}} \cos x \mathrm{d} \sin^{n-1} x\\
&= \int_{0}^{\frac{\pi}{2}}(n-1)\cos^2 x\sin^{n-2} x \mathrm{d} x\\
&= (n-1) \int_{0}^{\frac{\pi}{2}}(n-1)(1-\sin^2 x) x\sin^{n-2} x \mathrm{d} x\\
&= (n-1)I_{n-2} – (n-1)I_n\\
\end{aligned}
$$
综上所述,我们可以得到一组递推关系 $I_n = \frac{n-1}{n}I_{n-2}$ ,再根据递推数列的奇偶首项就可以证明Wallis Formula了。