




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、第八章非线性方程及非线性方程组解决1abx0 x1a1b2x*1区间对分法(二分法)1. 确定有根区间:2. 逐次对分区间:3. 取根的近似值:b1a22其误差为:根的近似值:abx0 x1a1b2x*b1a23用对分区间法求根步骤:4 f=inline(x3+10*x-20,x); x,err=bisection(f,1,2,0.00005,15) n x err 1.000 1.500 0.500 2.000 1.750 0.250 3.000 1.625 0.125 4.000 1.56250000000000 0.000 5.000 1.59375000000000 0.000 6.0
2、00 1.600 0.00 7.000 1.60 0.000 8.000 1.59765625000000 0.000 9.000 1.59570312500000 0.000 10.000 1.59472656250000 0.000 11.000 1.59423828125000 0.000 12.000 1.59448242187500 0.500 13.000 1.59460449218750 0.250 14.000 1.59454345703125 0.625 15.000 1.59457397460938 0.813x = 1.59457397460938err =3.0000e
3、-00552简单迭代法2.1 简单迭代法的一般形式及其几何意义6xyy = xxyy = xxyy = xxyy = xx*x*x*x*x0p0 x1p1x0p0 x1p1x0p0 x1p1x0p0 x1p17显然,此迭代序列发散。8 f=inline(x3+11*x-20,x); iteration(f)enter initial guess x1=1.5allowable tolerance tol=0.01maximum number of iterations max=3zero not found to desired tolerance step x 1.0000 1.5000 2
4、.0000 -0.1250 3.0000 -21.3770ans = 1.5000 -0.1250 -21.37709 f=inline(20/(x2+10),x); iteration(f)enter initial guess x1=1.5allowable tolerance tol=0.0000005maximum number of iterations max=20iteration method has convergedstep x 1.000 1.500 2.000 1.63265306122449 3.000 1.579 4.000 1.685 5.000 1.592 6.
5、000 1.59559279984346 7.000 1.59414421311147 8.000 1.59473154634776 9.000 1.59449342271545 10.000 1.59458996763346 11.000 1.59455082476108 12.000 1.59456669477999 13.000 1.59456026047567 14.000 1.59456286918682 15.000 1.59456181151656 16.000 1.5945622403361610代入初值得:例2的结果表明,对同一方程可构造不同的迭代格式,产生的迭代序列收敛性也
6、不同。迭代序列的收敛性取决于迭代函数在方程的根的邻近的性态。112.2 1.迭代法的收敛条件1213由定理8.2,迭代收敛142.3Steffensen (斯蒂芬森)方法简单迭代法的加速(一)收敛速度15(二)Steffensen(斯蒂芬森)方法将Aitken(埃特肯)加速技巧用于线性收敛的迭代序列,即得Steffensen方法,其计算过程为16 iter_steffen(leonardo_iter)enter initial guess x1=2allowable tolerance tol=0.000001maximum number of iterations max=10iterati
7、on method has convergedstep x 1 2.000 2 1.192 3 1.35956267950143 4 1.36878079644430 5 1.36880810758180 6 1.36880810782137 iteration(leonardo_iter)enter initial guess x1=2allowable tolerance tol=0.0001maximum number of iterations max=10zero not found to desired tolerancestep x 1 2.000 2 0.400 3 1.961
8、60000000000 4 0.47562601431040 5 1.94399636218919 6 0.586 7 1.93485140020862 8 0.52692937882011 9 1.92983865092369 10 0.53641914395953 function f=leonardo_iter(x)f=(20-x.3-2*x.2)/10function f=leonardo(x)%达芬奇在1425年研究此方程%并得到1.368808107f=x.3+2*x.2.+10*x-2017 Newton法与弦截法3.1Newton法基本思想:将非线性方程线性化,以线性方程的解
9、逼近非线性方程的解。18由此导出迭代公式xyx*x019解:代入初值得:Newton法迭代公式为20由定理8.4,Newton法至少二阶收敛。21以上两种改进都是至少二阶收敛的。22在Newton公式中,用差商代替导数,即即得迭代公式3.2弦截法23x0 x1切线 /* tangent line */割线 /* secant line */切线斜率割线斜率24证明略,因弦截法非单步法,不能用定理8.4判别证明参考(关治,陆金甫 数值分析基础)。25 newton(leonardo,leonardo_pr)enter initial guess x1=2allowable tolerance t
10、ol=0.000001maximum number of iterations max=10Newton method has convergedstep x y 1 2.000 16.0000 2 1.46666666666667 2.123851851851853 3 1.372 0.4323 4 1.36881022263390 0.6963 5 1.36880810782267 0.7313 6 1.36880810782137 0.0000ans = 2.0000 1.4667 1.3715 1.3688 1.3688 1.3688function f=leonardo_pr(x)f
11、=3*x.2.+4*x+10function f=leonardo(x)f=x.3+2*x.2.+10*x-2026 secant(leonardo)enter initial guess x0=1enter initial guess x1=2allowable tolerance tol=0.000001maximum number of iterations max=10secant method has converged step x y 1 1.000 -7.0000 2 2.000 16.0000 3 1.396 -1.334757951836934 4 1.3579123046
12、5787 -0.2290 5 1.369 0.2105 6 1.36880745972192 -0.000 7 1.36880810778288 -0.2143ans = 1.0000 2.0000 1.3043 1.3579 1.3690 1.3688 1.368827类似割线法,过三点做f(x)的二次插值多项式4抛物线法(muller法)28y(x)xSecant linex1抛物线插值x2x3Parabola29 mullerEnter function f(x)=x.3+10*x-20enter the initial guess xr=1.75enter the interval l
13、ength h=0.25enter the toleration tol=0.000001maximum number of iteration max=10 step x y 1 1.5949003375 0.0059626661 2 1.5945609031 -0.0000213915 3 1.5945621166 0.0000000001 4 1.5945621166 0.0000000000muller method has converged30 mullerEnter function f(x)=x.3+2*x.2+10*x-20enter the initial guess xr=1.5enter the interval length h=0.5enter the toleration tol=0.000001maximum number of iteration max=10 step x y 1 1.3702416528 0.0302548158 2 1.3688024583 -0.0001191819 3
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025西南财经大学辅导员考试试题及答案
- 2025西安飞机工业公司职工工学院辅导员考试试题及答案
- 2025辽宁城市建设职业技术学院辅导员考试试题及答案
- 猴年微信祝词
- 先秦文学教学设计
- 福建省建筑设计研究院有限公司招聘笔试题库2025
- 人文社会科学考试试卷及答案2025年
- 2025年心理健康服务与干预职业资格考试试卷及答案
- 2025年县乡卫专业资格考试试题及答案
- 新生儿光疗护理
- 穿越时空的音乐鉴赏之旅智慧树知到期末考试答案章节答案2024年浙江中医药大学
- 重庆市藻渡水库工程环境影响报告书-上报
- QCT457-2023救护车技术规范
- DZ∕T 0207-2020 矿产地质勘查规范 硅质原料类(正式版)
- 云南省劳动合同范本下载
- 医院培训课件:《分级护理制度》
- 外国建筑赏析智慧树知到期末考试答案章节答案2024年清华大学
- 抑郁障碍课件
- 2024届湖南省浏阳市中考联考化学试卷含解析
- 北京奥林匹克森林公园植物景观与生态效益初探
- 交流与传承-东西文化中碰撞中的艺术嬗变
评论
0/150
提交评论