沃利斯积分公式是求解形如 ∫ 0 π 2 sin n x d x \int_0^{\frac\pi2}\sin^nx\text{d}x ∫02πsinnxdx这种积分的公式。
一、正弦函数( sin \sin sin)的沃利斯公式
记
I
n
=
∫
0
π
2
sin
n
x
d
x
I_n=\int_0^{\frac\pi2}\sin^nx\text{d}x
In=∫02πsinnxdx。当
n
≥
2
n\ge2
n≥2时,应用凑微分和分部积分得
I
n
=
∫
0
π
2
sin
n
x
d
x
=
−
∫
0
π
2
sin
n
−
1
x
d
(
cos
x
)
=
−
[
sin
n
−
1
x
cos
x
∣
0
π
2
−
∫
0
π
2
cos
x
d
(
sin
n
−
1
x
)
]
=
−
[
sin
n
−
1
x
cos
x
∣
0
π
2
−
(
n
−
1
)
∫
0
π
2
cos
2
x
sin
n
−
2
x
d
x
]
=
−
[
0
−
0
−
(
n
−
1
)
∫
0
π
2
(
1
−
sin
2
x
)
sin
n
−
2
x
d
x
]
=
−
(
n
−
1
)
[
−
∫
0
π
2
sin
n
−
2
x
d
x
+
∫
0
π
2
sin
n
x
d
x
]
=
(
n
−
1
)
I
n
−
2
−
(
n
−
1
)
I
n
\begin{aligned}I_n&=\int_0^{\frac\pi2}\sin^nx\text{d}x=-\int_0^{\frac\pi2}\sin^{n-1}x\text{d}(\cos x)\\&=-\left[\left.\sin^{n-1}x\cos x\right|_0^{\frac\pi2}-\int_0^{\frac\pi2}\cos x\text{d}(\sin^{n-1}x)\right]\\&=-\left[\left.\sin^{n-1}x\cos x\right|_0^{\frac\pi2}-(n-1)\int_0^{\frac\pi2}\cos^2x\sin^{n-2}x\text{d}x\right]\\&=-\left[0-0-(n-1)\int_0^{\frac\pi2}(1-\sin^2x)\sin^{n-2}x\text{d}x\right]\\&=-(n-1)\left[-\int_0^{\frac\pi2}\sin^{n-2}x\text{d}x+\int_0^{\frac\pi2}\sin^nx\text{d}x\right]\\&=(n-1)I_{n-2}-(n-1)I_n\end{aligned}
In=∫02πsinnxdx=−∫02πsinn−1xd(cosx)=−[sinn−1xcosx∣∣02π−∫02πcosxd(sinn−1x)]=−[sinn−1xcosx∣∣02π−(n−1)∫02πcos2xsinn−2xdx]=−[0−0−(n−1)∫02π(1−sin2x)sinn−2xdx]=−(n−1)[−∫02πsinn−2xdx+∫02πsinnxdx]=(n−1)In−2−(n−1)In即
I
n
=
(
n
−
1
)
I
n
−
2
−
(
n
−
1
)
I
n
I_n=(n-1)I_{n-2}-(n-1)I_n
In=(n−1)In−2−(n−1)In
n
I
n
=
(
n
−
1
)
I
n
−
2
nI_n=(n-1)I_{n-2}
nIn=(n−1)In−2
I
n
=
n
−
1
n
I
n
−
2
I_n=\frac{n-1}{n}I_{n-2}
In=nn−1In−2当
n
n
n为奇数时,
I
n
=
n
−
1
n
I
n
−
2
=
n
−
1
n
⋅
n
−
3
n
−
2
I
n
−
4
=
⋯
=
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
2
3
I
1
I_n=\frac{n-1}{n}I_{n-2}=\frac{n-1}{n}\cdot\frac{n-3}{n-2}I_{n-4}=\cdots=\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac23I_1
In=nn−1In−2=nn−1⋅n−2n−3In−4=⋯=nn−1⋅n−2n−3⋅⋯⋅32I1其中
I
1
=
∫
0
π
2
sin
x
d
x
=
−
cos
x
∣
0
π
2
=
1
I_1=\int_0^{\frac{\pi}{2}}\sin x\text{d}x=-\left.\cos x\right|_0^{\frac\pi2}=1
I1=∫02πsinxdx=−cosx∣02π=1,故此时
I
n
=
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
2
3
I_n=\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac23
In=nn−1⋅n−2n−3⋅⋯⋅32;
当
n
n
n为偶数时,
I
n
=
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
1
2
I
0
I_n=\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac12I_0
In=nn−1⋅n−2n−3⋅⋯⋅21I0而
∫
0
π
2
sin
0
x
d
x
=
∫
0
π
2
d
x
=
π
2
\int_0^{\frac\pi2}\sin^0x\text{d}x=\int_0^{\frac\pi2}\text{d}x=\frac\pi2
∫02πsin0xdx=∫02πdx=2π,故此时
I
n
=
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
1
2
⋅
π
2
I_n=\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac12\cdot\frac\pi2
In=nn−1⋅n−2n−3⋅⋯⋅21⋅2π。
综上所述,
I
n
=
{
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
2
3
,
n
为奇数,
n
−
1
n
⋅
n
−
3
n
−
2
⋅
⋯
⋅
1
2
⋅
π
2
,
n
为偶数。
I_n=\begin{cases}\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac23,\quad&n\text{为奇数,}\\\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac12\cdot\frac\pi2,\quad&n\text{为偶数。}\end{cases}
In={nn−1⋅n−2n−3⋅⋯⋅32,nn−1⋅n−2n−3⋅⋯⋅21⋅2π,n为奇数,n为偶数。记忆时,我们只需牢记递推公式
I
n
=
n
−
1
n
I
n
−
2
I_n=\frac{n-1}{n}I_{n-2}
In=nn−1In−2即可。
二、余弦函数( cos \cos cos)的沃利斯公式
在 I n = ∫ 0 π 2 sin n x d x I_n=\int_0^{\frac\pi2}\sin^nx\text{d}x In=∫02πsinnxdx中,令 u = π 2 − x u=\frac\pi2-x u=2π−x,则 cos u = sin x \cos u=\sin x cosu=sinx, d u = − d x \text{d}u=-\text{d}x du=−dx, I n = ∫ π 2 0 cos n u ⋅ − d u = ∫ 0 π 2 cos n u d u I_n=\int_\frac\pi2^0\cos^n u\cdot-\text{d}u=\int_0^{\frac\pi2}\cos^nu\text{d}u In=∫2π0cosnu⋅−du=∫02πcosnudu所以余弦函数和正弦函数的公式是完全一样的: I n = ∫ 0 π 2 sin n x d x = ∫ 0 π 2 cos n x d x = { n − 1 n ⋅ n − 3 n − 2 ⋅ ⋯ ⋅ 2 3 , n 为奇数, n − 1 n ⋅ n − 3 n − 2 ⋅ ⋯ ⋅ 1 2 ⋅ π 2 , n 为偶数。 I_n=\int_0^{\frac\pi2}\sin^nx\text{d}x=\int_0^{\frac\pi2}\cos^nx\text{d}x=\begin{cases}\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac23,\quad&n\text{为奇数,}\\\frac{n-1}{n}\cdot\frac{n-3}{n-2}\cdot\cdots\cdot\frac12\cdot\frac\pi2,\quad&n\text{为偶数。}\end{cases} In=∫02πsinnxdx=∫02πcosnxdx={nn−1⋅n−2n−3⋅⋯⋅32,nn−1⋅n−2n−3⋅⋯⋅21⋅2π,n为奇数,n为偶数。
三、扩展到 0 ∼ π 0\sim\pi 0∼π的情况
对于
∫
0
π
sin
n
x
d
x
\int_0^\pi\sin^nx\text{d}x
∫0πsinnxdx,因为
sin
x
\sin x
sinx关于
x
=
π
2
x=\frac\pi2
x=2π对称,所以
∫
0
π
sin
n
x
d
x
=
2
∫
0
π
2
sin
n
x
d
x
=
2
I
n
\int_0^\pi\sin^nx\text{d}x=2\int_0^\frac\pi2\sin^nx\text{d}x=2I_n
∫0πsinnxdx=2∫02πsinnxdx=2In。
对于
∫
0
π
cos
n
x
d
x
\int_0^\pi\cos^nx\text{d}x
∫0πcosnxdx:
(1) 当
n
n
n为奇数时,
cos
n
x
\cos^nx
cosnx在
x
=
π
2
x=\frac\pi2
x=2π两边互为相反数,所以积分值为
0
0
0;
(2) 当
n
n
n为偶数时,
cos
n
x
\cos^nx
cosnx关于
x
=
π
2
x=\frac\pi2
x=2π对称,所以
∫
0
π
cos
n
x
d
x
=
2
∫
0
π
2
cos
n
x
d
x
\int_0^\pi\cos^nx\text{d}x=2\int_0^\frac\pi2\cos^nx\text{d}x
∫0πcosnxdx=2∫02πcosnxdx。