预览加载中,请您耐心等待几秒...
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

亲,该文档总共14页,到这已经超出免费预览范围,如果喜欢就直接下载吧~

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

实验题目4Newton迭代法摘要为初始猜测则由递推关系产生逼近解的迭代序列这个递推公式就是Newton法。当距较近时很快收敛于。但当选择不当时会导致发散。故我们事先规定迭代的最多次数。若超过这个次数还不收敛则停止迭代另选初值。前言利用牛顿迭代法求的根程序设计流程否是否是是定义输入开始输出迭代失败标志输出输出奇异标志结束否问题1程序运行如下:r=NewtSolveOne('fun1_1'pi/41e-61e-410)r=0.7391程序运行如下:r=NewtSolveOne('fun1_2'0.61e-61e-410)r=0.5885问题2程序运行如下:r=NewtSolveOne('fun2_1'0.51e-61e-410)r=0.5671程序运行如下:r=NewtSolveOne('fun2_2'0.51e-61e-420)r=0.5669问题3程序运行如下:①p=LegendreIter(2)p=1.00000-0.3333p=LegendreIter(3)p=1.00000-0.60000p=LegendreIter(4)p=1.00000-0.857100.0857p=LegendreIter(5)p=1.00000-1.111100.23810②p=LegendreIter(6)p=1.00000-1.363600.45450-0.0216r=roots(p)'r=-0.932469514203150-0.6612093864662650.9324695142031530.661209386466264-0.2386191860831970.238619186083197用二分法求根为:r=BinSolve('LegendreP6'-111e-6)r=-0.932470204878826-0.661212531887755-0.2386200573979590.2386001275510200.6611926020408160.932467713647959程序运行如下:①p=ChebyshevIter(2)p=1.00000-0.5000p=ChebyshevIter(3)p=1.00000-0.75000p=ChebyshevIter(4)p=1.00000-1.000000.1250p=ChebyshevIter(5)p=1.00000-1.250000.31250②p=ChebyshevIter(6)p=1.00000-1.500000.56250-0.0313r=roots(p)'r=-0.965925826289067-0.7071067811865480.9659258262890680.707106781186547-0.2588190451025210.258819045102521用二分法求根为:r=BinSolve('ChebyshevT6'-111e-6)r=-0.965929926658163-0.707110969387755-0.2588289221938780.2588189572704080.7071059869260200.965924944196429与下列代码结果基本一致只是元素顺序稍有不同:j=0:5;x=cos((2*j+1)*pi/2/(5+1))x=0.9659258262890680.7071067811865480.258819045102521-0.258819045102521-0.707106781186547-0.965925826289068程序运行如下:①p=LaguerreIter(2)p=1-42p=LaguerreIter(3)p=1-918