主题
Search

辛普森法则


辛普森法则是一个 牛顿-柯特斯公式,用于使用 二次多项式(即抛物线弧线,而不是梯形法则中使用的直线段)逼近函数 f 的积分。辛普森法则可以通过对拟合在三个等距点的函数的三阶 拉格朗日插值多项式进行积分来推导。 特别地,设函数 f 在点 x_0x_1x_2 处以距离 h 等距列表,并记 f_n=f(x_n)。那么辛普森法则指出

int_(x_0)^(x_2)f(x)dx=int_(x_0)^(x_0+2h)f(x)dx
(1)
 approx 1/3h(f_0+4f_1+f_2).
(2)

由于它使用二次多项式来逼近函数,因此辛普森法则在逼近三次或更低次多项式的积分时实际上给出了精确的结果。

SimpsonsRule

例如,考虑区间 [0,pi/2] 上的 f(x)=sinx(黑色曲线),这样 f(x_0=0)=0f(x_1=pi/4)=1/sqrt(2)f(x_2=pi/2)=1。那么辛普森法则(对应于从三阶插值多项式获得的蓝色曲线下的面积)给出

int_0^(pi/2)sinxdx approx 1/3(1/4pi)(0+4/sqrt(2)+1)
(3)
=1/(12)(1+2sqrt(2))pi
(4)
 approx 1.00228,
(5)

梯形法则(红色曲线下的面积)给出 pi/4 approx 0.785398,而实际答案是 1。

以精确形式,

int_(x_0)^(x_2)f(x)dx=1/3h(f_0+4f_1+f_2)+1/6int_(x_0)^(x_1)(x_0-t)^2(x_1-t)f^((3))(t)dt+1/6int_(x_1)^(x_2)(x_2-t)^2(x_1-t)f^((3))(t)dt
(6)
=1/3h(f_0+4f_1+f_2)+R_n,
(7)

其中余项可以写成

 R_n=1/(90)h^5f^((4))(x^*),
(8)

其中 x^* 是区间 [x_0,x_2]x 的某个值。

该法则的扩展版本可以写成用于在 x_0x_1、 ...、 x_(2n) 处列表的 f(x) 如下

 int_(x_0)^(x_(2n))f(x)dx=1/3h[f_0+4(f_1+f_3+...+f_(2n-1)) 
 +2(f_2+f_4+...+f_(2n-2))+f_(2n)]-R_n,
(9)

其中余项是

 R_n=(nh^5)/(90)f^((4))(x^*)
(10)

对于某些 x^* in [x_0,x_(2n)]x^* in [x_0,x_(2n)] 中。


另请参阅

布尔法则, 牛顿-柯特斯公式, 辛普森 3/8 法则, 梯形法则

使用 探索

参考文献

Abramowitz, M. and Stegun, I. A. (编). Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, p. 886, 1972.Horwitz, A. "A Version of Simpson's Rule for Multiple Integrals." J. Comput. Appl. Math. 134, 1-11, 2001.Jeffreys, H. and Jeffreys, B. S. Methods of Mathematical Physics, 3rd ed. Cambridge, England: Cambridge University Press, p. 286, 1988.Trott, M. The Mathematica GuideBook for Programming. New York: Springer-Verlag, p. 105, 2004. http://www.mathematicaguidebooks.org/.Whittaker, E. T. and Robinson, G. "The Trapezoidal and Parabolic Rules." The Calculus of Observations: A Treatise on Numerical Mathematics, 4th ed. New York: Dover, pp. 156-158, 1967.

请引用本文为

Eric W. Weisstein "辛普森法则。" 来自 Web 资源。 https://mathworld.net.cn/SimpsonsRule.html

主题分类