Numerical Methods

All books

Root finding

You have one of these when a rule has to hold at a point, the rule bends with the answer, and nothing changes with time.

Root finding, not a linear system. A rule that bends is iterated; a rule that is linear is solved in one step. If every row is a sum of the unknowns, the iteration is rediscovering a factorisation.

What you are modelling

A state that has to satisfy a condition. The condition can come from geometry, because two circles have to meet. It can come from balance, because the forces have to add to zero. It can come from closure, because a loop of links has to come back to where it started.

The answer is the state where the condition holds. There may be more than one.

The model you write down

F(x)=0.F(x) = 0 .

One equation for one unknown, or nn equations for nn unknowns. The function FF is usually a residual: it measures how far the current guess is from satisfying the rule, and zero means satisfied.

What it becomes on a computer

Worked number. Newton's method on f(x)=x2−2f(x)=x^2-2 from x=1x=1 gives x1=1.5x_1=1.5 and x2=1.4167x_2=1.4167; the error falls from 0.4140.414 to 0.00240.0024.

Usually a loop. Each step replaces FF by its tangent and solves the linear problem

J(xk) δ=−F(xk),xk+1=xk+δ,J(x_k)\,\delta = -F(x_k), \qquad x_{k+1} = x_k + \delta ,

where JJ is the Jacobian. This is Newton's method, and everything else in the box is a way of doing it more safely or more cheaply.

A closed form is a root solution too. Iteration is the usual method when the rule cannot be rearranged, not a requirement of the class. The two circles meeting in §1.2 of Maths Applied is the counterexample: it is a root problem solved in one closed-form step.

Two things decide whether you get an answer: the start, and the number of solutions. Newton is fast near a solution and unreliable away from one. A bracketing method is the reverse.

Bisection is that reverse made exact. It keeps two ends whose signs differ, looks at the middle, and throws away the half whose ends share a sign. The figure does one halving at a time.

Figure 1

Five halvings leave a thirty-second of the width. Say why the answer cannot leave the bracket, and what that certainty costs.

The start decides whether the sequence lands, and how fast.

Figure 2

The signature

The rule holds at a point, and the point is found — usually by iteration, sometimes in closed form. There is no region and no time. The difficulty is:

A mechanism at a toggle point has a singular Jacobian, and that is a fact about the mechanism, not a failure of the method.

Flags that matter here

Techniques

Every method named here is in Methods, A to Z, with its price and what it will not do.

Start from the model you have. Each row is a property of the model in front of you, the methods that fit it, and what the fit costs. The method-keyed table below is the same list sorted by name.

what your model is the methods that fit the price
one rule, and you have a bracket Bisection, Brent certain and slow: forty steps for ten digits
one rule, no derivative Secant, false position, Brent a poor bracket misleads
one rule, derivative available Newton, quasi-Newton (Broyden) a bad start, or a singular Jacobian
several solutions, and the start decides Continuation, homotopy the path has a fold, and you step in xx
many unknowns, or a step the model cannot trust Levenberg–Marquardt, trust region the linear algebra is the cost
a map that shrinks the error Fixed-point iteration the map must be a contraction
technique what it does when it wins when it is the wrong tool
Bisection Halves a bracket that contains a sign change You have a bracket and need certainty Needs 40 steps for ten digits; one equation only
Secant, false position Interpolates between two points The derivative is unavailable The bracket is poor
Newton Uses the Jacobian Few unknowns, Jacobian available A bad start; a singular Jacobian
Quasi-Newton (Broyden) Updates an approximate Jacobian The Jacobian is expensive Many unknowns with strong coupling
Brent Combines a bracket with fast interpolation One equation, no derivative, need reliability Systems of equations
Fixed-point iteration Repeats a map that shrinks the error The map is a contraction The map expands; most interesting cases
Continuation, homotopy Solves a sequence from a known case Several solutions, toggle points The path has a fold and you step in xx
Levenberg–Marquardt Damped least squares Overdetermined or near-singular systems A square, well-conditioned system
Trust region Limits the step to where the model is trusted The linear model is poor far from the answer Cheap, well-scaled problems

The secant is the derivative-free version of the tangent step: it takes the line through two guesses rather than the line at one. The figure takes one secant at a time.

Figure 3

The line needs no slope from the model. Say what the two residuals give it, and why its crossing can land on either side of the root.

Systems that live here

What goes wrong

symptom cause fix
It converged to the wrong assembly Two solutions, and the start chose one Start from the branch you want; continue from a solved case
It oscillates and never settles The step is too large, or the Jacobian is wrong Damping or a line search; check the Jacobian by differences
It fails exactly at a limit position The Jacobian is singular at a toggle Arc-length continuation, or re-parameterise the step
It reports no solution The model is infeasible, not the solver Check the residual at the start; the rule may be contradictory
Two unknowns moved in opposite directions The system is ill-conditioned Scale the variables; check for redundancy

Used in this collection

Back to the map: the nine kinds puts this class among the other eight.

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Layout

How pages are arranged. Your colours stay the same.

Reading offline

Keep this book on this device and read it offline.