Skip to content

Fixed point iteration: solving equations numerically

Fixed point iteration approximates a solution of an equation by repeatedly applying a function. Write the equation in the form

x=g(x),x=g(x),

choose a starting value x0x_0, then calculate

xn+1=g(xn).\boxed{x_{n+1}=g(x_n)}.

If the values converge to a limit α\alpha, continuity of gg gives

α=g(α),\alpha=g(\alpha),

so α\alpha is a fixed point of gg. It is therefore a solution of the original equation, provided the rearrangement has not introduced an invalid solution.

You should be able to:

  • rearrange algebraic equations;
  • substitute into functions using a calculator;
  • solve equations graphically and interpret intersections;
  • differentiate elementary functions;
  • round to decimal places and significant figures.

Review functions and notation, function graphs, and differentiation basics if needed.

An equation f(x)=0f(x)=0 must be rearranged into x=g(x)x=g(x). The rearrangement is not unique, and different choices of gg can behave very differently.

For example,

x3+x1=0x^3+x-1=0

can be written as either

x=1x3x=1-x^3

or, since x3=1xx^3=1-x,

x=1x3.x=\sqrt[3]{1-x}.

These give the iteration formulae

xn+1=1xn3andxn+1=1xn3.x_{n+1}=1-x_n^3 \qquad\text{and}\qquad x_{n+1}=\sqrt[3]{1-x_n}.

Both have the same fixed point, but neither is automatically guaranteed to converge from every starting value.

Worked example 1: generate successive approximations

Section titled “Worked example 1: generate successive approximations”

Use

xn+1=3xn+4,x0=3,x_{n+1}=\sqrt{3x_n+4}, \qquad x_0=3,

to find x1x_1, x2x_2, x3x_3 and x4x_4.

Apply the formula repeatedly, using each new value as the next input:

x1=3(3)+4=13=3.605551,x2=3(3.605551)+4=3.849890,x3=3(3.849890)+4=3.943307,x4=3(3.943307)+4=3.978680.\begin{aligned} x_1&=\sqrt{3(3)+4}=\sqrt{13}=3.605551\ldots,\\ x_2&=\sqrt{3(3.605551\ldots)+4}=3.849890\ldots,\\ x_3&=\sqrt{3(3.849890\ldots)+4}=3.943307\ldots,\\ x_4&=\sqrt{3(3.943307\ldots)+4}=3.978680\ldots. \end{aligned}

The values appear to approach 44. Indeed, a fixed point satisfies

x=3x+4.x=\sqrt{3x+4}.

Squaring gives

x23x4=0(x4)(x+1)=0.x^2-3x-4=0 \quad\Longrightarrow\quad (x-4)(x+1)=0.

The square root is non-negative, so x=1x=-1 cannot satisfy the rearranged equation. The relevant fixed point is x=4x=4.

Calculator practice: keep unrounded values in the calculator memory. Rounding every intermediate value can change later digits and may make convergence appear earlier than it really occurs.

For

xn+1=ln(5+xn),x0=1,x_{n+1}=\ln(5+x_n), \qquad x_0=1,

calculate x1x_1, x2x_2 and x3x_3 to 55 decimal places.

Answer x1=ln6=1.79176,x2=ln(5+1.791759)=1.91571,x3=ln(5+1.915707)=1.93379.\begin{aligned} x_1&=\ln 6=1.79176,\\ x_2&=\ln(5+1.791759\ldots)=1.91571,\\ x_3&=\ln(5+1.915707\ldots)=1.93379. \end{aligned}

The display values are rounded, but each next calculation should use the full stored value.

The fixed point equation x=g(x)x=g(x) describes intersections of the curves

y=xandy=g(x).y=x \qquad\text{and}\qquad y=g(x).

Starting at xnx_n on the horizontal axis, move vertically to y=g(x)y=g(x) and then horizontally to y=xy=x. This transfers the output g(xn)g(x_n) back into the input position xn+1x_{n+1}. Repeating these steps produces a cobweb diagram.

Near a fixed point α\alpha, differentiation gives the approximation

g(x)g(α)g(α)(xα).g(x)-g(\alpha)\approx g'(\alpha)(x-\alpha).

Since g(α)=αg(\alpha)=\alpha, the errors en=xnαe_n=x_n-\alpha approximately satisfy

en+1g(α)en.e_{n+1}\approx g'(\alpha)e_n.

Therefore:

  • if g(α)<1|g'(\alpha)|<1, nearby errors shrink and the iteration usually converges;
  • if g(α)>1|g'(\alpha)|>1, nearby errors grow and the fixed point is repelling;
  • if g(α)<0g'(\alpha)<0, successive values tend to alternate across the root;
  • if 0<g(α)<10<g'(\alpha)<1, successive values usually approach from one side;
  • if g(α)=1|g'(\alpha)|=1, this test is inconclusive.

