主題
Search

牛頓-柯特斯公式


牛頓-柯特斯公式是一類極其有用且直接的數值積分技術。

要對函式 f(x) 在區間 [a,b] 上積分,將其分成 n 等份,使得 f_n=f(x_n)h=(b-a)/n。然後找到逼近列表函式的多項式,並對它們進行積分以逼近曲線下的面積。要找到擬合多項式,請使用拉格朗日插值多項式。所得公式稱為牛頓-柯特斯公式,或求積公式。

如果區間 [x_1,x_n] 包含在擬閤中,則牛頓-柯特斯公式可以是“閉型”的;如果使用點 [x_2,x_(n-1)],則是“開型”的;或者是這兩者的變體。如果公式使用 n 個點(閉型或開型),則項的係數之和為 n-1

如果函式 f(x) 是顯式給出的,而不是簡單地在值 x_i 處列表,則最佳的數值積分方法稱為高斯求積。透過選擇對函式進行取樣的區間,此過程產生更精確的近似值(但實現起來要複雜得多)。

TrapezoidalRule

2 點閉型牛頓-柯特斯公式稱為梯形法則,因為它透過一個具有水平底邊和傾斜頂部的梯形(連線端點 x_1x_2)來近似曲線下的面積。如果第一個點是 x_1,則另一個端點將位於

x_2=x_1+h,
(1)

並且透過點 (x_1,f_1)(x_2,f_2)拉格朗日插值多項式

P_2(x)=(x-x_2)/(x_1-x_2)f_1+(x-x_1)/(x_2-x_1)f_2
(2)
=(x-x_1-h)/(-h)f_1+(x-x_1)/hf_2
(3)
=x/h(f_2-f_1)+(f_1+(x_1)/hf_1-(x_1)/hf_2).
(4)

在區間上積分(即,找到梯形的面積)然後給出

int_(x_1)^(x_2)f(x)dx=int_(x_1)^(x_1+h)P_2(x)dx
(5)
=1/(2h)(f_2-f_1)[x^2]_(x_1)^(x_2)+(f_1+(x_1)/hf_1-(x_1)/hf_2)[x]_(x_1)^(x_2)
(6)
=1/(2h)(f_2-f_1)(x_2+x_1)(x_2-x_1)+(x_2-x_1)(f_1+(x_1)/hf_1-(x_1)/hf_2)
(7)
=1/2(f_2-f_1)(2x_1+h)+f_1h+x_1(f_1-f_2)
(8)
=x_1(f_2-f_1)+1/2h(f_2-f_1)+hf_1-x_1(f_2-f_1)
(9)
=1/2h(f_1+f_2)-1/(12)h^3f^('')(xi).
(10)

這是梯形法則(Ueberhuber 1997, p. 100),最後一項給出誤差量(由於 x_1<=xi<=x_2,因此不比此範圍內 f^('')(xi) 的最大值更差)。

3 點規則稱為辛普森法則。橫座標是

x_2=x_1+h
(11)
x_3=x_1+2h
(12)

並且拉格朗日插值多項式

P_3(x)=((x-x_2)(x-x_3))/((x_1-x_2)(x_1-x_3))f_1+((x-x_1)(x-x_3))/((x_2-x_1)(x_2-x_3))f_2+((x-x_1)(x-x_2))/((x_3-x_1)(x_3-x_2))f_3
(13)
=(x^2-x(x_2+x_3)+x_2x_3)/(h(2h))f_1+(x^2-x(x_1+x_3)+x_1x_3)/(h(-h))f_2+(x^2-x(x_1+x_2)+x_1x_2)/(2h(h))f_3
(14)
=1/(h^2){x^2(1/2f_1-f_2+1/2f_3)+x[-1/2(2x_1+3h)f_1+(2x_1+2h)f_2-1/2(2x_1+h)f_3]+[1/2(x_1+h)(x_1+2h)f_1-x_1(x_1+2h)f_2+1/2x_1(x_1+h)f_3]}.
(15)

積分和簡化後得到

 int_(x_1)^(x_3)f(x)dx=int_(x_1)^(x_1+2h)P_3(x)dx=1/3h(f_1+4f_2+f_3)-1/(90)h^5f^((4))(xi)
(16)

(Ueberhuber 1997, p. 100)。

