Sei sulla pagina 1di 29

Fixed Point Iteration

Dr. Ammar Isam Edress


Roots of Nonlinear Equations

Let say we want to find the solution of


f (x) = 0. For example:

a ) xex  1 = 0,
b) 2 sin x  x = 0
These equations can not be solved directly.
We need numerical methods to compute
the approximate solutions.

2
Iteration Methods

• Let x0 be an initial value that is close to the


solution of f (x) = 0. From f (x) = 0, another
equation is produced such that we can use x0 to
compute x1.
• This step is repeated to obtain values of x2,
x3,...This method is called Iteration Method.
• We hope that every new xi converges to the
solution of f (x) = 0.

3
4. Fixed Point Iteration
• First we write f (x) = 0 in the form x = F (x).
• Note that F (x) is not unique. For instance, see the following.
Example 1

4
Example: fixed point problems
Examples: FPI
Example: FPI
Example 2

f ( x) = x  3 x  1 = 0
3

i) x  3x  1 = 0
3

 3x = x  1
3

x 1 3
 x=
3

8
ii ) x 3  3 x  1 = 0
 x  3x = 1
3

 x( x 2  3) = 1
1
x= 2
x 3
iii ) x 3  3 x  1 = 0
 x 3 = 3x  1
3x  1
x= 2
x
and many more.
9
We shall use these forms (x = F (x)) in our next example, denoted by

x 1 3
i) x = = F1 ( x)
3
1
ii ) x = 2 = F2 ( x)
x 3
3x  1
iii ) x = 2 = F3 ( x)
x
10
• We can say that the solution of x = F (x) is the intersection of two graphs
y = x and y = F (x).
• For example, see the following figure:

y=x
y = F (x)

y0 = x1
y2 = x3

y1 = x2

x0 x x
2 x3 x1 Figure 4.1 Fixed Point Iteration

11
Solution steps

1. Start the computation with initial value x0.


2. From y = F (x), we have y0 = F (x0).
3. Then, from graph y = x, we may assume x1 = y0. From here, we have y1 = F(x1)
and x2 = y1.
4. Similarly, we will obtain x3, x4, … and so on.

12
We hope that the neighborhood denoted by the dashed line converges to the
intersection point of the two graphs y = x and y = F(x).

Conclusion
Fixed point iteration is of the form
x1 = F ( x0 ),
x2 = F ( x1 ),
x3 = F ( x2 ),

xi 1 = F ( xi )

13
Example 3

Approximation by Fixed Point Iteration


(Based on Example 2)

In Example 2, we have obtained various forms of x = F(x). Now referring to


xi1 = F(xi), we put subscripts as follows.

14
x3  1 xi  1
3
i) x =  xi 1 = (1)
3 3
Let x0 = 1.5 be the initial value.
From (1) we can compute :
x1 = 1.458333
x2 = 1.367163
x3 = 1.185138

The distance between xi1 and xi increases,


i.e. |xi1 – xi| > |xi – xi1|.
This iteration fails (since it diverges).

15
1 1
ii ) x = 2  xi 1 = 2 (2)
x 3 xi  3
Put x0 = 0.3. From (2) we can compute :
x1 = 0.343643
x2 = 0.346992
x3 = 0.347271
x4 = 0.347294
x5 = 0.347296
x6 = 0.347296

The distance between xi+1 and xi decreases,
i.e. |xi+1 – xi | < | xi – xi1 |.
This iteration converges (succeeds).
16
3x  1 3xi  1
ii ) x = 2  xi 1 = 2
(3)
x xi
Take x0 = 1.9.
From (3) we can compute :
x1 = 1.855956
x2 = 1.906730
x3 = 1.848431
x4 = 1.915679

We have |xi+1 – xi | > | xi – xi-1 |. This shows
that this iteration diverges (Iteration fails).

17
REMARK

• An iteration converges if it satisfies


xi 1  xi < xi  xi 1
• From the convergent iteration, we conclude that one of the solutions of

x 3  3x  1 = 0 is x  0.347296.

• CHECK : ( 0.347296)3  3( 0.347296)  1


 0.000001
0
18
• How to make sure that initial value x0 can give a convergent iteration?
Answer:
We differentiate F(x) to get F ′(x).
The iteration converges if

a) F ' ( x0 ) < 1 or  1 < F ' ( x0 ) < 1, and


b) x0 is close to the solution of f ( x) = 0.

19
Example 4

For x 3  3 x  1 = 0,
we have determined in Example 2 that :
x3 1
i) F1 ( x) =  F1 ' ( x) = x 2
3
For x0 = 1.5, we have F1 ' ( x0 ) = 2.25 > 1.
Condition  1 < F ' ( x0 ) < 1 is not satisfied
and the iteration with this initial value is divergent.

20
1 2x
ii) F2 ( x) = 2  F2 ' ( x) =  2
x 3 ( x  3) 2
For x0 = 0.3, we have F2 ' ( x0 )  0.07 that
satisfies condition  1 < F ' ( x0 ) < 1.
Therefore, the iteration with this initial value
can be examined, since it could possibly converge.

21
3x  1 3x  2
iii) F3 ( x) = 2
 F3 ' ( x) = 
x x3
At x0 = 1.9, we have F3 ' ( x0 )  1.1 < 1.
Condition  1 < F ' ( x0 ) < 1 is not satisfied.
Thus, the iteration with this initial value diverges.

Conclusion

We must choose the initial value x0


that satisfies the condition  1 < F ' ( x0 ) < 1
such that the iteration could possibly converge.

22
Iteration function
• Algebraically transform to the form
• 𝑥=⋯

• 𝑓 𝑥 = 𝑥 3 + 𝑥 2 − 3𝑥 − 3
• 𝑥 = 𝑥 3 + 𝑥 2 − 2𝑥 − 3
𝑥 3 +𝑥 2 −3
• 𝑥=
3
• …
• Every rootfinding problem can be transformed into any number of fixed point
problems
• (fortunately or unfortunately?)

23
24
25
Analysis
• #1 iteration function converges
• but to a fixed point outside the interval 1,2

• #2 fails to converge
• despite attaining values quite close to #1

• #3 and #5 converge rapidly


• #3 add one correct decimal every iteration
• #5 doubles correct decimals every iteration

• #4 converges, but very slow

26
Example 5:

• Solve f(x)=e-x-x
• Re-write as: x=g(x)  x=e-x
• Start with an initial guess (here, 0)

i xi |a| % |t| % |t|i/|t|i-1


0 0.0000 100.000

1 1.0000 100.000 76.322 0.763

2 0.3679 171.828 35.135 0.460

3 0.6922 46.854 22.050 0.628

4 0.5005 38.309 11.755 0.533

• Continue until some tolerance is reached


28
More on Convergence
• Graphically the solution is at the
intersection of the two curves. We identify
the point on y2 corresponding to the initial
guess and the next guess corresponds to
the value of the argument x where y1 (x) =
y2 (x).

• Convergence of the simple fixed-point


iteration method requires that the
derivative of g(x) near the root has a
magnitude less than 1.
a) Convergent, 0≤g’<1
b) Convergent, -1<g’≤0
c) Divergent, g’>1
d) Divergent, g’<-1

29

Potrebbero piacerti anche