习题
1. 当x=1,-1,2时,f(x)=0,-3,4,求f(x)的二次插值多项式。 (1)用单项式基底; (2)用拉格朗日插值基底; (3)用牛顿基底。
证明三种方法得到的多项式是相同的。
解:(1)假设f(x)的二次插值多项式为:f(x)a2x2a1xa0
由于 x=1,-1,2时,f(x)=0,-3,4
则有 a2a1a00;a2a1a03;4a22a1a04
537;a1;a0 623537则有 f(x)x2x
623求得 a2(2)用拉格朗日插值基底: 由于 x01,x11,x22,
f(x0)0,f(x1)3,f(x2)4;
则有 l0(x)(xx1)(xx2)1(x1)(x2)
(x0x1)(x0x2)2(xx0)(xx2)1(x1)(x2)
(x1x0)(x1x2)6(xx0)(xx1)1(x1)(x1)
(x2x0)(x2x1)3l1(x)l2(x)拉格朗日插值多项式为:
L2(x)yklk(x)f(x0)l0(x)f(x1)l1(x)f(x2)l2(x)
k02 5237xx 6235237xx 623则f(x)二次插值多项式为:L2(x)(3)采用牛顿基底: 均差表如下所示: Xi 1 -1 2 f(xi) 0 -3 4 则有牛顿插值多项式为:
一阶均差 3/2 7/3 二阶均差 5/6 N2(x)f(x0)fx0,x1(xx0)fx0,x1,x2(xx0)(xx1) 5237xx 6235237xx 623则f(x)二次插值多项式为:L2(x)由以上计算可知,三种方法得到的多项式是相同的。
5. 设f(x)C2a,b且f(a)f(b)0,求证:
1maxf(x)(ba)2maxf(x). axbaxb8解:令x0a,x1b,以此为插值节点,则线性插值多项式为
L1(x)f(x0)xx1xx0 f(x1)x0x1xx0xbxaf(b) abxa f(a)因为 f(a)f(b)0 所以 L1(x)0
插值余项 R(x)f(x)L1(x)因为 f(x)1f(x)(xx0)(xx1) 21f(x)(xx0)(xx1) 221并且 (xx0)(xx1)(xx0)(x1x)
411 (x1x0)2(ba)2
44所以有maxf(x)=maxaxbaxb1f(x)(xx0)(xx1) 2f(x)(xx0)(xx1) 2=maxaxb1 (ba)2maxf(x).
axb86. 在4x4上给出f(x)ex的等距节点函数表,若用二次插值求ex的近似值,要使截断误差不超过106,问使用函数表的步长h应取多少? 解:假设插值节点为xi1,xi和xi1,
则分段二次插值多项式的插值余项R(x)为
1f()(xxi1)(xxi)(xxi1) 3!1进而有 R2(x)(xxi1)(xxi)(xxi1)maxf(x)
4x46R2(x)假设步长为h,即xi1xih,xi1xih
1则有 R2(x)(xxi1)(xxi)(xxi1)maxf(x)
4x46123343e4heh. 62733当截断误差不超过106时,则有:R2(x)106 即有
343eh106 27 h0.0065.
因此使用函数表的步长h满足h0.0065. 13. 求次数小于等于3的多项式P(x),使之满足条件 P(x0)f(x0) , P'(x0)f'(x0)
P''(x0)f''(x0) , P(x1)f(x1)
解:由题目中插值条件
P(x0)f(x0),P'(x0)f'(x0),P''(x0)f''(x0),P(x)的次数小于等于3,则
可设 P(x)f(x0)f'(x0)(xx0) 由于 P(x1)f(x1)
1''f(x0)(xx0)2A(xx0)3, A为常数。 2 则有 f(x1)f(x0)f'(x0)(x1x0)1''f(x0)(x1x0)2A(x1x0)3 2常数A满足 Af(x1)f(x0)f'(x0)(x1x0)(x1x0)31''f(x0)(x1x0)22
fx0,x1f'(x0)1''1f(x0)
xx2xx1010因此可得多项式P(x)为
fx0,x1f'(x0)1''(xx0)31''2P(x)f(x0)f(x0)(xx0)f(x0)(xx0)f(x0)2x1x02x1x0'16. 求一个次数不高于4次的多项式P(x),使它满足P(0)P(0)0,
P(1)P(1)1,P(2)1。
解:由埃米尔特插值进行计算:
由题目分析可知
x00,x11;y00,y11;m00,m11 由于 H3(x)y00(x)y11(x)m00(x)m11(x) 又由于 0(x)(12xx0xx12)()(12x)(x1)2 x0x1x0x11(x)(12xx1xx02)()(32x)x2 x1x0x1x02xx120(x)(xx0)x(x1)
x0x1xx021(x)(xx1)(x1)x
x1x02因此有 H3(x)(32x)x2(x1)x2x32x2 设P(x)H3(x)A(xx0)2(xx1)2,A为待定常数
由于 P(2)1
并且 P(x)x32x2Ax2(x1)2 则有 A1 4进而 P(x)x32x2P(x)12139x(x1)2x4x3x2 442412x(x3)2 420. 给定数据表如下:
Xj Yj 0.25 0.5000 0.30 0.5477 0.39 0.6245 0.45 0.6708 0.53 0.7280 试求三次样条插值S(x),并满足条件: (1)S(0.25)1.0000,S(0.53)0.6868; (2)S(0.25)S(0.53)0. 解:由表格分析有
h0x1x00.05,h1x2x10.09 h2x3x20.06,h3x4x30.08 由于 j所以 1由于 j所以 1hj1hj1hj;
533,2,3,41; 1457hjhj1hj
924,2,3,01 1457由于 fx0,x1f(x1)f(x0)0.9540;fx1,x20.8533
x1x0fx2,x30.7717;fx3,x40.7150
(1)由于 S(x0)1.0000,S(x4)0.6868
d0fx1,x2fx0,x16(fx1,x2f0)5.5200;d164.3157 h0h0h1fx2,x3fx1,x2h1h23.2640;d36fx3,x4fx2,x3h2h32.4300
d26d46(f4fx3,x4)2.1150 h3由此得矩阵形式的线性方程组为
2 1 M0 5.5200
59 2 M1 4.3157 141432 2 M2 3.2640
5534 2 M3 2.4300
77 1 2 M4 2.1150
求解此方程组得
M02.0278,M11.4643
M21.0313,M30.8070,M40.6539 由于三次样条表达式为
S(x)Mj(yj(xj1x)36hj2Mj1(xxj)36hjMj1hj62Mjhj6)xj1xhj(yj1)xxjhj
(j0,1,,n1)将M0,M1,M2,M3,M4代入上式可得
1.8783x32.4227x21.8591x0.1573,x0.25,0.30320.8019x1.4538x1.5685x0.1863,x0.30,0.39S(x) 320.6225x1.2440x1.4866x0.1970,x0.39,0.45320.3194x0.8348x1.3025x0.2246,x0.45,0.53(2)由于S(x0)0,S(x4)0
同(1)解法
d02f00,d14.3157,d23.2640 d32.4300,d42f40
040
由此得矩阵形式的线性方程组为
23509142370M14.31572M3.2640;M0M40 25M32.43002求解此方程组,得
M00;M11.8809;M20.8616;M31.0304;M40 由于三次样条表达式为
S(x)Mj(yj(xj1x)36hj2Mj1(xxj)36hjMj1hj62Mjhj6)xj1xhj(yj1)xxjhj
将M0,M1,M2,M3,M4代入得
6.2697x34.7023x20.2059x0.3555,x0.25,0.30321.8876x2.6393x1.9966x0.1353,x0.30,0.39S(x) 320.4689x0.1178x0.9213x0.2751,x0.39,0.45322.1467x3.4132x2.5103x0.0367,x0.45,0.53
因篇幅问题不能全部显示,请点此查看更多更全内容