The Algorithm for The Fixed Point Method

The Algorithm for The Fixed Point Method

We will now look at the algorithm for the fixed point method in approximating a root of a function.

Obtain a function $f$ in the appropriate form ($f(x) = 0 \Leftrightarrow x = g(x)$) and assume that a root $\alpha$ exists. Obtain an initial approximation $x_0$, a maximum number of iterations, and an error tolerance $\epsilon$.

For $i = 1, 2, ...$ up to the maximum number of iterations prescribed:

Step 1: Obtain the successive approximations by the fixed point method with the following formula:

(1)
\begin{align} \quad x_{n+1} = g(x_n) \end{align}

Step 2: Check the error tolerance:

(2)
\begin{align} \quad \mid x_n - x_{n-1} \mid < \epsilon \end{align}

If the above inequality is true, then stop. $x_n$ is a good approximation of the root $\alpha$. If the inequality above is false, then continue to compute successive approximations until the maximum number of iterations is reached. If the maximum number of iterations is reached and the error tolerance $\epsilon$ is not obtained, then print out a failure message.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License