4 點閉型規則是辛普森 3/8 法則

 int_(x_1)^(x_4)f(x)dx=3/8h(f_1+3f_2+3f_3+f_4)-3/(80)h^5f^((4))(xi)
(17)

(Ueberhuber 1997, p. 100)。5 點閉型規則是布林法則

 int_(x_1)^(x_5)f(x)dx=2/(45)h(7f_1+32f_2+12f_3+32f_4+7f_5)-8/(945)h^7f^((6))(xi)
(18)

(Abramowitz and Stegun 1972, p. 886)。更高階的規則包括 6 點

 int_(x_1)^(x_6)f(x)dx=5/(288)h(19f_1+75f_2+50f_3+50f_4+75f_5+19f_6)-(275)/(12096)h^7f^((6))(xi),
(19)

7 點

 int_(x_1)^(x_7)f(x)dx=1/(140)h(41f_1+216f_2+27f_3+272f_4 
 +27f_5+216f_6+41f_7)-9/(1400)h^9f^((8))(xi),
(20)

8 點

 int_(x_1)^(x_8)f(x)dx=7/(17280)h(751f_1+3577f_2+1323f_3+2989f_4+2989f_5+1323f_6+3577f_7+751f_8)-(8183)/(518400)h^9f^((8))(xi),
(21)

9 點

 int_(x_1)^(x_9)f(x)dx=4/(14175)h(989f_1+5888f_2-928f_3+10496f_4-4540f_5+10496f_6-928f_7+5888f_8+989f_9)-(2368)/(467775)h^(11)f^((10))(xi)
(22)

(Ueberhuber 1997, p. 100), 10 點

 int_(x_1)^(x_(10))f(x)dx=9/(89600)h[2857(f_1+f_(10))+15741(f_2+f_9)+1080(f_3+f_8)+19344(f_4+f_7)+5778(f_5+f_6)]-(173)/(14620)h^(11)f^((10))(xi),
(23)

和 11 點

 int_(x_1)^(x_(11))f(x)dx=5/(299376)h[16067(f_1+f_(11))+106300(f_2+f_(10))-48525(f_3+f_9)+272400(f_4+f_8)-260550(f_5+f_7)+427368f_6]-(1346350)/(326918592)h^(13)f^((12))(xi)
(24)

規則。

一般來說,n 點規則由解析表示式給出

 int_(x_1)^(x_n)f(x)dx=hsum_(i=1)^nH_(n,i)f_i,
(25)

其中

 H_(n,r+1)=((-1)^(n-r))/(r!(n-r)!)int_0^nt(t-1)...(t-r+1)(t-r-1)...(t-n)dt
(26)

(Whittaker and Robinson 1967, p. 154)。這給出了下表所示的係數三角形(OEIS A093735A093736)。

n\r012345
11/21/2
21/34/31/3
33/89/89/83/8
4(14)/(45)(64)/(45)8/(15)(64)/(45)(14)/(45)
5(95)/(288)(125)/(96)(125)/(144)(125)/(144)(125)/(96)(95)/(288)

注意

 sum_(r=0)^nH_(n,r+1)=n,
(27)

閉型“擴充套件”規則使用較低階閉型規則的多個副本,以構建更高階的規則。透過適當地調整此過程,可以構建具有特別良好屬性的規則。對於 n 個列表點,使用梯形法則 (n-1) 次並新增結果得到

 int_(x_1)^(x_n)f(x)dx=(int_(x_1)^(x_2)+int_(x_2)^(x_3)+...+int_(x_(n-1))^(x_n))f(x)dx 
=1/2h[(f_1+f_2)+(f_2+f_3)+...+(f_(n-2)+f_(n-1))+(f_(n-1)+f_n)] 
=h(1/2f_1+f_2+f_3+...+f_(n-2)+f_(n-1)+1/2f_n)-1/(12)nh^3f^('')(xi)
(28)

(Ueberhuber 1997, p. 107)。在擴充套件梯形法則上使用一系列改進給出了稱為龍貝格積分的方法。對於奇數 n,3 點擴充套件規則是

 int_(x_1)^(x_n)f(x)dx=h[(1/3f_1+4/3f_2+1/3f_3)+(1/3f_3+4/3f_4+1/3f_5)+...+(1/3f_(n-4)+4/3f_(n-3)+1/3f_(n-2))+(1/3f_(n-2)+4/3f_(n-1)+1/3f_n)] 
