Professional Documents
Culture Documents
x = cos x
It quite clearly has at least one solution between 0 and 2; the graphs of y = x and y = cos x
intersect. However, no algebraic methods exist for solving this equation.
Figure: Spiral towards the root for −1 g( ) 0, and zigzag towards the root for
1 of 4 5/16/2018, 9:36 PM
Numerical Methods: Fixed Point Iteration http://wwwf.imperial.ac.uk/metric/metric_public/numerical_methods/iter...
0 g( 1
Figure 3: Spiral away from the root for g ( ) −1, and zigzag away from the root for
g( ) 1
But observe the following. Let's suppose we start with an initial estimate of 0 75 as a solution
of our equation. Now:
and it's clear that our solution is approximately 0 739. However, this approach (known as fixed
point iteration) doesn't always work. Consider, for example, the equation
x = 1 8 cos x
2 of 4 5/16/2018, 9:36 PM
Numerical Methods: Fixed Point Iteration http://wwwf.imperial.ac.uk/metric/metric_public/numerical_methods/iter...
1 8 cos(1 0) = 0 972544
1 8 cos(0 972544) = 1 01376
1 8 cos(1 01376) = 0 951614
1 8 cos(0 951614) = 1 04467
1 8 cos(1 04467) = 0 903944
It's clear that these numbers are getting further away from any root.
So, when does fixed point iteration work and when does it fail? We can get some insight into
that by looking at Taylor series.
x = g (x)
Now, by Taylor's theorem,
g(x) = g ( ) + (x − )g ( ) +
But g( ) = , so we have
g(x) − g ( ) (x − )
But we're iterating g : that is, evaluating it repeatedly. It follows that if our nth estimate is xn then
xn+1 = g (xn )
So from the above, we have that
(xn+1 − ) g ( ) (xn − )
In other words, the distance between our estimate and the root gets multiplied by g ( )
(approximately) with each iteration. So the iteration converges if g ( ) 1, and diverges if
g( ) 1 (the rare case g ( ) = 1 can correspond either to very slow convergence or to
very slow divergence). We can illustrate this diagrammatically, using the following clever idea.
We plot, on the same axes, y = x and y = g (x), then do the following:
2. Move vertically to the curve y = g (x): this will take you to the point (xi xi+1 ).
3. Move horizontally to the straight line y = x; this will take you to the point (xi+1 xi+1 ).
3 of 4 5/16/2018, 9:36 PM
Numerical Methods: Fixed Point Iteration http://wwwf.imperial.ac.uk/metric/metric_public/numerical_methods/iter...
The resulting line is either a spiral (if g ( ) 0) or a "staircase'' (if g ( ) 0). It can easily be
seen from the diagrams that the spiral is inwards provided −1 g ( ) 0 and that the
zigzag is towards the root if 0 g ( ) 1. It can also be seen that the spiral is outwards
provided g ( ) −1 and that the zigzag is away from the root if g ( ) 1. Given some
particular equation, there are in general several ways to set it up as a fixed point iteration.
Consider, for example, the equation
x2 = 5
(which can of course be solved symbolically---but forget that for a moment). This can be
rearranged to give
x+5
x=
x+1
suggesting the iteration
xi + 5
xi+1 =
xi + 1
Alternatively, it can be rearranged to give
3x2 − 5
x=
2x
suggesting the iteration
3xi 2 − 5
xi+1 =
2xi
The first of these will work, as
g ( ) = g ( 5)
4
=−
(1 + 5)2
= −0 382
The second of these will fail, as
g ( ) = g ( 5)
3 ( 5)2 + 5
=
2 ( 5)2
=2
4 of 4 5/16/2018, 9:36 PM