numerical methods in civil engineering 504 301

Simple Fixed-Point Iteration
• Rearrange the function so that x is on
the left side of the equation:
f ( x)  0  g ( x)  x
xi 1  g ( xi )
• Bracketing methods are “convergent”.
• Fixed-point methods may sometime “diverge”,
depending on the stating point (initial guess)
and how the function behaves.
Simple Fixed-Point Iteration
Examples:
1. f ( x)  x 2  x  2
x0
g ( x)  x 2  2
or
g ( x)  x  2
or
2.
3.
3.
2
g ( x)  1 
x
f(x) = x 2-2x+3  x = g(x)=(x2+3)/2
f(x) = sin x  x = g(x)= sin x + x
f(x) = e-x- x  x = g(x)= e-x
Simple Fixed-Point Iteration Convergence
• x = g(x) can be
expressed as a pair of
equations:
y1= x
y2= g(x)…. (component
equations)
• Plot them separately.
Simple Fixed-Point Iteration Convergence
x i 1  g (x i )
   1
Suppose that the true root:
x r  g (x r )
    2
Subtracting 1 from  2 
x r  x i 1  g (x r )  g (x i )
  (3)
Simple Fixed-Point Iteration Convergence
Derivative mean value theorem:
If g(x) are continuous in [a,b] then there exist at
least one value of x= within the interval such
that:
g   
'
g b   g  a 
b a
i.e. there exist one point where the slope parallel to the line
joining (a & b)
Simple Fixed-Point Iteration Convergence
x r  x i 1  g (x r )  g (x i )
Let a  x i and b  x r
g   
'
g x r   g x i 
xr xi
g  x r   g  x i    x r  x i  g '  
then x r  x i 1   x r  x i  g '  
E t ,i 1  g '   E t ,i
If
g '    1.0 the error decreases with each iteration
If
g '    1.0 the error increases with each iteration
Simple Fixed-Point Iteration Convergence
• Fixed-point iteration converges if :
g (x )  1
(slope of the line f (x )  x )
• When the method converges, the error
is roughly proportional to or less than the
error of the previous step, therefore it is
called “linearly convergent.”
Simple Fixed-Point Iteration-Convergence
Example: Simple Fixed-Point Iteration
f(x) = e-x - x
f(x)
f(x)=e-x - x
1. f(x) is manipulated so that we get
x=g(x) g(x) = e-x
2. Thus, the formula predicting the
new value of x is: xi+1 = e-xi
3. Guess xo = 0
4. The iterations continues till the
approx. error reaches a certain
limiting value
Root
f(x)
x
f1(x) = x
g(x) = e-x
x
Example: Simple Fixed-Point Iteration
i
xi
g(xi)
0
1
2
3
4
5
6
7
8
9
10
0
1.0
0.367879
0.692201
0.500473
0.606244
0.545396
0.579612
0.560115
0.571143
0.564879
1.0
0.367879
0.692201
0.500473
0.606244
0.545396
0.579612
0.560115
0.571143
0.564879
ea%
et%
100
171.8
46.9
38.3
17.4
11.2
5.90
3.48
1.93
1.11
76.3
35.1
22.1
11.8
6.89
3.83
2.2
1.24
0.705
0.399
Example: Simple Fixed-Point Iteration
i
xi
g(xi)
0
1
2
3
4
5
6
7
8
9
10
0
1.0
0.367879
0.692201
0.500473
0.606244
0.545396
0.579612
0.560115
0.571143
0.564879
1.0
0.367879
0.692201
0.500473
0.606244
0.545396
0.579612
0.560115
0.571143
0.564879
ea%
et%
100
171.8
46.9
38.3
17.4
11.2
5.90
3.48
1.93
1.11
76.3
35.1
22.1
11.8
6.89
3.83
2.2
1.24
0.705
0.399