next up previous
Next: Coding the fixed-point iteration Up: tutorial3 Previous: Graphing the test function

The fixed-point iteration method


The fixed-point iteration method rewrites the equation \bgroup\color{red}$f(x)=0$\egroup in the form \bgroup\color{red}$g(x)=x$\egroup. For any particular function \bgroup\color{red}$f(x)$\egroup, There are many ways to do this, but one procedure that will always give the right form is to add \bgroup\color{red}$x$\egroup to both sides of the original equation, thus giving \bgroup\color{red}$f(x)+x=x$\egroup and then identifying \bgroup\color{red}$g(x)$\egroup as \bgroup\color{red}$f(x)+x$\egroup. Thus in our example above we have

\begin{displaymath}
g(x)=f(x)+x=\cos x = x
\end{displaymath} (3)

\bgroup\color{red}\framebox{\em HAND CALCULATION}\egroup \bgroup\color{black}$\phantom{0}$\egroupThere are other ways in which our equation could be written in the form \bgroup\color{black}$g(x)=x$\egroup. Find one of these.

Fixed-point iteration then works by choosing a first guess for the root, say \bgroup\color{black}$x_0$\egroup, which can be obtained from a graph. Once such a first guess is obtained, (hopefully) improved estimates are found using the iteration

\begin{displaymath}
x_{n+1} = g(x_n), \quad n=0,1,2,\dots
\end{displaymath} (4)

where \bgroup\color{black}$g(x)=\cos x$\egroup for our case.

First we will use MATLAB as a simple calculator to see how this procedure works. In the MATLAB window enter the initial \bgroup\color{black}$x=0.75$\egroup.

Then use the following command to calculate the first improved iteration:

x = cos(x)

The new value obtained is \bgroup\color{black}$x_1$\egroup (it should be 0.7317). Repeat the command three times in order to obtain \bgroup\color{black}$x_4$\egroup.

\bgroup\color{blue}\framebox{\em CHECKPOINT: submit solution}\egroup \bgroup\color{black}$\phantom{0}$\egroup \bgroup\color{red}\framebox{ 2.}\egroup Record the value of \bgroup\color{red}$x_4$\egroup to four significant figures.


next up previous
Next: Coding the fixed-point iteration Up: tutorial3 Previous: Graphing the test function
Charlie Macaskill 2004-07-26