Dynamics

How fast the staircase arrives

The slope at a crossing decides whether an orbit reaches it. The same number decides how fast — and when the slope is zero the arithmetic changes kind, from a fixed factor per step to a doubling of the correct digits.

Worth reading first: The staircase that shows the whole orbit · A point that pulls, and a point that pushes.

The slope at a crossing decides whether an orbit arrives: shallow and the staircase walks in, steep and it walks out. That is a yes-or-no question and the same number answers a quantitative one that matters more in practice.

How long does arriving take? The answer is that the distance to the fixed point is multiplied by the slope at every step — so the slope is not merely a threshold, it is a rate, and reading it that way turns a picture into a prediction.

How fast an iteration arrives. The distance from the fixed point plotted against the step number on a logarithmic vertical axis, for two ordinary iterations and for Newton's method, whose curve bends downward.
Fig. 1 The distance from the fixed point against the step number, with a logarithmic vertical axis, so a constant factor per step is a straight line and its gradient is that factor. Two ordinary iterations, and Newton’s method, whose curve is not a line at all — its gradient doubles every step, which is what a squared error looks like on this axis.

The error obeys the derivative

Write pp for the fixed point and en=xnpe_n = x_n - p for the error at step nn. Then

en+1=f(p+en)f(p)=f(p)en+O(en2),e_{n+1} = f(p + e_n) - f(p) = f'(p)\,e_n + O(e_n^2),

which is the derivative doing what it is for: near enough to a point, a smooth function is its tangent line.

So once the error is small, each step multiplies it by λ=f(p)\lambda = f'(p). The distance falls geometrically, the number of correct decimal places grows by a fixed amount per step, and a logarithmic plot of the error is a straight line with gradient logλ\log|\lambda|.

The figure measures that. It runs the logistic map at two parameters, computes λ=2r\lambda = 2 - r from the arithmetic, and compares it against the ratio of successive errors taken from the orbit — two numbers reached by different routes, required to agree.

Where that ratio is measured is part of the claim. The exact recurrence is en+1=λenren2e_{n+1} = \lambda e_n - r e_n^2, so the measured ratio is λren\lambda - r e_n and equals λ\lambda only once the error is small. At r=2.95r = 2.95 the second term is still a twentieth after fourteen steps, which is more than the tolerance; taking the reading at a fixed step number therefore tests how fast the particular parameter happens to converge rather than the claim. The figure takes it at the last step before the error reaches the rounding floor, which is where the higher-order term is smallest.

What the rate is worth in digits

Turning the factor into something usable: if the error is multiplied by λ|\lambda| each step, the number of correct decimal places grows by log10λ-\log_{10}|\lambda| per step.

At λ=0.5|\lambda| = 0.5, that is about 0.30.3 places per step — three steps per digit. At λ=0.9|\lambda| = 0.9, about 0.0460.046 — twenty-two steps per digit. At λ=0.99|\lambda| = 0.99, two hundred and thirty steps per digit.

Convergence is a smooth function of the slope and usability is not. An iteration with λ=0.5\lambda = 0.5 is a tool; one with λ=0.99\lambda = 0.99 converges, in the sense that a proof is available, and is useless. The threshold at λ=1|\lambda| = 1 that the rung below is about is the boundary of a region in which the behaviour varies by three orders of magnitude.

A fixed point that attracts, and one that does not. The same map at two parameters, with the staircase walking towards the crossing in one and away in the other.
Fig. 2 The same distinction as a staircase. At the lower parameter the crossing is shallow and the steps walk in briskly; at the higher one the crossing is steep and they walk out. What the logarithmic plot adds is the rate, which the staircase shows only as how tightly the steps bunch.

The case where the slope is zero

If f(p)=0f'(p) = 0 the linear term vanishes and the next one takes over:

en+112f(p)en2.e_{n+1} \approx \tfrac{1}{2}f''(p)\,e_n^2.

The error is squared each step, not multiplied. The number of correct digits doubles rather than growing by a fixed amount, and a few steps take a rough guess to machine precision.

Such a fixed point is called superattracting, and the standard way to reach one is Newton’s method. Solving g(x)=0g(x) = 0 by iterating

