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
One equation for one unknown, or equations for unknowns. The function 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 from gives and ; the error falls from to .
Usually a loop. Each step replaces by its tangent and solves the linear problem
where 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.
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.
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:
- which of the solutions you land in;
- whether the Jacobian is invertible where you need it;
- whether your start is inside the region where the method converges.
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
- Several solutions. Two circles meet twice, and a linkage has two assemblies. The start decides the branch, which is why a continuation from a known state is often the right tool.
- Singular Jacobian. At a toggle or a bifurcation the step cannot be solved. Arc-length continuation walks around it.
- Constraints. If the rule has to hold and a second rule prices it, the problem is a saddle point, not a root.
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 |
| 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 |
| 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.
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
- Where the wheel goes: two circles meet, and the meeting point is the pose.
- The position of a four-bar linkage at a given crank angle.
- The equilibrium of a bushed linkage, where the spring force and the geometry have to agree.
- A boundary-value problem solved by shooting: guess the slope, integrate, correct.
- Chemical equilibrium: the species have to balance.
- Power flow: the network has to satisfy Kirchhoff's laws.
- A CAD constraint solver: the sketch has to close.
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
- A-level Mathematics · §9.3 Newton–Raphson and other recurrence relations
- Maths Applied · §1.2 One rigid triangle
- Maths Applied · §1.5 Bushes are not rigid
Read next
- The same corner, five ways — this class, worked on one mechanism with the numbers beside it.
- Why Newton is fast, and when it is not — the working under this class: the squared error, and what a double root does to it.
- Saddle point — the same loop with a constraint priced in.
- Optimisation — a minimum is a root of the gradient.
- When it goes wrong — the symptom table for every class.
Back to the map: the nine kinds puts this class among the other eight.