主題
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.tw/SimpsonsRule.html

主題分類