查看“︁牛頓-寇次公式”︁的源代码
←
牛頓-寇次公式
跳转到导航
跳转到搜索
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{NoteTA |T=zh-hans:牛顿-柯特斯公式; zh-hant:牛頓-寇次公式; |1=zh-hans:牛顿-柯特斯公式; zh-hant:牛頓-寇次公式; |2=zh-hans:辛普森; zh-hant:辛卜生; }} 在[[數值分析]]上,'''梯形法則'''和'''辛卜生法則'''均是[[數值積分]]的方法。它們都是計算[[定積分]]的。 這兩種方法都屬於'''牛頓-寇次公式'''。它們以函數於<span style="text-decoration: underline;">等距</span><math>n+1</math>點的值,取得一個<math>n</math>次的[[多項式]]來近似原來的函數,再行求積。 == 梯形法則 == [[File:Trapezoidal rule illustration.png|thumb|原函數(藍色)近似為紅色的線性函數]] [[File:Composite trapezoidal rule illustration.png|thumb|多重梯形法則]]{{Main|梯形公式}}'''梯形法則'''是: :<math> \int_{a}^{b} f(x)\, dx \approx (b-a)\frac{f(a) + f(b)}{2}.</math> 這等同將被積函數近似為[[直線]]函數,被積的部分近似為[[梯形]]。 要求得較準確的數值,可以將要求積的區間分成多個小區間,再個別估計,即: :<math>\int_a^b f(x)\,dx \approx \frac{b-a}{n} \left( {f(a) + f(b) \over 2} + \sum_{k=1}^{n-1} f \left( a+k \frac{b-a}{n} \right) \right).</math> 可改寫成 :<math>\int_a^b f(x)\,dx \approx \frac{b-a}{2n} \left(f(x_0) + 2f(x_1) + 2f(x_2)+\cdots+2f(x_{n-1}) + f(x_n) \right)</math> 其中 : 對<math>k=0, 1, \dots, n</math>,<math>x_k=a+k \frac{b-a}{n},</math>。 == 辛普森法则 == {{main|辛普森積分法}} '''辛普森法则'''(Simpson's rule,又稱'''森遜法則''')是: :<math> \int_{a}^{b} f(x) \, dx \approx \frac{b-a}{6}\left[f(a) + 4f\left(\frac{a+b}{2}\right)+f(b)\right].</math> 同樣地,辛普森法则也有多重的版本: :<math>\int_a^b f(x) \, dx\approx \frac h3 \cdot \left[ f(x_0)+2\sum_{k=1}^{n-1}f(x_k)+4\sum_{k=1}^{n}f \left( \frac{x_{k-1}+x_k}2 \right)+ f(x_n) \right]</math> :<math>h = \frac{b-a}{n}, \ x_k=a+k\cdot h.</math> 或寫成 :<math>\int_a^b f(x) \, dx\approx \frac{h}{3}\bigg[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+2f(x_4)+\cdots+4f(x_{n-1})+f(x_n)\bigg]</math> == 牛頓-寇次公式 == 牛頓-寇次公式(Newton-Cotes rule / Newton-Cotes formula)以Roger Cotes和[[艾薩克·牛頓]]命名。其內容是: <math>\int_a^b f(x) \,dx \approx \sum_{i=0}^n w_i\, f(x_i)</math> 其中對<math>k=0, 1, \dots, n</math>,<math>w_i</math>是常數(由<math>n</math>的值決定),<math>x_k=a+k \frac{b-a}{n}</math>。 梯形法則和辛卜生法則便是<math>n=1,2</math>的情況。 亦有不採用在邊界點來估計的版本,即取 <math>x_k = a + k \frac{b-a}{n+1}</math> 。 === 原理 === *假設已知<math>f(x_0),f(x_1),\dots , f(x_n)</math>的值。 *以<math>n+1</math>點進行[[插值]],求得對應<math>f(x)</math>的[[拉格朗日多項式]]。 *對該<math>n</math>次的多項式求積。 該積分便可以作為<math>\int_a^b f(x) \, dx</math>的近似,而由於該拉格朗日多項式的係數都是常數(由<math>n</math>決定其值),所以積函數的係數(即<math>w_i</math>)都是常數。 === 缺點 === 對於次數較高的多項式而有很大誤差([[龍格現象]]),不如[[高斯求積|高斯積分法]]。 === 例子 === 下表中<math>f_i=f(x_i)</math>,<math>\xi \in [a,b]</math>,<math>h=b-a</math> {| class="wikitable" style="margin:1em auto 1em auto; background:white; text-align:center" ! 精度 !! 名稱 !! 公式 !! 誤差 |- | 1 || 梯形法則 || <math> \frac{h}{2} (f_0 + f_1) </math> || <math>-\frac{2h^3}{3}\,f^{(2)}(\xi)</math> |- | 2 || 辛卜生法則 || <math> \frac{h}{6} (f_0 + 4 f_1 + f_2) </math> || <math>-\frac{h^5}{90}\,f^{(4)}(\xi)</math> |- | 3 || 辛卜生3/8法則<br />辛卜生第二法則 || <math> \frac{h}{8} (f_0 + 3 f_1 + 3 f_2 + f_3) </math> || <math>-\frac{3h^5}{80}\,f^{(4)}(\xi)</math> |- | 4 || 保爾法則<br />(Boole's rule<br />/ Bode's rule) || <math> \frac{2h}{45} (7 f_0 + 32 f_1 + 12 f_2 + 32 f_3 + 7 f_4) </math> || <math>-\frac{8h^7}{945}\,f^{(6)}(\xi)</math> |- ! colspan="4" | 不用界點的 |- | 0 || 中點法 || <math>2 h f_1\,</math> || <math>\frac{h^3}{24}\,f^{(2)}(\xi)</math> |- | 1 || || <math> \frac{3h}{2} (f_1 + f_2) </math> || <math> \frac{h^3}{4}\,f^{(2)}(\xi) </math> |- | 2 || || <math> \frac{4h}{3} (2 f_1 - f_2 + 2 f_3) </math> || <math> \frac{28h^5}{90}f^{(4)}(\xi) </math> |- | 3 || || <math> \frac{5h}{24} (11 f_1 + f_2 + f_3 + 11 f_4) </math> || <math> \frac{95h^5}{144}f^{(4)}(\xi) </math> |} == 參考 == * M. Abramowitz and I. A. Stegun, eds. ''Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables''. New York: Dover, 1972. ''(See Section 25.4.)'' * George E. Forsythe, Michael A. Malcolm, and Cleve B. Moler. ''Computer Methods for Mathematical Computations''. Englewood Cliffs, NJ: Prentice-Hall, 1977. ''(See Section 5.1.)'' * William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling. ''Numerical Recipes in C''. Cambridge, UK: Cambridge University Press, 1988. ''(See Section 4.1.)'' * Josef Stoer and Roland Bulirsch. ''Introduction to Numerical Analysis''. New York: Springer-Verlag, 1980. ''(See Section 3.1.)'' == 外部連結 == * [http://lpl.hkcampus.net/~lpl-wwk/Casio50/Trapezoidal%20Rule%20and%20Simpson's%20Rule.htm 黃 Sir 的計算機網頁: Numerical Integration : Trapezoidal Rule and Simpson's Rule] {{Wayback|url=http://lpl.hkcampus.net/~lpl-wwk/Casio50/Trapezoidal%20Rule%20and%20Simpson%27s%20Rule.htm |date=20090417000220 }} {{艾薩克·牛頓}} {{数值积分}} [[Category:数值积分]] [[Category:数学公式]] [[Category:数学近似]]
该页面使用的模板:
Template:Main
(
查看源代码
)
Template:NoteTA
(
查看源代码
)
Template:Wayback
(
查看源代码
)
Template:数值积分
(
查看源代码
)
Template:艾薩克·牛頓
(
查看源代码
)
返回
牛頓-寇次公式
。
导航菜单
个人工具
登录
命名空间
页面
讨论
不转换
查看
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
工具
链入页面
相关更改
页面信息