欢迎来到天天文库
浏览记录
ID:58808328
大小:1.02 MB
页数:51页
时间:2020-10-01
《非线性方程及方程组的解法ppt课件.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、第八章 非线性方程及非线性方程组解决abx0x1a1b2x*§1 区间对分法(二分法)1.确定有根区间:2.逐次对分区间:3.取根的近似值:b1a2其误差为:根的近似值:abx0x1a1b2x*b1a2用对分区间法求根步骤:>>f=inline('x^3+10*x-20','x');>>[x,err]=bisection(f,1,2,0.00005,15)nxerr1.000000000000001.500000000000000.500000000000002.000000000000001.750000000000000.250000000000003.00000
2、0000000001.625000000000000.125000000000004.000000000000001.562500000000000.062500000000005.000000000000001.593750000000000.031250000000006.000000000000001.609375000000000.015625000000007.000000000000001.601562500000000.007812500000008.000000000000001.597656250000000.003906250000009.0000
3、00000000001.595703125000000.0019531250000010.000000000000001.594726562500000.0009765625000011.000000000000001.594238281250000.0004882812500012.000000000000001.594482421875000.0002441406250013.000000000000001.594604492187500.0001220703125014.000000000000001.594543457031250.00006103515625
4、15.000000000000001.594573974609380.00003051757813x=1.59457397460938err=3.051757812500000e-005§2 简单迭代法2.1简单迭代法的一般形式及其几何意义xyy=xxyy=xxyy=xxyy=xx*x*x*x*x0p0x1p1x0p0x1p1x0p0x1p1x0p0x1p1显然,此迭代序列发散。>>f=inline('x^3+11*x-20','x');>>iteration(f)enterinitialguessx1=1.5allowabletolerancetol=0.0
5、1maximumnumberofiterationsmax=3zeronotfoundtodesiredtolerancestepx1.00001.50002.0000-0.12503.0000-21.3770ans=1.5000-0.1250-21.3770>>f=inline('20/(x^2+10)','x');>>iteration(f)enterinitialguessx1=1.5allowabletolerancetol=0.0000005maximumnumberofiterationsmax=20iterationmethodhasconvergeds
6、tepx1.000000000000001.500000000000002.000000000000001.632653061224493.000000000000001.579085827030584.000000000000001.600830888972855.000000000000001.592019583443836.000000000000001.595592799843467.000000000000001.594144213111478.000000000000001.594731546347769.000000000000001.594493422
7、7154510.000000000000001.5945899676334611.000000000000001.5945508247610812.000000000000001.5945666947799913.000000000000001.5945602604756714.000000000000001.5945628691868215.000000000000001.5945618115165616.000000000000001.59456224033616代入初值得:例2的结果表明,对同一方程可构造不同的迭代格式,产生的迭代序列收敛性也不
此文档下载收益归作者所有