Fixed-Point Iteration
Goal of this chapter
Understand the principle and convergence condition of fixed-point iteration, and learn the contraction-mapping theorem, the analysis of convergence speed, and its relationship with Newton's method.
Prerequisites
- Chapter 13: Bisection Method
- Chapter 9: Truncation Error
- Basics of differentiation (used in the convergence analysis)
Contents
1. Definition and Principle
To solve an equation $f(x) = 0$, we rewrite it in the equivalent form
$$x = g(x)$$and, starting from an initial value $x_0$, perform the iteration
to find the solution (a fixed point). This method is called fixed-point iteration.
Definition of a fixed point
For a function $g: \mathbb{R} \to \mathbb{R}$, a point $x^*$ satisfying $g(x^*) = x^*$ is called a fixed point of $g$. It is exactly the intersection of the graph $y = g(x)$ with the line $y = x$.
For example, to solve $f(x) = x^2 - 3x + 1 = 0$, one can set $x = \dfrac{x^2 + 1}{3}$ (i.e. $g(x) = \dfrac{x^2+1}{3}$) and iterate. Note, however, that the choice of $g$ determines whether the iteration converges or diverges.
2. Convergence Conditions
Whether the iteration $x_{n+1} = g(x_n)$ converges to a fixed point $x^*$ can be decided from the magnitude of the derivative of $g$.
Sufficient condition for convergence
If $g$ is continuously differentiable on a closed interval $[a,b]$ containing $x^*$ with
$$|g'(x)| \leq L < 1 \quad \text{for all } x \in [a,b]$$and $g([a,b]) \subseteq [a,b]$, then for any initial value $x_0 \in [a,b]$ the sequence $\{x_n\}$ converges to the unique fixed point $x^*$.
Intuitively, if $|g'(x^*)| < 1$ then $g$ is "contractive" near the fixed point, so the error shrinks at every iteration. Conversely, when $|g'(x^*)| > 1$ the iteration diverges.
Geometric interpretation
- $0 < g'(x^*) < 1$: the iterates approach the fixed point monotonically (from one side).
- $-1 < g'(x^*) < 0$: the iterates converge while oscillating around the fixed point.
- $|g'(x^*)| > 1$: the iterates move away from the fixed point and diverge.
- $|g'(x^*)| = 1$: a borderline case; convergence or divergence depends on higher-order terms.
3. The Banach Fixed-Point Theorem
The theoretical foundation of fixed-point iteration is the Banach fixed-point theorem (the contraction-mapping principle).
Banach fixed-point theorem
Let $(X, d)$ be a complete metric space and $T: X \to X$ a contraction (that is, $d(T(x), T(y)) \leq L \cdot d(x,y)$ with $0 \leq L < 1$). Then $T$ has a unique fixed point $x^*$, and for any $x_0 \in X$ the sequence $x_n = T^n(x_0) \to x^*$.
From this theorem we also obtain an a priori and an a posteriori error bound.
A priori error bound
$$|x_n - x^*| \leq \dfrac{L^n}{1 - L} |x_1 - x_0|$$A posteriori error bound
$$|x_n - x^*| \leq \dfrac{L}{1 - L} |x_n - x_{n-1}|$$The a posteriori bound is important in practice: it lets us estimate the current error from the difference of two consecutive iterates.
4. Algorithm
Fixed-point iteration
- Set an initial value $x_0$ and a tolerance $\varepsilon > 0$.
- Compute $x_{n+1} = g(x_n)$.
- If $|x_{n+1} - x_n| < \varepsilon$, return $x_{n+1}$ as the solution.
- If the iteration count has not reached the limit $N_{\max}$, go back to step 2.
Pseudocode follows.
function fixedPointIteration(g, x0, tol, maxIter):
x = x0
for i = 1 to maxIter:
x_new = g(x)
if |x_new - x| < tol:
return x_new
x = x_new
return x // did not converge
5. Order of Convergence
The value of the derivative of $g$ at the fixed point $x^*$ determines the order of convergence.
Linear convergence
When $g'(x^*) \neq 0$ and $|g'(x^*)| < 1$, the error $e_n = |x_n - x^*|$ satisfies
$$e_{n+1} \approx |g'(x^*)| \cdot e_n$$so the convergence is linear (first order). The smaller $|g'(x^*)|$ is, the faster the convergence.
Quadratic convergence
When $g'(x^*) = 0$ and $g''(x^*) \neq 0$,
$$e_{n+1} \approx \dfrac{|g''(x^*)|}{2} \cdot e_n^2$$so the convergence is quadratic. Newton's method constructs $g$ precisely so that this condition holds.
General condition for order p
When $g'(x^*) = g''(x^*) = \cdots = g^{(p-1)}(x^*) = 0$ and $g^{(p)}(x^*) \neq 0$, the order of convergence is $p$.
6. Worked Examples
Example 1: $f(x) = x - \cos x = 0$ (a convergent case)
Setting $g(x) = \cos x$ gives $x = g(x)$. Since $|g'(x)| = |\sin x| \leq \sin 1 \approx 0.841 < 1$, starting from $x_0 = 0$ the iteration converges.
| $n$ | $x_n$ | $|x_n - x_{n-1}|$ |
|---|---|---|
| 0 | 0.000000 | — |
| 1 | 1.000000 | 1.000000 |
| 2 | 0.540302 | 0.459698 |
| 3 | 0.857553 | 0.317251 |
| 4 | 0.654290 | 0.203264 |
| 5 | 0.793480 | 0.139190 |
| 10 | 0.731404 | 0.012415 |
| 20 | 0.739085 | 0.000098 |
| 30 | 0.739085 | 0.000001 |
The fixed point is $x^* \approx 0.739085$. The iterates converge slowly while oscillating, which corresponds to $g'(x^*) = -\sin(0.739085) \approx -0.674$ being negative.
Example 2: a different rearrangement of the same equation (a divergent case)
If instead we read $x - \cos x = 0$ as $\cos x = x$ and rearrange it as $x = \cos^{-1} x$ (i.e. $g(x) = \cos^{-1} x$), then $g'(x) = -\dfrac{1}{\sqrt{1 - x^2}}$. At the fixed point $x^* \approx 0.739$ we have $|g'(x^*)| = \dfrac{1}{\sqrt{1 - 0.739^2}} \approx 1.48 > 1$, so the iteration moves away from the fixed point and diverges. This shows that, for the same equation, the choice of $g$ has a decisive effect on convergence.
7. Relationship with Newton's Method
Newton's method is the special case of fixed-point iteration with $g(x) = x - \dfrac{f(x)}{f'(x)}$. For this $g$,
$$g'(x) = 1 - \dfrac{[f'(x)]^2 - f(x) f''(x)}{[f'(x)]^2} = \dfrac{f(x) f''(x)}{[f'(x)]^2}$$so when $f(x^*) = 0$ we have $g'(x^*) = 0$, which guarantees quadratic convergence.
Likewise, the secant method, Steffensen's method and others can all be understood within the fixed-point iteration framework.
8. FAQ
Q1. What is fixed-point iteration?
It rewrites an equation $f(x) = 0$ in the form $x = g(x)$ and repeats $x_{n+1} = g(x_n)$ from an initial value $x_0$ to find a fixed point (the solution). A sufficient condition for convergence is that $|g'(x^*)| < 1$ holds near the fixed point $x^*$.
Q2. What is the convergence condition?
A sufficient condition is $|g'(x^*)| < 1$ near the fixed point $x^*$. When $|g'(x^*)| < 1$ it converges linearly, and in particular it converges at least quadratically when $g'(x^*) = 0$. When $|g'(x^*)| > 1$ it diverges.
Q3. Is Newton's method a special case of fixed-point iteration?
Yes. Newton's method is the special case with $g(x) = x - f(x)/f'(x)$; since $g'(x^*) = 0$, it is guaranteed to converge at least quadratically.
9. References
- Wikipedia, "Fixed-point iteration"
- Wikipedia, "Banach fixed-point theorem"
- R. L. Burden & J. D. Faires, Numerical Analysis, 10th ed., Cengage, 2016.
- W. H. Press et al., Numerical Recipes, 3rd ed., Cambridge, 2007.
Implementation in sangi
Fixed-point iteration is available in sangi's root-finding module (Roots) as fixed_point_iteration.
| Method in the article | sangi function | Notes |
|---|---|---|
| Fixed-point (Picard) iteration | fixed_point_iteration | Pass the iteration map $g$ and solve $x = g(x)$ (not the $f$ of $f(x)=0$) |
| Newton's method (special case) | newton_raphson | Equivalent to fixed-point iteration with $g(x)=x-f(x)/f'(x)$ |
Note that the argument is the iteration map $g$ itself (not the $f$ of $f(x)=0$). If $g$ is a contraction ($|g'(x^*)|<1$) it converges; otherwise it returns converged=false after the iteration limit.