A13 · Lesson 7 · Order of convergence and safeguarded root finding
Measuring how fast a method closes in, and making a fast one safe
Bisection never fails but crawls. Newton flies but can be thrown anywhere by a bad start. Real solvers combine them: keep a bracket that's guaranteed to contain the root, take the fast step when it lands inside the bracket and actually helps, and fall back to bisection when it doesn't. That's how scipy.optimize.brentq and every robust root finder in a simulator work. To compare methods honestly you need one number for speed, the order of convergence, and a way to measure it from a run.
- Each stem is of the error after n steps, starting from the same error (with all constants set to 1).
- Linear convergence (rate ρ) is a straight line falling per step. The secant method (order 1.618) and Newton (order 2) curve downward ever faster: each step multiplies the number of correct digits by the order.
- Make larger (a worse start): every method takes longer, but the superlinear ones lose only a step or two.
Predict
A method's errors are , , , . What's its order?
1.5: each exponent is 1.5 times the last (2, 3, 4.5, 6.75). The order is the ratio , here , measured straight from a run.
Name it
Order of convergence
A sequence converges with order p if :
| Method | Order | New evaluations per step |
|---|---|---|
| bisection | 1 (rate ½) | 1 |
| fixed-point iteration | 1 (rate ) | 1 |
| secant | 1.618 | 1 |
| Newton | 2 | 2 (f and f′) |
| Halley | 3 | 3 (f, f′ and f″) |
To estimate p from three successive errors (or from successive steps, when the root is unknown):
The efficiency index , for w evaluations per step, compares methods per unit of work: secant 1.618, Newton 1.414, Halley 1.442.
Safeguarded root finding
Keep a bracket [a, b] with and of opposite sign. Each step:
- Propose a fast step (Newton, secant, or inverse quadratic interpolation through three points).
- Accept it if it lands inside the bracket and shrinks the problem enough (Brent's test: the step must be less than half the one before last).
- Otherwise take a bisection step.
- Update the bracket so it still has a sign change.
The result can't do worse than bisection and is usually as fast as the secant method. Brent's method is this scheme with inverse quadratic interpolation; it's the default scalar root finder in most libraries.
Accelerating a linear sequence
If converges linearly, Aitken's Δ² formula usually lands much closer, by assuming the error shrinks by the same factor each step.
Worked example
Newton's iterates for have errors , , . Estimate the order.
Show the solution
- Log of the newer error ratio.
- Log of the older error ratio.
- Their quotient is the order. Quadratic, as theory says.
Answer the order is about 1.98, quadratic.
Worked example
Apply Aitken's formula to from 1: 0.540302, 0.857553, 0.654290.
Show the solution
- The denominator. With the three iterates,
- Aitken's formula. The numerator is :
- Compare with the fixed point. Against 0.739085, one formula took the error from 0.085 to 0.005.
Answer , an error of 0.005 against the last iterate's 0.085.
Worked example
Newton costs one function and one derivative evaluation per step; the secant method costs one function evaluation. If a derivative costs as much as a function, which converges faster per evaluation?
Show the solution
- Newton's index. Order 2 per step, using 2 evaluations, gives per evaluation.
- The secant method's index. Its order is with 1 evaluation, an index of 1.618.
- Compare. The secant method wins: per unit of work it multiplies the number of correct digits by 1.618 against Newton's 1.414.
- When Newton wins. If the derivative is nearly free (as in polynomials evaluated with Horner's rule), Newton's index rises toward 2 and it wins instead.
Answer the secant method, with an efficiency index of 1.618 per evaluation against Newton's 1.414.
Check
A method's successive errors are 0.1, 0.03162 and 0.005623. What's its order?
Check
A method of order 2 needs 2 function evaluations per step. What's its efficiency index?
Check
Newton's method starts with error 0.1 (take C = 1). How many steps until the error is below ?
Check
Apply Aitken's Δ² formula to 0.6967, 0.767, 0.72.
Check
A safeguarded solver falls back to bisection every step on a nasty function. At worst, how many steps does it need to get within 1 × 10⁻⁶ of a root bracketed 1 wide?
Check
A safeguarded solver's Newton step lands outside the current bracket. What should it do?
Check
A method of order 1.618 starts with error 0.1 (take C = 1).
(a)
How many steps until the error is below ?
Check
Aitken's formula is .
Step 1
A sequence is exactly . What is ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What does Aitken's formula give from , , ?
Explain why
Why does a safeguarded method converge as fast as the secant method on good problems but never slower than bisection on bad ones?
It keeps a bracket in which f changes sign, so the root is always inside it. On each step it tries the fast update and accepts it only if it lands inside the bracket and shrinks things enough; otherwise it bisects. Near a simple root of a smooth function the fast steps always pass the test, so the method inherits their superlinear order. On a badly behaved function the fast steps get rejected, and each rejection costs one bisection step, which still halves the bracket. So the worst case is bisection's guaranteed one bit per step, and the typical case is far better.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.