A stronger textbook condition is useful when the root is only known to lie in an interval II. If gg maps II into itself and

g(x)k<1|g'(x)|\le k<1

for every xIx\in I, then the iteration converges to the unique fixed point in II for every starting value in that interval.

Worked example 2: choose a convergent rearrangement

Section titled “Worked example 2: choose a convergent rearrangement”

Consider

x3+x1=0.x^3+x-1=0.

Compare the rearrangements

g1(x)=1x3andg2(x)=1x3.g_1(x)=1-x^3 \qquad\text{and}\qquad g_2(x)=\sqrt[3]{1-x}.

The root is approximately α=0.6823\alpha=0.6823. Differentiate:

g1(x)=3x2,g_1'(x)=-3x^2,

so

g1(α)3(0.6823)21.40>1.|g_1'(\alpha)|\approx 3(0.6823)^2\approx1.40>1.

This rearrangement is locally divergent.

For the second rearrangement,

g2(x)=13(1x)2/3.g_2'(x)=-\frac{1}{3(1-x)^{2/3}}.

At a fixed point, 1α=α31-\alpha=\alpha^3, so

g2(α)=13α20.716.g_2'(\alpha)=-\frac{1}{3\alpha^2} \approx-0.716.

Thus g2(α)<1|g_2'(\alpha)|<1, so nearby values converge and alternate across the root. With x0=0.7x_0=0.7:

nxn00.70000010.66943320.69143830.67574240.687011\begin{array}{c|c} n & x_n \\\hline 0&0.700000\\ 1&0.669433\\ 2&0.691438\\ 3&0.675742\\ 4&0.687011 \end{array}

The alternation is visible. The convergence is not especially fast because g2(α)|g_2'(\alpha)| is closer to 11 than to 00.

The equation x2+x3=0x^2+x-3=0 is rearranged as

x=3x+1.x=\frac{3}{x+1}.

Show that iteration is expected to converge to the positive root, but not to the negative root.

Answer

Here

g(x)=3x+1,g(x)=3(x+1)2.g(x)=\frac{3}{x+1}, \qquad g'(x)=-\frac{3}{(x+1)^2}.

The roots are

α=1+1321.303,β=11322.303.\alpha=\frac{-1+\sqrt{13}}2\approx1.303, \qquad \beta=\frac{-1-\sqrt{13}}2\approx-2.303.

Therefore

g(α)0.566<1,g(β)1.767>1.|g'(\alpha)|\approx0.566<1, \qquad |g'(\beta)|\approx1.767>1.

The positive fixed point is attracting and the negative fixed point is repelling.

Seeing two displayed iterates agree is evidence, not automatically a proof, that the limiting root rounds to those digits. The exam question may supply a convergence assumption, ask only for an approximation, or require a sign-change check.

Worked example 3: iteration followed by verification

Section titled “Worked example 3: iteration followed by verification”

The equation

x3+x1=0x^3+x-1=0

has a root near 0.70.7. Using

xn+1=1xn3,x0=0.7,x_{n+1}=\sqrt[3]{1-x_n}, \qquad x_0=0.7,

continued iteration gives

x20=0.682350,x21=0.682312.x_{20}=0.682350\ldots, \qquad x_{21}=0.682312\ldots.

These suggest x=0.682x=0.682 to 33 decimal places. To prove the rounding, test the boundaries of the rounding interval:

f(x)=x3+x1.f(x)=x^3+x-1.

Then

f(0.6815)<0andf(0.6825)>0.f(0.6815)<0 \qquad\text{and}\qquad f(0.6825)>0.

Because ff is continuous, a root lies between 0.68150.6815 and 0.68250.6825, so it rounds to

0.682 to 3 decimal places.\boxed{0.682\text{ to }3\text{ decimal places}}.

Also,

f(x)=3x2+1>0,f'(x)=3x^2+1>0,

so ff is strictly increasing and the root is unique. This removes any ambiguity about which root has been located. See locating roots by a change of sign for the full justification.

If a contraction bound g(x)k<1|g'(x)|\le k<1 is known on a suitable interval, then the remaining error can be bounded by

αxnk1kxnxn1.|\alpha-x_n|\le \frac{k}{1-k}|x_n-x_{n-1}|.

This is stronger than merely checking whether two iterates have the same rounded form.

Suppose an iteration remains in an interval where g(x)0.2|g'(x)|\le0.2, and

x8x7=0.00012.|x_8-x_7|=0.00012.

Then

