Iteration & Staircase/Cobweb Diagrams
Turn an equation into a self-updating rule, and watch each guess refine the last.
Rewriting an equation as x = g(x)
Most equations $f(x)=0$ that come from real models can't be solved by any algebraic method — no factorising, no formula, no clever substitution gets $x$ on its own. Fixed-point iteration sidesteps this by rearranging $f(x)=0$ into a different form, $x=g(x)$, where $x$ appears (at least once) isolated on the left. For example, $x^3-6x-2=0$ can be rearranged by isolating the $x^3$ term and cube-rooting both sides: $x^3=6x+2$, so $x=\sqrt[3]{6x+2}$ — giving $g(x)=\sqrt[3]{6x+2}$.
Because this rearrangement is just algebra done in reverse, any value of $x$ satisfying $x=g(x)$ automatically satisfies the original $f(x)=0$ too. The rearrangement hasn't changed the roots — only the form of the equation.
Generating the sequence of iterates
Pick a starting value $x_0$, then repeatedly feed each output back in as the next input:
This produces a sequence $x_0,x_1,x_2,\dots$ If the sequence converges — settles toward a fixed value rather than running off or oscillating forever — call that limit $\alpha$. Since $\alpha=g(\alpha)$ in the limit, $\alpha$ is a root of $x=g(x)$, and therefore a root of the original equation $f(x)=0$ too.
The same equation $f(x)=0$ can be rearranged into several different $x=g(x)$ forms, and they don't all behave the same way. One rearrangement might converge quickly, another might converge slowly, and another might not converge at all — running off to $\pm\infty$ instead of settling near the root. Whether a given rearrangement converges is a genuine question you need to check, not something you can assume.
Reading a staircase or cobweb diagram
Plot $y=x$ and $y=g(x)$ on the same axes, and the iteration becomes visible as a path between them. Starting at $x_0$ on the horizontal axis, move vertically up (or down) to the curve $y=g(x)$ — this height is $x_1$. Move horizontally across to the line $y=x$ to carry that value back onto the axis, then vertically again to $y=g(x)$ for $x_2$, and so on.
Near the root, the shape of the path depends on the sign of $g'(x)$. When $0<g'(x)<1$, every iterate lands on the same side of the root as the last, producing a monotonic staircase that climbs (or descends) steadily inward. When $-1<g'(x)<0$, each iterate overshoots to the opposite side, producing a cobweb that spirals in around the root. Either way, convergence needs $|g'(x)|<1$ near $\alpha$ — once $|g'(x)|>1$, the same staircase or cobweb pattern spirals outward instead, and the iteration diverges.
Worked example 1
The values $3, 2.7144, 2.6346, 2.6114,\dots$ decrease steadily, each landing above the last but on the same side of the root — the signature of a staircase pattern, consistent with $g'(x)>0$ near $\alpha$.
Worked example 2
Worked example 3
The values $2, 1.8171, 1.8533, 1.8463,\dots$ alternate above and below the root $\alpha\approx1.847$ — each iterate overshoots to the opposite side of the last. This oscillating convergence is the cobweb pattern, and it happens because $g'(x)<0$ near the root for this particular rearrangement (unlike Example 1's staircase, where $g'(x)>0$).
Worked example 4
Both rearrangements in this lesson came from the exact same equation, $x^3-6x-2=0$, and both iterations started from $x_0=3$ — yet Example 1's $g(x)=\sqrt[3]{6x+2}$ converged smoothly while this one runs away toward infinity. The difference is $g'(x)$ near the root: for this rearrangement $g'(x)=\dfrac{x^2}{2}\approx3.4$ at $x\approx2.6$, well outside $|g'(x)|<1$. Choosing a good rearrangement isn't a formality — it's the difference between a method that works and one that doesn't.
Assuming that because a rearrangement produced a valid-looking sequence of numbers, it must be converging — always check whether successive iterates are actually settling down (or check $|g'(x)|$ near the suspected root) before trusting the result. A diverging sequence can still look "reasonable" for the first step or two.
Check yourself
Show that $x^3-3x-5=0$ has a root between $x=2$ and $x=2.5$. Rearrange the equation into the form $x=\sqrt[3]{3x+5}$, then use $x_0=2$ to find $x_1$ and $x_2$, each correct to 4 decimal places.
(Hint: evaluate f at both endpoints first, then substitute repeatedly into g.)