资源描述:
《数值分析作业答案.docx》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、第2章插值法1、当x=1,-1,2时,f(x)=0,-3,4,求f(x)的二次插值多项式。(1)用单项式基底。(2)用Lagrange插值基底。(3)用Newton基底。证明三种方法得到的多项式是相同的。解:(1)用单项式基底设多项式为:P(x)a0a1xa2x2,1xx211100所以:A1xx21116111xx212422f(x0)x0x021x0x02011111147a0f(x)xx21xx23111111111163f(x)xx21xx2424124222221f(x0)x21xx210111100093a1f(x)x21xx213111111111621f(x
2、)x21xx214412422221x0f(x0)1x0x0211011155a21xf(x)1xx21131111111661xf(x)1xx21241242222所以f(x)的二次插值多项式为:P(x)73x5x2326(2)用Lagrange插值基底l0(x)(xx1)(xx2)(x1)(x2)(x0x1)(x0x2)(11)(12)l1(x)(xx0)(xx2)(x1)(x2)(x1x0)(x1x2)(11)(12)l2(x)(xx0)(xx1)(x1)(x1)(x2x0)(x2x1)(21)(21)1/28Lagrange插值多项式为:L2(x)f(x0)l0(x
3、)f(x1)l1(x)f(x2)l2(x)0(3)1(x1)(x2)41(x1)(x1)635x23x7623所以f(x)的二次插值多项式为:L2(x)73x5x2326(3)用Newton基底:均差表如下:xkf(xk)一阶均差二阶均差10-1-33/2247/35/6Newton插值多项式为:N2(x)f(x0)f[x0,x1](xx0)f[x0,x1,x2](xx0)(xx1)03(x1)5(x1)(x1)265x23x7623所以f(x)的二次插值多项式为:N2(x)73x5x2326由以上计算可知,三种方法得到的多项式是相同的。6、在4x4上给出f(x)ex的等距
4、节点函数表,若用二次插值求ex的近似值,要使截断误差不超过10-6,问使用函数表的步长h应取多少?解:以xi-1,xi,xi+1为插值节点多项式的截断误差,则有R2(x)1f()(xxi1)(xxi)(xxi1),(xi1,xi1)3!式中xi1,.xhxi1xhR2(x)1e4max(xxi1)(xxi)(xxi1)1e421h3e4h36xi1xxi1633932/284令eh3106得h0.0065893插值点个数4(4)121711216.8N1是奇数,故实际可采用的函数值表步长4(4)8h0.006579N112168、f(x)x7x43x1,求f[20,21,,
5、27]及f[20,21,,28]。解:由均差的性质可知,均差与导数有如下关系:f[x0,x1,,xn]f(n)()[a,b]n!,所以有:f[20,21,,27]f(7)()7!17!7!f[20,21,,28]f(8)()008!8!15、证明两点三次Hermite插值余项是R3(x)f(4)()(xxk)2(xxk1)2/4!,(xk,xk1)并由此求出分段三次Hermite插值的误差限。证明:利用[xk,xk+1]上两点三次Hermite插值条件H3(xk)f(xk),H3(xk1)f(xk1)H3(xk)f(xk),H3(xk1)f(xk1)知R3(x)f(x)H3
6、(x)有二重零点xk和k+1。设R3(x)k(x)(xxk)2(xxk1)2确定函数k(x):当xxk或xk+1时k(x)取任何有限值均可;当xxk,xk1时,x(xk,xk1),构造关于变量t的函数g(t)f(t)H3(t)k(x)(xxk)2(xxk1)23/28显然有g(xk)0,g(x)0,g(xk1)0g(xk)0,g(xk1)0在[xk,x][x,xk+1]上对g(x)使用Rolle定理,存在1(xk,x)及2(x,xk1)使得g(1)0,g(2)0在(xk,1),(1,2),(2,xk1)上对g(x)使用Rolle定理,存在k1(xk,1),k2(1,2)和k
7、3(2,xk1)使得g(k1)g(k2)g(k3)0再依次对g(t)和g(t)使用Rolle定理,知至少存在(xk,xk1)使得g(4)()0而g(4)()f(4)()k(4)(t)4!,将代入,得到ttk(t)1f(4)(),(xk,xk1)4!推导过程表明依赖于xk,xk1及x综合以上过程有:R3(x)f(4)()(xxk)2(xxk1)2/4!确定误差限:记Ih(x)为f(x)在[a,b]上基于等距节点的分段三次Hermite插值函数。xkakh,(k0,1,n),hban在区间[xk,k+1上有x]1f(x