N(x)=xg(x)g(x)N(x) = x - \frac{g(x)}{g'(x)}

gives a map whose derivative at a simple root is exactly zero — a short computation, and the whole reason the method is fast.

The figure runs it on x22x^2 - 2, from 1.91.9, and asserts two things rather than one. Exactly: en+1=en2/(2xn)e_{n+1} = e_n^2/(2x_n), which is algebra on the Newton step and holds at every step to the last bit. Approximately: the ratio en+1/en2e_{n+1}/e_n^2 approaches 1/(22)1/(2\sqrt2), which is the limiting constant everybody quotes.

Asserting the second at every step would fail on the first, by a third — x0x_0 is 1.91.9 and 2\sqrt2 is 1.4141.414. That is not an error in the iteration; it is an error about which of the two statements is a theorem, and the two are separated here for that reason.

What quadratic buys, in numbers

From an error of 0.50.5:

step linear at λ=0.5\lambda = 0.5 quadratic
1 0.25 0.09
2 0.125 0.0029
3 0.0625 3×1063\times10^{-6}
4 0.031 3×10123\times10^{-12}
5 0.016 3×10243\times10^{-24}

Five steps of the quadratic method exhaust double precision. Five steps of the linear one have gained one and a half digits.

That gap is the reason the distinction is not academic. Every root-finding method in use is chosen for its order of convergence, and the orders available are a small list: bisection is linear with λ=1/2\lambda = 1/2; the secant method is of order 1.6181.618, the golden ratio, because its error obeys a Fibonacci-like recurrence; Newton is quadratic; and Halley’s method, using the second derivative, is cubic.

Secants closing on the tangent to x². Secant lines through x = 1.4 and a second point 1.2, 0.8, 0.5, 0.28, 0.12 away, with the slope of each. They approach 2.8, the derivative there.
Fig. 3 The construction the secant method iterates: a chord through two points on a curve, closing on the tangent as the points approach. Using the chord’s root as the next guess gives a method of order φ\varphi — its error at each step depends on the two before, so the exponents obey the Fibonacci recurrence and their growth rate is the golden ratio, with no pentagon anywhere near it.

Reading the rate off a picture nobody drew for it

The rate is available from the cobweb itself, which is worth knowing because the logarithmic plot needs the answer in advance and the staircase does not.

Near the crossing the curve is nearly its tangent, so the staircase’s steps form a near-geometric sequence: each horizontal run is λ|\lambda| times the one before. So the ratio of consecutive step widths is the rate, and it can be measured with a ruler on a drawing where the fixed point is not marked.

The sign shows up as the shape. A positive slope gives a staircase that walks in from one side, monotonically; a negative one gives a spiral, with the orbit alternating either side of the crossing. That distinction is visible immediately and is invisible in the error plot, where only λ|\lambda| appears.

the logistic map at 2.6, iterated from 0.2. A map drawn as a curve with the diagonal across it, and the staircase that iterating it produces.
Fig. 4 A negative multiplier, drawn as a staircase. The slope at the crossing is 2r=0.62 - r = -0.6, so the orbit alternates sides and the rectangle of the cobweb spirals inward; the ratio of successive step widths is six tenths, which is the rate the logarithmic plot reports as a gradient.

So the two pictures carry complementary information. The staircase shows the sign and the qualitative behaviour and reads the rate badly; the error plot reads the rate precisely and loses the sign. Neither is a substitute, and the site’s habit is to draw both when both matter.

Why a fast method can still be a bad one

The order of convergence is the wrong thing to optimise on its own, and it is worth saying why before the table above is read as a ranking.

Newton needs the derivative. If it is unavailable or expensive, the secant method’s lower order may be reached in less total work — its order is 1.6181.618 but each step costs one function evaluation rather than two.

Newton is not global. Quadratic convergence is a statement about what happens near the root, and starting elsewhere the method may cycle, diverge, or land in the basin of a different root — which is what Newton’s basins are a picture of. Bisection, at λ=1/2\lambda = 1/2, is the slowest method on the list and the only one that cannot fail.

Order says nothing about a multiple root. At a root where gg and gg' both vanish, Newton’s derivative at the fixed point is not zero but 11/m1 - 1/m for a root of multiplicity mm — so the method degrades from quadratic to linear, and to linear with a rate that approaches one as the multiplicity grows.

That last is the sharpest case and it is worth having as a warning. A method’s advertised order is a property of the generic case, and the situations where a fast method is actually needed are frequently the degenerate ones where it does not have it.

The neutral case, where the rate is not a rate

At λ=1|\lambda| = 1 the linear term neither shrinks nor grows and the behaviour is decided by what comes after — which means it is not geometric at all.

Take f(x)=xx3f(x) = x - x^3 near zero, whose derivative at zero is exactly one. The orbit does converge to zero, and it converges like 1/n1/\sqrt{n}: the error after nn steps is about 1/2n1/\sqrt{2n}, so reaching three decimal places takes half a million steps.

That is qualitatively unlike either case above. There is no factor per step; the rate itself decays; and a logarithmic plot of the error against the step number is a curve, not a line, bending the wrong way.

The neutral case is also where the sign of the higher term decides everything. xx3x - x^3 converges to zero from either side; x+x3x + x^3 leaves it. Both have λ=1\lambda = 1, and no amount of information about the derivative separates them.

Where the linear term is silent, the answer is not a rate but a different kind of question. That is the standing situation at every threshold in this field: the logistic map at r=3r = 3 has a neutral fixed point and takes thousands of steps to settle, and the same is true at every parameter where a doubling happens.

the logistic map at 3, iterated from 0.2. A map drawn as a curve with the diagonal across it, and the staircase that iterating it produces.
Fig. 5 The logistic map exactly at the first doubling. The crossing is neutral — the curve is tangent to the diagonal there in the relevant sense — and the staircase creeps rather than walks: sixty steps drawn, and the orbit has not arrived.

Cycles have a rate too, and it is a product

A cycle of length kk is a fixed point of ff applied kk times, so its multiplier is the derivative of the composed map — which by the chain rule is the product of the slopes at the cycle’s points.

That has a consequence worth stating, because it is not obvious from the definition. A cycle can be attracting while every one of its points sits where the map is expanding, provided the product of the slopes is small enough — and it can be repelling while some of its points are in flat regions. The rate belongs to the cycle rather than to any of its points.

The logistic map at 3.2, and the same map applied twice. Two graphs with the diagonal across each: the map itself, whose crossings are its fixed points, and the map composed with itself twice, whose extra crossings are the points of a cycle.
Fig. 6 Where a cycle’s rate lives. On the left the map, with its two crossings; on the right the map composed with itself, whose two extra crossings are the points of a two-cycle. The rate that decides whether the cycle attracts is the slope of the right-hand curve at one of those crossings — which the chain rule says is the product of the left-hand curve’s slopes at both of them.

It also explains why the doublings accelerate. Each new cycle’s multiplier is a product of twice as many numbers, so it sweeps through the interval from 00 to 1-1 over a shorter range of the parameter; the cascade’s geometric spacing is that acceleration measured.

The same arithmetic outside this field

The rate is not about the logistic map or about roots, and three places it turns up with a different name are worth naming because they are the same calculation.

Contraction mappings. A map that shrinks everything by a factor k<1k < 1 has a unique fixed point and orbits reach it at rate kk — which is this section’s linear case with the derivative bound replaced by a uniform one. The theorem gives existence as well as the rate, and the price of the uniformity is that the rate is the worst one anywhere rather than the one at the fixed point.

Iterative solvers for linear systems. Solving Ax=bAx = b by repeatedly applying an affine map converges at a rate set by the largest eigenvalue in size of the iteration matrix — the multiplier generalised to several dimensions. One number again, and the same threshold at one, with the same catastrophe as it is approached.

Markov chains. How fast a chain forgets where it started is set by the second-largest eigenvalue of its transition matrix, and the mixing time is the reciprocal of the gap below one. The vocabulary is entirely different and the arithmetic is identical.

In every case the pattern is: linearise about the answer, find the factor, and the factor is the rate. That the same object — a derivative, a matrix’s spectrum, an eigenvalue — plays the part in all three is the reason this rung is worth having as a rung rather than as a remark inside another essay.

What the picture cannot show

The figure plots the error, which requires knowing the answer. That is available here because the fixed points are known in closed form, and in every situation where an iteration is actually used it is not — so the picture is a diagnostic drawn after the fact rather than something a practitioner sees.

It also cannot show the floor. Every curve stops where the error reaches the rounding limit, and past that point the plotted quantity is a fact about arithmetic rather than about the iteration. The Newton curve reaches it in five steps, which is why it is drawn for five and not for twenty.

And a logarithmic axis makes a straight line out of a constant factor, which is what makes the rate legible — and makes the early steps, where the linear approximation is not yet valid, look like a defect in the data. They are not. They are the higher-order terms, and they are the reason the figure measures its rate at the far end.

Where the ladder goes next

Above: two maps that turn out to be one map in different coordinates, which is how a hard iteration is turned into an easy one; the statistics an orbit leaves behind when no single step is worth reporting; and what a computer’s arithmetic does to an orbit it cannot represent.

One debt. The order of the secant method is quoted here as the golden ratio and the Fibonacci recurrence behind it is named rather than derived. It is a short derivation and it is one of the more surprising places that number appears, and it belongs on the golden ratio’s own ladder rather than on this one.

What the slope was measuring all along

The derivative at a fixed point is the factor the error is multiplied by, and everything about how an iteration performs follows from it.

Below one in size, the orbit arrives and the rate is that number. At zero, the linear term is gone and the error squares, which is what makes Newton’s method the tool it is. At one, there is no rate at all and the answer depends on what the derivative could not see. Three regimes, one number, and the picture that shows which is the same staircase the bottom of this ladder drew.