R=6371; h=439; H=2384; c=(H-h)/2;a=(H+h+2*R);f=a*sqrt(1-((c/a)^2)*(sin(x))^2);求出x在0到pi/2的simpson积分
时间: 2024-06-03 09:07:28 浏览: 65
由题意可知,需要求解的积分为:
$$
\int_0^{\frac{\pi}{2}}f(x)dx
$$
其中,$f(x)=a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2x}$。
根据 Simpson 积分公式,将积分区间 $[0,\frac{\pi}{2}]$ 均分成 $n$ 个小区间,每个小区间的宽度为 $h=\frac{\frac{\pi}{2}-0}{n}=\frac{\pi}{2n}$,则有:
$$
\int_0^{\frac{\pi}{2}}f(x)dx \approx \frac{h}{3}\left(f(0)+4f(h)+2f(2h)+4f(3h)+\cdots+2f((n-2)h)+4f((n-1)h)+f\left(\frac{\pi}{2}\right)\right)
$$
将 $f(x)$ 带入上式,得到:
$$
\begin{aligned}
&\int_0^{\frac{\pi}{2}}f(x)dx \\
\approx &\frac{h}{3}\left(a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 0}+4a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 h}+2a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 2h}+\cdots+2a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 (n-2)h}+4a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 (n-1)h}+a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2 \frac{\pi}{2}}\right) \\
=&\frac{\pi}{6n}\left(a\sqrt{1-\left(\frac{c}{a}\right)^2}+4a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2\frac{\pi}{2n}}+2a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2\frac{2\pi}{2n}}+\cdots+2a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2\frac{(n-2)\pi}{2n}}+4a\sqrt{1-\left(\frac{c}{a}\right)^2\sin^2\frac{(n-1)\pi}{2n}}+a\right)
\end{aligned}
$$
将 $R=6371$、$h=439$、$H=2384$、$c=\frac{H-h}{2}=972.5$、$a=\sqrt{H^2+h^2+2Hh}-R=1964.26$ 带入上式,得到:
$$
\begin{aligned}
&\int_0^{\frac{\pi}{2}}f(x)dx \\
\approx &\frac{\pi}{6n}\left(1964.26\sqrt{1-\left(\frac{972.5}{1964.26}\right)^2}+4\cdot 1964.26\sqrt{1-\left(\frac{972.5}{1964.26}\right)^2\sin^2\frac{\pi}{2n}}+2\cdot 1964.26\sqrt{1-\left(\frac{972.5}{1964.26}\right)^2\sin^2\frac{2\pi}{2n}}+\cdots+2\cdot 1964.26\sqrt{1-\left(\frac{972.5}{1964.26}\right)^2\sin^2\frac{(n-2)\pi}{2n}}+4\cdot 1964.26\sqrt{1-\left(\frac{972.5}{1964.26}\right)^2\sin^2\frac{(n-1)\pi}{2n}}+1964.26\right)
\end{aligned}
$$
因此,只需要根据设定的 $n$ 带入上式即可求解 Simpson 积分的近似值。
阅读全文