数值分析作业答案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

第2章插值法1、当x=1,-1,2时,f(x)=0,-3,4,求f(x)的二次插值多项式。(1)用单项式基底。(2)用Lagrange插值基底。(3)用Newton基底。证明三种方法得到的多项式是相同的。解:(1)用单项式基底设多项式为:2210)(xaxaaxP,所以:6421111111111222211200xxxxxxA37614421111111424113110111)()()(2222112002222211120000xxxxxxxxxfxxxfxxxfa2369421111111441131101111)(1)(1)(12222112002222112001xxxxxxxxfxxfxxfa6565421111111421311011111)(1)(1)(12222112002211002xxxxxxxfxxfxxfxa所以f(x)的二次插值多项式为:2652337)(xxxP(2)用Lagrange插值基底)21)(11()2)(1())(())(()(2010210xxxxxxxxxxxl)21)(11()2)(1())(())(()(2101201xxxxxxxxxxxl)12)(12()1)(1())(())(()(1202102xxxxxxxxxxxlLagrange插值多项式为:372365)1)(1(314)2)(1(61)3(0)()()()()()()(22211002xxxxxxxlxfxlxfxlxfxL所以f(x)的二次插值多项式为:22652337)(xxxL(3)用Newton基底:均差表如下:xkf(xk)一阶均差二阶均差10-1-33/2247/35/6Newton插值多项式为:372365)1)(1(65)1(230))(](,,[)](,[)()(21021001002xxxxxxxxxxxxfxxxxfxfxN所以f(x)的二次插值多项式为:22652337)(xxxN由以上计算可知,三种方法得到的多项式是相同的。6、在44x上给出xexf)(的等距节点函数表,若用二次插值求ex的近似值,要使截断误差不超过10-6,问使用函数表的步长h应取多少?解:以xi-1,xi,xi+1为插值节点多项式的截断误差,则有),(),)()()((!31)(11112iiiiixxxxxxxxfxR式中.,11hxxhxxii3434114239313261))()((max61)(11hehexxxxxxexRiiixxxii令6341039he得00658.0h插值点个数12178.12161)4(41N是奇数,故实际可采用的函数值表步长006579.0121681)4(4Nh8、13)(47xxxxf,求]2,,2,2[710f及]2,,2,2[810f。解:由均差的性质可知,均差与导数有如下关系:],[,!)(],,,[)(10banfxxxfnn所以有:1!7!7!7)(]2,,2,2[)7(710ff0!80!8)(]2,,2,2[)8(810ff15、证明两点三次Hermite插值余项是),(,!4/)())(()(1212)4(3kkkkxxxxxxfxR并由此求出分段三次Hermite插值的误差限。证明:利用[xk,xk+1]上两点三次Hermite插值条件)()(),()()()(),()(11331133kkkkkkkkxfxHxfxHxfxHxfxH知)()()(33xHxfxR有二重零点xk和k+1。设2123)())(()(kkxxxxxkxR确定函数k(x):当kxx或xk+1时k(x)取任何有限值均可;当1,kkxxx时,),(1kkxxx,构造关于变量t的函数2123)())(()()()(kkxxxxxktHtftg显然有0)(,0)(0)(,0)(,0)(11kkkkxgxgxgxgxg在[xk,x][x,xk+1]上对g(x)使用Rolle定理,存在),(1xxk及),(12kxx使得0)(,0)(21gg在),(1kx,),(21,),(12kx上对)(xg使用Rolle定理,存在),(11kkx,),(212k和),(123kkx使得0)()()(321kkkggg再依次对)(tg和)(tg使用Rolle定理,知至少存在),(1kkxx使得0)()4(g而!4)()()()4()4()4(tktftg,将代入,得到)(),(!41)(1,)4(kkxxftk推导过程表明依赖于1,kkxx及x综合以上过程有:!4/)())(()(212)4(3kkxxxxfxR确定误差限:记)(xIh为f(x)在[a,b]上基于等距节点的分段三次Hermite插值函数。nabhnkkhaxk),,1,0(,在区间[xk,xk+1]上有212)4(212)4()()(max)(max!41!4/)())(()()(1kkxxxbxakkhxxxxxfxxxxfxIxflk而最值)(,161)1(max)()(max4422102121shxxhhssxxxxkskkxxxlk进而得误差估计:)(max3841)()()4(4xfhxIxfbxah16、求一个次数不高于4次的多项式)(xp,使它满足0)0()0(pp,0)1()1(pp,1)2(p。解:满足0)0()0(33HH,1)1()1(33HH的Hermite插值多项式为)1,0(10xx3222103332010)1(01001121)]()()()([)(xxxxxxxxHxaxHxHjjjjj设223)1()()(xAxxHxP,令1)2(P得41A于是222232)3(41)1(412)(xxxxxxxP第3章曲线拟合的最小二乘法16、观测物体的直线运动,得出以下数据:i012345时间t/s00.91.93.03.95.0距离s/m010305080110求运动方程。解:经描图发现t和s近似服从线性规律。故做线性模型tspanbtas,1,,计算离散内积有:611,1502j,7.140.59.30.39.19.00,150jjtt63.530.59.30.39.19.00,222222502jjttt280110805030100,150jjss10781100.5809.3500.3309.1109.000,50jjjstst求解方程组得:107828063.537.147.146ba855048.7a,253761.22b运动方程为:ts253761.22855048.7平方误差:22502101.2)(jjjtss17、已知实验数据如下:i01234Xi1925313844Yi19.032.349.073.397.8用最小二乘法求形如2bxay的经验公式,并计算均方差。解:2,1xspan,计算离散内积有:511,1402j,53274438312519,1222224022jjxx72776994438312519,4444440422jjxxx4.2718.973.730.493.320.19,140jjyy5.3693218.97443.73380.49313.32250.1919,222224022jjjyxyx求解方程组得:5.3693214.2717277699532753275ba972579.0a,05035.0b所求公式为:205035.0972579.0xy均方误差:1226.0)(21240jjjyxy第4章数值积分与数值微分1、确定下列求积分公式中的待定参数,使其代数精度尽量高,并其代数精度尽量高,并指明所构造出的求积公式所具有的代数精度:(1)101()()(0)()hhfxdxAfhAfAfh;(2)21012()()(0)()hhfxdxAfhAfAfh;(3)1121()[(1)2()3()]/3fxdxffxfx;(4)20()[(0)()]/2[(0)()]hfxdxhffhahffh。解:(1)101()()(0)()hhfxdxAfhAfAfh;将2()1,,fxxx分别代入公式两端并令其左右相等,得10110122231011200203hhhhhhAAAdxhhAAhAxdxhAAhAxdxh解得。所求公式至少具有2次代数精确度。又由于故4()()(0)()333hhhhhfxdxfhffh具有3次代数精确度。(2)21012()()(0)()hhfxdxAfhAfAfh2()1,,fxxx分别代入公式两端并令其左右相等,得21012210122222233101221400116()033hhhhhhhhAAAdxhhAAhAxdxhAAhAxdxxh解得:11084,33hhAAA令3()fxx,得23332880()033hhhhxdxhh令4()fxx,得2555244422648816()55333hhhhxhhhhxdxhh故求积分公式具有3次精确度。(3)1121()[(1)2()3()]/3fxdxffxfx当()1fx时,易知有1121()[(1)2()3()]/3fxdxffxfx令求积分公式对2(),fxxx准确成立,即112122112210123123233xdxxxxxxdx则解得120.28989790.5265986xx或120.68989790.1265986xx将3()fxx代入已确定的积分公式,则1121()[(1)2()3()]/3fxdxffxfx故所求积分式具有2次代数精确度。(4)20()[(0)()]/2[(0)()]hfxdxhffhahffh当()1,fxx时,有201[11]/2[00]hdxhah20[0]/2[11]hxdxhhah故令2()fxx时求积公式准确成立,即2220[0]/2[02]hxdxhhahh解得112a。将34(),fxxx代入上述确定的求积分公式,有43322001[0]/2[03]412hhxxdxhhhh54424001[0]/2[04]512hhxxdxhhhh

1 / 29
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功