《数值分析新课件教学专用NA07a》由会员分享,可在线阅读,更多相关《数值分析新课件教学专用NA07a(4页珍藏版)》请在金锄头文库上搜索。
1、第八章 数值积分 /* Numerical Integration */,近似计算,1 Newton-Cotes 公式, 在a, b上取 a x0 x1 xn b,做 f 的 n 次插值多项式 ,即得到,节点,f (x),插值型积分公式 /*interpolatory quadrature*/,误差,1 Newton-Cotes Formulae,梯形公式 /* trapezoidal rule*/,解:逐次检查公式是否精确成立,代入 P0 = 1:,=,代入 P1 = x :,=,代入 P2 = x2 :,代数精度 = 1,1 Newton-Cotes Formulae,注:形如 的求积公式
2、至少有 n 次代数精度 该公式为插值型(即: ), 当节点等距分布时:,令,Cotes系数,注:Cotes 系数仅取决于 n 和 i,可查表得到。与 f (x) 及区间a, b均无关。,1 Newton-Cotes Formulae,n = 1:,Trapezoidal Rule,/* 令 x = a+th, h = ba, 用中值定理 */,代数精度 = 1,n = 2:,Simpsons Rule,代数精度 = 3,n = 3: Simpsons 3/8-Rule, 代数精度 = 3,n = 4: Cotes Rule, 代数精度 = 5,Excuses for not doing homework I could only get arbitrarily close to my textbook. I couldnt actually reach it.,HW: p.273 #1,n 为偶数阶的Newton-Cotes 公式至少有 n+1 次代数精度。,