Exercise-2014F-2-Answer-推荐下载

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Exercise-2 for Numerical Methods 1.(P50(1))Determine rigorously if each function has a unique fixed point on the given interval.a)g (x )= 1-x 2/4 on [0,1];Solution :point. fixed unique a has )(by defined iteration the So,itself. into [0,1] maps )( Thus,[0,1].[3/4,1] ])1,0([ ,4/3)1( and 1)0( From too.[0,1],on decreases lly monotonica )(],1,0[on 02)(' Since (2).2/1 Here ].1,0[ when 121)(' is there ,21)1(' and 0)0(' From [0,1].on decreases lly monotonica )(' So, .]1,0[,0)(" )1(.21)(" and 2)(' have we First,x g x g g g g x g x x g K x x g g g x g x x g x g x x g ⊂===≤-==∈<≤-==∈<-=-=b)g (x )=1/x on [0.5,5.2].
Solution :point. fixed unique a has )(by defined iteration the guarantee cannot we So, ].2.5 ,5.0[ when 1)(' is there ,04
.271)2.5(' and 4)5.0(' From [0,1].on increases lly monotonica )(' So, .]2.5 ,5.0[,0)(" .2)(" and 1)(' have we First,32x g x x g g g x g x x g x x g x x g ∈>-=-=∈>=-
=2. (P85(1))Let f (x )= x 2-x +2.
a)Find the Newton-Raphson formula p k =g (p k-1).Solution :
122122122)(')()(12)(',2)(21222--=--=-+--=-=-=+-=+k k k x x x x x x x x x x f x f x x g x x f x x x f b)Start with p 0=-1.5 and find p 1,p 2, and p 3.Solution :450506.05486.214816.11)7743.1(*227743.17743.128851198*256511121)(22)(1614225.21)5.1(22)5.1(12223925651112561121612212
1=≈--=≈==-=---=----=-=--=----=--=-+p p p x x x k k
k Matlab Exercises:
1.(P51(1))Use the program of fixed point iteration to approximate the fixed points (if any) of each function. Produce a graph of each function and the line y =x that clearly shows any fixed points.
a)g (x )=x 5-3x 3-2x 2+2;b)g (x )=cos(sin(x ));c)g (x )=x 2-sin(x +0.15);d)g (x )=x x-cos(x )
Solution:
(a)
See the programs in the M-files.
The result is the following:
P =0, 2, 2
k =3
p =2
err =0
Actually, at least there are two other roots for this equation as shown in the following plot:
(b)
See the programs in the M-files.
The result is the following:
P =0 1.00000.66640.81500.74670.7781
0.76360.77030.76720.76860.76800.7683
0.76810.76820.76820.76820.7682
k =17
p =0.7682
err =6.1856e-006
(c)See the programs in the M-files.The result is the following: Choose p0=1.5, tol=0.00001, and maxNum=100.
The iterations cannot converge:
1. We got an error message “maximum number of iterations exceeded”.
2. The last points are
P =…. 0.3234-0.35130.3234-0.35130.3234-0.3513
0.3234-0.35130.3234-0.3513
The data show that the iterations oscillate between 0.3234 and-0.3513.
3. err =0.6747
Choosing p0=0.5, we got the similar result:
k =100; p =-0.3513; err =0.6747;
P =0.5000-0.35520.3299 …-0.35130.3234-0.35130.3234-0.3513
(d)See the programs in the M-files.The result is the following: Choose p0=1.2, tol=0.00001, and maxNum=20. It is convergent. k =17; p =1.0000; err =7.9231e-006
P =1.20001.16501.12481.0850…1.00331.00151.00071.0003
1.00021.00011.00001.00001.0000
2.(P87(22))Halley’s method is a way to speed up convergence of Newton-Raphson method. Do programming for the two methods and compare them with an example:a)Halley’s method: 12))('(2)(")(1)(')()(-⎦⎤⎢⎣⎡--=x f x f x f x f x f x x g b)Newton-Raphson method: )
(')()(x f x f x x g -=c)The example: f (x )= x 3-3x +2, p 0=-2.4.Solution :。

相关文档
最新文档