Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fixed- Point Iteration

Similar presentations


Presentation on theme: "Fixed- Point Iteration"— Presentation transcript:

1 Fixed- Point Iteration
Sec:6.1 Fixed- Point Iteration

2 1) Online Computing 2) MATLAB workshop 2) Exam-I and Exam-II
Exam-I Date: Oct 19 Exam-II Date: Oct 23 Time: two hours between 5PM-10PM

3 Sec:6.1 Fixed- Point Iteration
The number 𝑝 is a fixed point for a given function 𝑔 if. 𝑝=𝑔 𝑝 Example: A fixed point for g occurs precisely when the graph of 𝑦 = 𝑔(𝑥) intersects the graph of 𝑦 = 𝑥 Determine any fixed points of the function 𝑔(𝑥) = 𝑥 2 − 2. solution 𝑝=𝑔(𝑝) 𝑝= 𝑝 2 − 2 0= 𝑝 2 −𝑝− 2 𝑝=−1, 𝑝=2

4 Sec:6.1 Fixed- Point Iteration
The derivative mean-value theorem states that if a function 𝑔(𝑥) and its first derivative are continuous over an interval 𝑎 ≤ 𝑥 ≤ 𝑏, then there exists at least one value of 𝑥= 𝜉 within the interval such that 𝑔′(𝜉 ) = 𝑔(𝑏) − 𝑔(𝑎) 𝑏 − 𝑎 The right-hand side of this equation is the slope of the line joining 𝑔(𝑎) and 𝑔(𝑏). 𝑔 𝑏 − 𝑔 𝑎 = 𝑔 ′ 𝜉 (𝑏−𝑎) Slope of the tangent line is 𝑔′(𝜉 ) Slope of this line is 𝑔(𝑏) − 𝑔(𝑎) 𝑏 − 𝑎 𝜉

5 Sec:6.1 Fixed- Point Iteration
Example1 𝑥 2 − 2𝑥 + 3 = 0 can be simply manipulated to yield simple fixed-point iteration Step 1  𝑥= 𝑥 𝑥=𝑔(𝑥) rearranging the function 𝒇 (𝒙) = 𝟎 so that x is on the left-hand side of the equation: 𝒙 = 𝒈(𝒙) (*) Example2 sin⁡(𝑥)= 0 can be simply manipulated to yield 𝑥=𝑥+sin⁡(𝑥) 𝑥=𝑔(𝑥) Step 2 given an initial guess at the root 𝑥 𝑖 , (*) can be used to compute a new estimate 𝑥 𝑖+1 as expressed by the iterative formula 𝒙 𝒊+𝟏 =𝒈( 𝒙 𝒊 ) Note Convert the problem from root-finding to finding fixed-point

6 Sec:6.1 Fixed- Point Iteration
Step 1 Example1 Use simple fixed-point iteration to locate the root of 𝒇 𝒙 = 𝒆 −𝒙 −𝒙 rearranging the function 𝒙= 𝒆 −𝒙   𝒙=𝒈(𝒙)  𝒙 𝒏 Step 2 𝒏 𝒙 𝒊+𝟏 =𝒈( 𝒙 𝒊 ) 𝒙 𝒊+𝟏 = 𝒆 − 𝒙 𝒊   Starting with an initial guess of x0 = 0 𝒙 𝟏 =𝒈 𝒙 𝟎 = 𝒆 −𝟎 =𝟏 𝒙 𝟐 =𝒈 𝒙 𝟏 = 𝒆 −𝟏 = 𝒙 𝟑 =𝒈 𝒙 𝟐 = 𝒆 −𝟎.𝟑𝟔𝟕𝟖𝟕𝟗 = Thus, each iteration brings the estimate closer to the true value of the root:

7 Sec:6.1 Fixed- Point Iteration
𝜺 𝒕 = 𝒙 𝒏 − 𝒙 𝒓 𝒙 𝒓 ×𝟏𝟎𝟎% clear; clc; format long x(1) = 0; g exp(-x); f exp(-x) - x; true_root = ; for k=1:11 x(k+1) = g( x(k) ); end e_t = 100 * abs( x - true_root ) ./ true_root; res = [[1:12]' x' e_t']; fprintf('%d %16.13f %16.13f\n', res'); 𝒙 𝒏 𝜺 𝒕 (%) 𝒏 Notice that the true percent relative error for each iteration is roughly proportional (by a factor of about 0.5 to 0.6) to the error from the previous iteration. This property, called linear convergence

8 𝑬 𝒕,𝟏𝟎 < 𝑬 𝒕,𝟗 <⋯< 𝑬 𝒕,𝟏 < 𝑬 𝒕,𝟎
Convergence Sec:6.1 Fixed- Point Iteration Suppose that the true solution is 𝑬 𝒕,𝒏+𝟏 = 𝒈′ 𝝃 ∙ 𝑬 𝒕,𝒏 𝒙 𝒓 =𝒈( 𝒙 𝒓 )  < 𝑬 𝒕,𝒏 the iterative equation is ( If 𝒈 𝝃 <𝟏 ) 𝒙 𝒏+𝟏 =𝒈( 𝒙 𝒏 )  the errors decrease with each iteration Subtracting these equations yields 𝑬 𝒕,𝒏+𝟏 < 𝑬 𝒕,𝒏 𝒙 𝒓 − 𝒙 𝒏+𝟏 =𝒈 𝒙 𝒓 −𝒈( 𝒙 𝒏 )  The derivative mean-value theorem gives 𝑬 𝒕,𝟏𝟎 < 𝑬 𝒕,𝟗 <⋯< 𝑬 𝒕,𝟏 < 𝑬 𝒕,𝟎 𝒙 𝒓 − 𝒙 𝒏+𝟏 =𝒈′ 𝝃 (  𝒙 𝒓 − 𝒙 𝒏 ) Step 1 where 𝜉 is somewhere between 𝑥 𝑟 and 𝑥 𝑛 rearranging the function 𝒇 (𝒙) = 𝟎  so that x is on the left-hand side of the equation: 𝒙 = 𝒈(𝒙) If the true error for iteration n is defined as 𝑬 𝒕,𝒏 = 𝒙 𝒓 − 𝒙 𝒏 𝑬 𝒕,𝒏+𝟏 =𝒈′ 𝝃 𝑬 𝒕,𝒏 Select 𝒈 𝒙 𝒔𝒐 𝒕𝒉𝒂𝒕 𝒈′ 𝝃 <𝟏 𝑬 𝒕,𝒏+𝟏 = 𝒈′ 𝝃 ∙ 𝑬 𝒕,𝒏


Download ppt "Fixed- Point Iteration"

Similar presentations


Ads by Google