=1/3h(f_1+4f_2+2f_3+4f_4+2f_5+...+4f_(n-1)+f_n)-(n-1)/21/(90)h^5f^((4))(xi).
(29)

應用辛普森 3/8 法則,然後兩次應用辛普森法則(3 點),並相加得到

 [int_(x_1)^(x_4)+int_(x_4)^(x_6)+int_(x_6)^(x_8)]f(x)dx 
=h[(3/8f_1+9/8f_2+9/8f_3+3/8f_4)+(1/3f_4+4/3f_5+1/3f_6)+(1/3f_6+4/3f_7+1/3f_8)] 
=h[3/8f_1+9/8f_2+9/8f_3+(3/8+1/3)f_4+4/3f_5+(1/3+1/3)f_6+4/3f_7+1/3f_8] 
=h(3/8f_1+9/8f_2+9/8f_3+(17)/(24)f_4+4/3f_5+2/3f_6+4/3f_7+1/3f_8).
(30)

接下來取辛普森 3/8 步得到

 int_(x_8)^(x_(11))f(x)dx=h(3/8f_8+9/8f_9+9/8f_(10)+3/8f_(11)).
(31)

與之前的結果結合得到

 int_(x_1)^(x_(11))f(x)dx=h[3/8f_1+9/8f_2+9/8f_3+(17)/(24)f_4+4/3f_5+2/3f_6+4/3f_7+(1/3+3/8)f_8+9/8f_9+9/8f_(10)+3/8f_(11)] 
=h(3/8f_1+9/8f_2+9/8f_3+(17)/(24)f_4+4/3f_5+2/3f_6+4/3f_7+(17)/(24)f_8+9/8f_9+9/8f_(10)+3/8f_(11)),
(32)

其中直到 f_(10) 的項現在已完全確定。繼續得到

 h(3/8f_1+9/8f_2+9/8f_3+(17)/(24)f_4+4/3f_5+2/3f_6+...+2/3f_(n-5)+4/3f_(n-4)+(17)/(24)f_(n-3)+9/8f_(n-2)+9/8f_(n-1)+3/8f_n).
(33)

現在與 3 點結果平均

 h(1/3f_1+4/3f_2+2/3f_3+4/3f_4+2/3f_5+4/3f_(n-1)+1/3f_n)
(34)

得到

 h[(17)/(48)f_1+(59)/(48)f_2+(43)/(48)f_3+(49)/(48)f_4+(f_5+f_6+...+f_(n-5)+f_(n-4))+(49)/(48)f_(n-3)+(43)/(48)f_(n-2)+(59)/(48)f_(n-1)+(17)/(48)f_n]+O(n^(-4)).
(35)

請注意,所有中間項現在都具有單位係數。同樣,將 3 點規則與 (2+3) 點規則結合得到

 h(5/(12)f_1+(13)/(12)f_2+f_3+f_4+...+f_(n-3)+f_(n-2)+(13)/(12)f_(n-1)+5/(12)f_n)+O(n^(-3)).
(36)

其他偶爾遇到的牛頓-柯特斯規則包括杜蘭德法則

 int_(x_1)^(x_n)f(x)dx=h(2/5f_1+(11)/(10)f_2+f_3+...+f_(n-2)+(11)/(10)f_(n-1)+2/5f_n)
(37)

(Beyer 1987), 哈迪法則

 int_(x_0-3h)^(x_0+3h)f(x)dx=1/(100)h(28f_(-3)+162f_(-2)+22f_0+162f_2+28f_3) 
 +9/(1400)h^7[2f^((4))(xi_2)-h^2f^((8))(xi_1)],
(38)

韋德爾法則

 int_(x_1)^(x_7)f(x)dx=3/(10)h(f_1+5f_2+f_3+6f_4+f_5+5f_6+f_7)
(39)

(Beyer 1987)。

開型牛頓-柯特斯規則使用積分割槽間外的點,產生 1 點

 int_(x_0)^(x_2)f(x)dx=2hf_1,
(40)

2 點

