Root-Finding and Iterative Methods
A startling amount of physics ends at the same wall: an equation that no rearrangement will solve in closed form. Dispersion relations, the transcendental matching conditions of a square well, Kepler's equation for the orbit of a planet, and the Bohr–Sommerfeld quantization condition that opens the door to the WKB Approximation all deliver a curve and ask where it crosses zero — and algebra simply refuses to answer. Root-finding is the craft of answering anyway, by replacing the impossible demand for an exact inverse with a recursion engineered so that its limit, if it exists, is the root. Two questions decide everything. Does the iteration converge, and how fast? Convergence is a statement about whether the map pulls nearby points together — the contraction-mapping principle of Banach, one sentence of analysis that governs every scheme here. Speed is the order of convergence , defined by with : bisection crawls linearly (), the secant method sprints superlinearly (), and Newton's method doubles its correct digits every step (). The engineer's answer is never one method but a marriage of two. Bracketing schemes trap a root inside a known sign change and can never lose it, so they always converge, slowly and safely; open schemes fly toward a root once near one but can overshoot, cycle, or diverge from a poor start. Production solvers — Brent's method, the workhorse behind every `scipy.optimize.brentq` — braid bisection's guarantee together with interpolation's speed. The same fixed-point idea, lifted to vectors and function spaces, becomes the Jacobian Newton step, Picard iteration, and the self-consistency loops of Hartree–Fock and the renormalization group.
- Root-finding solves for nonlinear by generating a sequence that converges to a root ; every method is a fixed-point map .
- Bisection brackets a sign change and halves the interval each step — guaranteed but only linear, , so about decimal digit per step.
- Newton–Raphson linearizes at , giving with quadratic convergence at a simple root: correct digits double each iteration.
- Fixed-point iteration converges iff the map contracts, , at the linear rate ; Newton is the special map engineered so .
- The secant method replaces by a finite difference and converges at order without any derivative.
- Speed and safety are independent qualities — real codes hybridize a bracketer with an open method (Brent) to get both.
- Key idea: every root-finder is a fixed-point map , and its convergence and order are dictated entirely by the leading non-vanishing derivative of at the fixed point .
Every root-finder is a fixed-point map ; whether it converges, and how fast, is fixed entirely by how behaves near the fixed point — specifically by the first non-vanishing derivative of at .
Where this lives today
Root-finding is invisible infrastructure: it runs inside almost every quantitative calculation without ever being named. When a physicist calls `scipy.optimize.brentq` to find a bound-state energy, they are running Brent's 1973 hybrid — bisection braided with inverse-quadratic interpolation — which guarantees convergence while usually achieving superlinear speed. In electronic-structure codes the self-consistent field loop is nothing but high-dimensional fixed-point iteration: the map takes a trial density to the density it produces, and the notorious "charge sloshing" instability is exactly the failure of the contraction condition , tamed by density mixing (damped iteration). Spacecraft navigation at JPL solves the same Kepler equation Newton's contemporaries did, only billions of times per mission. And at the frontier, machine-learning training is fixed-point iteration in a space of billions of parameters, where the analogue of is precisely what decides whether a run converges or diverges.
The physical picture
Think of as the question "where does this curve cross the axis?" Newton's method answers it with a ruler: stand at your current guess, draw the tangent line, and slide down it to the axis — that landing point is your next guess. Where the curve is nearly straight the tangent is an almost perfect stand-in, so the new guess is dramatically better than the old one. Bisection answers the same question with a single yes/no probe: it keeps a bracket that is known to straddle the root and asks only "is the root in the left half or the right half?", throwing away the wrong half each time. The first figure shows Newton's tangent construction on a concrete curve, with real numbers attached.
Fixed-point iteration is the same idea stripped to its skeleton. Rewrite as and feed each output back as the next input; geometrically you bounce between the curve and the diagonal . If is shallower than the diagonal near the crossing () the bounces spiral inward and you converge; if it is steeper they fly outward and you diverge. The whole theory lives in that one slope. And the payoff of a well-chosen map is dramatic: quadratic convergence means the number of correct digits roughly doubles each step — in three iterations — whereas linear convergence adds a fixed number of bits per step, so bisection needs some fifty iterations to reach machine precision. The second figure makes that gulf concrete by racing the three methods on one root.
Order of convergence is a strictly local statement, and that is the recurring trap. A method that converges quadratically once it is near the root can still be sent diverging by a bad starting guess; speed near the root and reliability far from it are independent virtues. That single fact — that you can be fast or safe but rarely both from one formula — is why every serious library ships a hybrid.
The core equations
The object of study is the root and the error that measures our distance from it. Fixing this notation once makes every convergence statement below a claim about a single sequence of numbers and how fast it collapses to zero.
where: — continuous (often smooth) real function whose zero is sought; — the exact root; — the -th iterate; — the error of the -th iterate. Every method below is judged solely by how decays. The safest scheme needs almost nothing: only that is continuous and changes sign across a bracket. By the Intermediate Value Theorem a sign change guarantees a root inside, and halving the interval halves the guaranteed error without ever consulting the shape of .
where: — the current bracket, guaranteed to contain a root; — its midpoint, which replaces whichever endpoint keeps the sign change straddling the root. The error obeys deterministically. The fastest common scheme trades that guarantee for speed. Newton–Raphson models by its tangent line at the current iterate and jumps to where the tangent hits the axis, which is exact for a straight line and superb for a gently curving one.
where: — the derivative at the current iterate, which must be non-zero. Reading it: the correction is large where the function is far from zero or the slope is shallow, and small where you are close or the slope is steep. The three-line construction is this: linearize, ; set the model to zero, ; and solve for . Every method on this page is secretly the same object — a map whose fixed point is the root. Writing as exposes the common skeleton and lets one theorem govern them all.
where: — the iteration map, chosen so that ; its fixed point is the sought root. Newton is the choice ; bisection is a set-valued version of the same idea. Speed is quantified by a single exponent that compares consecutive errors. This one definition sorts every method into a class and tells you how many iterations a target precision will cost.
where: — the order ( linear, quadratic; superlinear); — the asymptotic error constant, which for must satisfy for convergence at all. Reading it: with the number of correct digits doubles per step; with it grows by a fixed amount per step. When the derivative is expensive or unavailable, the secant method estimates it from the two most recent points, buying most of Newton's speed for one function evaluation per step and no calculus.
where: — the two previous iterates, through which the secant line is drawn as a stand-in for the tangent. Its order is the golden ratio , derived below. The same fixed-point machinery lifts verbatim to systems of equations, where the scalar slope becomes the Jacobian matrix and division becomes a linear solve.
where: — the vector of nonlinear equations ; — the Jacobian, . In practice one never inverts but solves the linear system for the step . Underneath all convergence proofs sits one condition: the map must pull points together. This inequality is the entire content of the Banach fixed-point theorem and the master switch for whether any iteration works.
where: — the Lipschitz (contraction) constant; guarantees a unique fixed point and convergence from any start in the interval. For a differentiable the local rate is , and .
The goal is to prove that Newton's method squares the error each step at a simple root, and to pin down the exact constant that multiplies . We assume a simple root — with — and near it, then expand to second order about the current iterate , insert the Newton step, and watch the first-order error terms cancel identically, leaving a clean law whose constant is the curvature-to-slope ratio at the root. This single cancellation is the reason Newton is the gold standard, and its failure is why multiple roots misbehave.
Step 1. Taylor-expand about and evaluate at the exact root, keeping the exact remainder: , with between and , and note . Why: evaluating the model at the point where genuinely vanishes is what lets the unknown root enter the algebra exactly rather than approximately.
Step 2. Divide through by and use to obtain . Why: dividing by the slope manufactures precisely the Newton correction as a term, so the next step can substitute it away.
Step 3. Insert the Newton step. The next error is , and , so . Why: this rewrites the abstract "next error" purely in terms of quantities that Step 2 already relates, closing the loop.
Step 4. Combine Steps 2 and 3: the line from Step 2 says , and substituting gives . Why: the terms cancel exactly — that cancellation, not any approximation, is the origin of quadratic order.
Step 5. Take the limit , so , and the boxed error law follows with order ; the constant diverges precisely when , i.e. at a multiple root. Why: the constant's blow-up is a warning label — quadratic convergence is a promise made only at simple roots.
Verified: matches Burden & Faires Thm 2.9 and the Newton convergence result in Arfken–Weber; reproduced numerically for , where errors fall .
Go deeper · Derivation B · 2 minConvergence of fixed-point iteration by the Banach contraction principle
The goal is to show that a map which contracts distances has exactly one fixed point and that simple iteration reaches it from any starting point in the interval, at a linear rate set by the contraction constant. We suppose is continuous and Lipschitz with constant , then establish existence from the Intermediate Value Theorem, uniqueness from the contraction inequality, and geometric decay of the error by iterating that same inequality — the complete Banach argument specialized to the real line. The final step shows how engineering upgrades this linear result to the quadratic one Newton enjoys.
Step 1. Existence: since maps into itself, the continuous function satisfies and , so by the Intermediate Value Theorem has a zero — a fixed point exists. Why: mapping the interval into itself is what forces the graph of to cross the diagonal, which is geometrically what a fixed point is.
Step 2. Uniqueness: if and were both fixed points, then , and with this can only hold if . Why: a genuine contraction cannot keep two distinct points at their distance, so it can pin down only one.
Step 3. Error recursion: apply the contraction bound to the iterate and the root, . Why: this is the workhorse inequality — one application per step, and it says the error shrinks by at least the factor every iteration.
Step 4. Iterate the bound to get : convergence is linear with asymptotic rate , since for differentiable the sharpest local is . Why: a geometric sequence with ratio below one collapses to zero, and its ratio is exactly the local slope of the map.
Step 5. Higher order: if in addition , a Taylor expansion gives — the iteration is now quadratic, and Newton's map is precisely the one built to have . Why: this unifies the page — Newton is not a separate miracle but the contraction whose first derivative was deliberately annihilated.
Verified: the standard Banach fixed-point theorem, Stone–Goldbart on contraction mappings; the rate is confirmed numerically for , whose fixed point has .
Go deeper · Derivation C · 1 minThe golden-ratio order of the secant method
The goal is to explain why replacing Newton's exact derivative by a two-point finite difference costs so little — the order drops only from to the golden ratio — and to derive that number from the secant error recurrence. We first establish that the secant error obeys a product law with the same Newton constant , then impose the self-similar ansatz that any power-law convergence must satisfy, and match exponents to land on , whose positive root is the golden ratio — which is why the secant is the efficient derivative-free cousin of Newton.
Step 1. Expanding to second order at and and substituting into the secant formula (6) gives the error recurrence . Why: the secant line's deviation from the tangent is second order, so the leading error is bilinear in the two most recent errors rather than quadratic in one.
Step 2. Posit power-law convergence, , which also means , hence . Why: if the method has a definite order at all, consecutive errors must be related by that same power — this is the only self-consistent asymptotic form.
Step 3. Substitute both into Step 1: . Matching the powers of forces . Why: for the relation to hold as the exponents on both sides must agree — the constants only fix , not the order.
Step 4. Solve , whose positive root is — superlinear, achieved with a single new function evaluation and no derivative. Why: this is the quantitative payoff — the secant is nearly as fast as Newton yet needs neither nor a second sample of per step, so when is costly it is often the better buy.
Verified: the recurrence and order appear in Numerical Recipes §9.2 and Burden & Faires; reproduced for , where the secant reaches in seven steps versus Newton's four.
Limiting cases
How each scheme behaves is dictated by the local structure of and of the iteration map at the root:
| Case | Result | Meaning |
|---|---|---|
| Simple root, good start | Newton converges quadratically; the error constant is the curvature-to-slope ratio at the root. | |
| Multiple root, multiplicity | Newton degrades to linear at rate (so for a double root); modified Newton restores quadratic order. | |
| Fixed point with | Any map whose first derivative vanishes is automatically second order — exactly what Newton engineers. | |
| Contraction | Plain fixed-point iteration: linear, gaining digit per step. | |
| Bisection | Error halves deterministically whatever the shape of ; global but only linear at rate ( digit per step). |
Worked examples
1 · Newton for √2, digit by digit (confidence builder)
Solve by Newton's method from , and watch the correct digits double.
Step 1. Form the iteration. With and , the Newton step is — the ancient Babylonian square-root rule, which is Newton in disguise.
Step 2. Iterate from . One gets , then , then . Against the errors are , , , .
Step 3. Read the pattern. The exponents of the error roughly double each step (), the signature of quadratic order. The predicted constant is ; the check confirms it to two figures. Three iterations take a two-digit guess to full double precision.
2 · Kepler's equation for a planet's position
A body orbits with eccentricity . At a mean anomaly rad, find the eccentric anomaly from Kepler's equation , which has no closed-form inverse.
Step 1. Cast it as a root problem. Define ; then , which is bounded between and here, so the tangent never goes flat and Newton is safe. The iteration is .
Step 2. Start from (an excellent seed for modest eccentricity). The residual , giving . The next residual is , giving ; then with residual .
Step 3. Confirm and interpret. One more step pins rad to machine precision — four iterations total. The residual fell , quadratic as promised. This is the workhorse of orbital mechanics: every ephemeris and spacecraft-tracking routine solves Kepler's equation this way. E = 0.615468 rad, reached in four Newton steps.
Physics of the portrait
Root-finding carries one name above all others — the method that bears it was the first to make correct digits explode, and its inventor built it from the calculus he had just created.
Origins · 1 minIsaac Newton and how this was discovered
Isaac Newton described his root-finding scheme around 1669 in De analysi and again in Method of Fluxions, but not in the form students learn today: he applied it to a specific cubic, , generating corrections term by term without ever writing down a derivative or a general tangent-line formula. Joseph Raphson simplified and generalized it in 1690 into the iterative shape that now carries both their names, and Thomas Simpson in 1740 was the first to cast it explicitly in the language of fluxions — derivatives — and to extend it to systems of two equations, making it the general method we use. The convergence theory came much later: the sharp statement that a simple root gives quadratic order, with the error constant , is a nineteenth- and twentieth-century refinement, and the contraction-mapping principle that unifies all of it was proved by Stefan Banach in his 1922 thesis. The threads meet in the modern picture — a root-finder is a fixed-point map, and its order is read off from the derivatives of that map at the root — a synthesis that turns Newton's clever cubic trick into one line of a universal theory that now runs inside every scientific library on Earth.
Going further
Texts. Stone & Goldbart, Mathematics for Physics (CUP, 2009), on contraction mappings · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed. · Press, Teukolsky, Vetterling & Flannery, Numerical Recipes, 3rd ed. (CUP, 2007), Ch. 9 · Burden & Faires, Numerical Analysis, 9th ed., Ch. 2 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed.
Provenance. The Newton error law and the contraction theorem follow standard textbook derivations (Burden & Faires 2.9; Stone–Goldbart). The secant order follows from ; the bisection bound and the -iteration count are exact. All worked numbers were recomputed here: Newton on (errors ), the secant reaching in seven steps, Kepler , and the Dottie number with rate . A verifier should re-run the Taylor cancellation, the golden-ratio recurrence, and the multiplicity- rate against Arfken–Weber and Riley–Hobson–Bence.
Prerequisites. Taylor's Theorem · Continuity and the Intermediate Value Theorem · Order Symbols and Gauge Functions. Leads to. Bohr–Sommerfeld Quantization · Connection Formulae and Turning Points · WKB Approximation.
Ask the tutor: Give me any equation you cannot solve by hand — a dispersion relation, Kepler's equation, a quantization condition — and I will walk you through choosing a method, bracketing the root, and watching the digits converge.
When should I reach for bisection instead of Newton?
Whenever reliability matters more than speed, or you have a bracket but no good starting guess. Bisection needs only a sign change and continuity, and it cannot fail: the error is guaranteed to halve every step regardless of how badly behaved is between the endpoints. Newton is far faster near a simple root but needs the derivative, a decent initial guess, and a well-behaved ; give it a bad start and it can diverge. The honest answer in practice is "neither alone" — use a hybrid like Brent's method, which keeps a bracket at all times (so it inherits bisection's guarantee) but takes fast interpolation steps whenever they stay inside the bracket. That is why library routines default to Brent rather than to raw Newton.
Why does Newton's method sometimes diverge or cycle?
Because the tangent-line model is only trustworthy near the root. Far away, three things go wrong. If is small, the tangent is nearly horizontal and its intercept flies off to a distant point — a single flat spot can throw you across the whole domain. If the curvature is strong, the step can overshoot the root and land on the far side, worse than before. And for some functions the iteration settles into a stable cycle, bouncing between two points forever without converging — the classic example is started at , which oscillates between and . The cure is always the same: bracket the root, verify each step actually decreases , and reject any Newton step that tries to leave the bracket, substituting a bisection step instead.
What does "order of convergence" actually mean operationally?
It is the exponent in , and the cleanest way to feel it is in digits. Linear convergence () adds a fixed number of correct digits per step — bisection buys about of a decimal digit each halving, so roughly ten steps per three digits. Superlinear () accelerates: the secant's means each step's digit-gain itself grows. Quadratic () doubles the number of correct digits every step: three correct digits become six, then twelve, then twenty-four. This is why Newton reaches double precision in a handful of iterations while bisection needs fifty from the same bracket. The order is a property of the method and the local behavior of , not of the particular equation.
Is the secant method just a worse Newton?
Not worse — different trade-offs. The secant method sacrifices a little order (1.618 versus 2) but eliminates the derivative entirely, using only values of you already computed. When is expensive, unavailable, or noisy — think of an that is itself the output of a long simulation — the secant is often the better choice, because the right measure of cost is work per correct digit, not order alone. Counting function evaluations, Newton needs and each step while the secant needs only one new , so their efficiency indices () are for Newton versus for the secant. By that honest measure the secant can actually win. Its cousin, the derivative-free Brent method, is what most libraries ship.
How do I find all the roots of a function, not just one?
No single starting guess can guarantee you every root — open methods converge to whichever root their basin of attraction leads to, and those basins can be fractally tangled. The reliable strategy is to bracket first: scan the domain on a grid fine enough to catch every sign change of , and each sign change brackets at least one root that bisection or Brent will then isolate. For the transcendental equations of physics — say for a finite square well, with infinitely many roots marching off to large — this is exactly right, because the roots interleave the poles of predictably, giving a natural bracket around each bound state. Newton alone would jump unpredictably between branches; grid-and-bracket extracts the energies one at a time, in order.
What is Brent's method, and why do libraries prefer it?
Brent's method (1973) is the practical resolution of the speed-versus-safety dilemma. It always maintains a bracket that straddles the root, so like bisection it can never diverge and always converges. But instead of blindly halving, it fits an inverse quadratic through the three most recent points and jumps to that curve's root — a superlinear step — accepting it only if the result stays inside the bracket and is making adequate progress; otherwise it falls back to a guaranteed bisection step. The result inherits bisection's ironclad convergence and, on smooth functions, achieves nearly the secant's speed. This is precisely the hybrid philosophy the whole subject points toward, and it is why `brentq` is the default one-dimensional root-finder in SciPy, GSL, and Numerical Recipes.
How does root-finding connect to WKB and quantization?
Directly — quantization conditions are root-finding problems. In the WKB approximation the Bohr–Sommerfeld condition becomes, once the action integral is evaluated, a transcendental equation for the allowed energy . Because the classical turning points depend on , the action is a nonlinear function with no closed-form inverse, so each energy level is literally a root, extracted by Newton on or, more safely, by bisection between successive levels. The same is true of exact bound-state conditions like . This is why root-finding sits directly upstream of the WKB chapter: every energy eigenvalue you will compute there is the output of an iteration of exactly the kind derived on this page.