αx80.210.2(0.00012)=0.00003.|\alpha-x_8| \le\frac{0.2}{1-0.2}(0.00012) =0.00003.

Thus x8x_8 is within 3×1053\times10^{-5} of the root. This guarantees 44 decimal places unless x8x_8 lies unusually close to a rounding boundary, which can be checked directly.

The subscript labels the position in the sequence:

x3x3.x_3\ne x^3.

In xn+1=g(xn)x_{n+1}=g(x_n), the next term is obtained by substituting the current term into gg.

Solving the recurrence instead of iterating

Section titled “Solving the recurrence instead of iterating”

Most A-level questions expect repeated numerical substitution. You do not need a formula for xnx_n in terms of nn.

Algebraic equivalence preserves fixed points, but it does not preserve convergence. Inspect g(x)|g'(x)| near the required root or calculate enough terms to recognise divergence, oscillation, or a cycle.

Keep the calculator’s full precision and round only the values you report. Early rounding feeds an artificial input into every later step.

Square roots, logarithms and denominators restrict the allowed inputs. For example, xn+1=ln(xn2)x_{n+1}=\ln(x_n-2) requires xn>2x_n>2 at every step.

Believing equal displayed values prove convergence

Section titled “Believing equal displayed values prove convergence”

A sequence can converge slowly, enter a cycle, or agree temporarily after rounding. Use the derivative test, a supplied convergence statement, an error bound, or a sign-change verification as appropriate.

The equation

ex=xe^{-x}=x

has one positive solution.

  1. Write down a fixed point iteration.
  2. Starting with x0=0.5x_0=0.5, calculate x1x_1, x2x_2 and x3x_3.
  3. Explain why the iteration converges near the root.
  4. State the root to 33 decimal places.
  1. The equation already gives

    xn+1=exn.\boxed{x_{n+1}=e^{-x_n}}.
  2. Repeated substitution gives

    x1=e0.5=0.606531,x2=e0.606531=0.545239,x3=e0.545239=0.579703.\begin{aligned} x_1&=e^{-0.5}=0.606531\ldots,\\ x_2&=e^{-0.606531\ldots}=0.545239\ldots,\\ x_3&=e^{-0.545239\ldots}=0.579703\ldots. \end{aligned}

    The values alternate because g(x)=ex<0g'(x)=-e^{-x}<0.

  3. At a fixed point α\alpha, eα=αe^{-\alpha}=\alpha. Hence

    g(α)=eα=α.|g'(\alpha)|=e^{-\alpha}=\alpha.

    The positive root is approximately 0.5670.567, so g(α)<1|g'(\alpha)|<1. The fixed point is attracting.

  4. Continuing the iteration gives values approaching 0.5671430.567143\ldots, so

    x=0.567 to 3 decimal places.\boxed{x=0.567\text{ to }3\text{ decimal places}}.

Let

xn+1=12(xn+5xn),x0=2.x_{n+1}=\frac12\left(x_n+\frac{5}{x_n}\right), \qquad x_0=2.
  1. Calculate x1x_1, x2x_2 and x3x_3.
  2. Find the positive fixed point.
  3. Find g(x)g'(x) and explain why convergence becomes very fast near that fixed point.
Answer

The iterations are

x1=12(2+52)=2.25,x2=12(2.25+52.25)=2.236111,x3=12(2.236111+52.236111)=2.236067978.\begin{aligned} x_1&=\frac12\left(2+\frac52\right)=2.25,\\ x_2&=\frac12\left(2.25+\frac{5}{2.25}\right)=2.236111\ldots,\\ x_3&=\frac12\left(2.236111\ldots+\frac{5}{2.236111\ldots}\right) =2.236067978\ldots. \end{aligned}

At a fixed point,

x=12(x+5x)x2=5.x=\frac12\left(x+\frac5x\right) \quad\Longrightarrow\quad x^2=5.

The positive fixed point is 5\sqrt5.

Here

g(x)=12(15x2),g'(x)=\frac12\left(1-\frac5{x^2}\right),

so

g(5)=0.g'(\sqrt5)=0.

The first-order error term vanishes at the root, which explains the particularly rapid convergence.

For a fixed point iteration:

  1. rearrange the equation as x=g(x)x=g(x);
  2. write xn+1=g(xn)x_{n+1}=g(x_n) clearly;
  3. substitute the given x0x_0 repeatedly using full calculator precision;
  4. expect local convergence when g(α)<1|g'(\alpha)|<1;
  5. check domain restrictions and reject invalid solutions;
  6. justify a stated accuracy when the question requires proof.

Next, study when numerical iteration fails and compare this method with the Newton-Raphson method. The trapezium rule applies numerical approximation to integration rather than root finding.