数值分析第八章1第八章常微分方程初值问题数值解法1、解:欧拉法公式为221(,)(100),0,1,2nnnnnnnyyhfxyyhxyn代00y入上式,计算结果为123(0.1)0.0,(0.2)0.0010,(0.3)0.00501yyyyyy2、解:改进的欧拉法为1112[(,)(,(,))]nnnnnnnnyyhfxyfxyhfxy将2(,)fxyxxy代入上式,得2111111221nnnnnnhhhxxxxyhy同理,梯形法公式为211122[(1)(1)]hhnnnnnnhhyyxxxx将00,0.1yh代入上二式,,计算结果见表9—5表9—5nx改进欧拉ny|()|nnyxy梯形法ny|()|nnyxy0.10.20.30.40.50.0055000.0219275000.0501443880.0909306710.14499225730.3374180361030.6582530781030.9626081821020.1250716721020.152291668100.0052380950.0214058960.0493672390.0899036920.14372238840.7551327811030.1366487781030.1854596531030.2237384431030.25304808710可见梯形方法比改进的欧拉法精确。3、证明:梯形公式为111[(,)(,)]2nnnnnnhyyfxyfxy数值分析第八章2代(,)fxyy入上式,得11[]2nnnnhyyyy解得21110222()()()222nnnnhhhyyyyhhh因为01y,故2()2nnhyh对0x,以h为步长经n步运算可求得()yx的近似值ny,故,,xxnhnh代入上式有2()2xhnhyh22220000222limlim()lim(1)lim[(1)]222xxhhxxhhhhhnhhhhhhhyehhh4、解:令20()xtyxedt,则有初值问题2',(0)0xyey对上述问题应用欧拉法,取h=0.5,计算公式为210.5,0,1,2,3nxnnyyen由0(0)0,yy得1234(0.5)0.5,(1.0)1.142012708(1.5)2.501153623,(2.0)7.245021541yyyyyyyy数值分析第八章35、解:四阶经典龙格-库塔方法计算公式见式(9.7)。对于问题(1),(,)fxyxy;对于问题(2),3(,)1yfxyx。取h=0.2,0(0)1yy,分别计算两问题的近似解见表9-6。表9-6nx(1)的解ny(2)的解ny0.20.40.60.81.01.2428000001.5836359202.0442129132.6510416523.4365022731.7275482092.7429512994.0941813555.8292107287.9960121436、证明:根据定义9.2,只要证明31()nTh即可。而1()()(,,)nTyxhyxhxyh1(,,)[(,())2((1),(1)())]xyhfxthythyxfxthythyx因此只须将()yxh和(,,)xyh都在x处展开即可得到余项表达式:2(,())(,)(,)()(,)()fffxthythyxfxythxythyxxyhxx2((1),(1)())(,)(1)(,)(1)()(,)()ffxthythyxfxythxyxfthyxxyhx所以数值分析第八章42312311()()()()()231[2(,)(,)()(,)()]()2nTyxhyxhyxhyyxffhfxyhxyhyxxyhhxx故对任意参数t,题中方法是二阶的。7、解:11234222222()()(,()())221()()()()()23(,())(){(,)2(,())(,())1[()()2!222(,()(())2nnnnnnnnnnnnnnnnnnnnnnnThhyxyxhfxyxyxhyxhyxyxhyxhfxyxhyxhfxyxfxyxfxyxhhhyxxyxfxyxhyx332222243(,())22)]()}()3![()(())]()()8nnnxyxhhyxyfffhyxyxhhxyxy因此,中点公式是二阶的。对模型方程Reyy使用中点公式求解,得211[1()]2nnyhhy易知,当21|1()|12hh时,中点公式绝对稳定。特别当为实数且时,上不等式的解为h08.解:(1)用欧拉法求解题中初值问题,当hh满足|1(100)|1h数值分析第八章5时绝对稳定,即当h0.2时欧拉法绝对稳定。(2)当hh满足不等234111|1+h+(h)+(h)+(h)|123!4!时,四阶龙格-库塔法绝对稳定,也即当h满足-2.785h0,0h0.02785时绝对稳定。(3)对于梯形公式,当hh(-,0)时,绝对稳定,此条件对(0,)h都成立,即梯形法对h无限制。9、解:二阶阿达姆斯显式和隐式方法分别为21111(3)2()2nnnnnnnnhyyffhyyff将1fy代入上二式,化简得显式方法213(1)22nnnhyhyyh隐式方法12222nnhhhyyh取010.2,0,0.181hyy,计算结果如表9-7所示表9-7xn显式ny|()|nnyxy隐式ny|()|nnyxy0.40.60.81.00.32670.446790.5454230.626475120.29799531020.43983631020.52480351020.5645458100.329909090.4517438010.5514267460.6329855230.2291361030.5554371030.7557101030.86496110数值分析第八章6可见,隐式方法比显式方法精确。10.证明:根据局部截断误差的定义知123423421()(()())21[4()()3()]4111()()()()()()23!2111[()()()()()]223!1[4(()()()42nnnnnnnnnnnnnnnnnnnTyxhyxyxhhyxhyxyxhyxhyxhyxhyxhyxyxhyxhyxhyxhhyxhyxhyx32323434())()1113(()()()())](1)()2221131113(1)()()()()244612285()()8nnnnnnnnhyxyxhyxhyxhyxhyxhyxhhyxh故方法是二阶的,局部截断误差的主项为35()8nhyx。11、解由局部截断误差的定义知数值分析第八章72234(4)5234(4)5(2)(1)()()[(3)(2)(31)()]411()2()(2)()(2)()23!1(2)()()(1)[()()4!111()()()(23!4!nnnnnnnnnnnnnnnnTyxhbyxhbyxhbyxhbyxyxhyxhyxhyxhyxhbyxhyxhyxhyxhyxh23(4)523)]1()(3)[()2()(2)()42!1(2)()()](31)()3!4(11)()11[21(3)(31)]()4411[2(1)(3)]()22411[(1)(3)]()3622[nnnnnnnnnnhbyxbyxhyxhyxhhyxhbyxbbyxbbbhyxbbhyxbbhyx4(4)534(4)511(1)(3)]()()3243137(1)()()()()3824nnnbbhyxhbhyxbhyxh所以当1b时3421(1)()()3nnTbhyxh方法为二阶;当1b时14(4)537()()()824nnTbhyxh方法为三阶。数值分析第八章812、解:根据刚性比的定义,若方程组的矩阵1091011A的特征值j满足条件Re()0(1,2),jj则1212maxRe()sminRe()jjjj称为刚性比,易知A的两个特征值为121,20所以刚性比s=20。当[2.78,0)h时,数值稳定。因此当2.7800.13920h时才能保证数值稳定。