int_(x_0)^(x_3)f(x)dx=int_(x_1-h)^(x_1+2h)P_2(x)dx
(41)
=1/(2h)(f_2-f_1)[x^2]_(x_1-h)^(x_1+2h)+(f_1+(x_1)/hf_1-(x_1)/hf_2)[x]_(x_1-h)^(x_1+2h)
(42)
=3/2h(f_1+f_2)+1/4h^3f^('')(xi),
(43)

3 點

 int_(x_0)^(x_4)f(x)dx=4/3h(2f_1-f_2+2f_3)+(28)/(90)h^5f^((4))(xi),
(44)

4 點

 int_(x_0)^(x_5)f(x)dx=5/(24)h(11f_1+f_2+f_3+11f_4)+(95)/(144)h^5f^((4))(xi),
(45)

5 點

 int_(x_0)^(x_6)f(x)dx=6/(20)h(11f_1-14f_2+26f_3-14f_4+11f_5)-(41)/(140)h^7f^((6))(xi),
(46)

6 點

 int_(x_0)^(x_7)f(x)dx=7/(1440)h(611f_1-453f_2+562f_3+562f_4-453f_5+611f_6)-(5257)/(8640)h^7f^((6))(xi),
(47)

和 7 點

 int_(x_0)^(x_8)f(x)dx=8/(945)h(460f_1-954f_2+2196f_3-2459f_4+2196f_5-954f_6+460f_7)-(3956)/(14175)h^9f^((8))(xi)
(48)

規則。

2 點開型擴充套件公式是

 int_(x_1)^(x_n)f(x)dx=h[(1/2f_1+f_2+...+f_(n-1)+1/2f_n)+1/(24)(-f_0+f_2+f_(n-1)-f_(n+1))]+(11(n+1))/(720)h^5f^((4))(xi).
(49)

單區間外推規則基於區間周圍的點估計區間內的積分。這種規則的一個例子是

hf_1+O(h^2f^')
(50)
1/2h(3f_1-f_2)+O(h^3f^(''))
(51)
1/(12)h(23f_1-16f_2+5f_3)+O(h^4f^((3)))
(52)
1/(24)h(55f_1-59f_2+37f_3-9f_4)+O(h^5f^((4))).
(53)

另請參閱

布林法則, 差分方程, 杜蘭德法則, 有限差分, 高斯求積, 哈迪法則, 拉格朗日插值多項式, 數值積分, 肖維爾頓法則, 辛普森法則, 辛普森 3/8 法則, 梯形法則, 韋德爾法則, 伍爾豪斯公式

使用 探索

參考文獻

Abramowitz, M. and Stegun, I. A. (Eds.). "Integration." §25.4 in 數學函式手冊,包含公式、圖表和數學表格,第 9 版。 New York: Dover, pp. 885-887, 1972.Beyer, W. H. (Ed.). CRC 標準數學表格,第 28 版。 Boca Raton, FL: CRC Press, p. 127, 1987.Corbit, D. "Numerical Integration: From Trapezoids to RMS: Object-Oriented Numerical Integration." Dr. Dobb's J., No. 252, 117-120, Oct. 1996.Daniell, P. J. "Remainders in Interpolation and Quadrature Formulae." Math. Gaz. 24, 238, 1940.Fornberg, B. "Calculation of Weights in Finite Difference Formulas." SIAM Rev. 40, 685-691, 1998.Hildebrand, F. B. 數值分析導論。 New York: McGraw-Hill, pp. 160-161, 1956.Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Classical Formulas for Equally Spaced Abscissas." §4.1 in FORTRAN 數值秘籍:科學計算的藝術,第 2 版。 Cambridge, England: Cambridge University Press, pp. 124-130, 1992.Sloane, N. J. A. Sequences A093735 and A093736 in "The On-Line Encyclopedia of Integer Sequences."Ueberhuber, C. W. 數值計算 2:方法、軟體和分析。 Berlin: Springer-Verlag, 1997.Whittaker, E. T. and Robinson, G. "The Newton-Cotes Formulae of Integration." §76 in 觀測微積分:數值數學專著,第 4 版。 New York: Dover, pp. 152-156, 1967.

在 中被引用

牛頓-柯特斯公式

引用為

Weisstein, Eric W. “牛頓-柯特斯公式”。來自 Web 資源。 https://mathworld.tw/Newton-CotesFormulas.html

主題分類