沃利斯积分公式是求解形如 ∫ 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 n2时,应用凑微分和分部积分得 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πsinn1xd(cosx)=[sinn1xcosx02π02πcosxd(sinn1x)]=[sinn1xcosx02π(n1)02πcos2xsinn2xdx]=[00(n1)02π(1sin2x)sinn2xdx]=(n1)[02πsinn2xdx+02πsinnxdx]=(n1)In2(n1)In I n = ( n − 1 ) I n − 2 − ( n − 1 ) I n I_n=(n-1)I_{n-2}-(n-1)I_n In=(n1)In2(n1)In n I n = ( n − 1 ) I n − 2 nI_n=(n-1)I_{n-2} nIn=(n1)In2 I n = n − 1 n I n − 2 I_n=\frac{n-1}{n}I_{n-2} In=nn1In2 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=nn1In2=nn1n2n3In4==nn1n2n332I1其中 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=cosx02π=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=nn1n2n332
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=nn1n2n321I0 ∫ 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=nn1n2n3212π
综上所述, 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={nn1n2n332,nn1n2n3212π,n为奇数,n为偶数。记忆时,我们只需牢记递推公式 I n = n − 1 n I n − 2 I_n=\frac{n-1}{n}I_{n-2} In=nn1In2即可。

二、余弦函数( 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π0cosnudu=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={nn1n2n332,nn1n2n3212π,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=202π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=202πcosnxdx

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