🔍Nonlinear Equations
Newton's Method and the Secant Method
Linearisation, quadratic convergence, failure modes, the secant method and safeguarded Newton
Cambridge, 1669
Isaac Newton is 26. In a manuscript he calls De analysi, circulated among a few mathematicians and not printed until 1711, he sets himself a cubic:
He guesses , which is close: . He writes , substitutes, and gets . Since is small, and are smaller still. He drops them. What remains is linear: , so .
Now . He substitutes again, drops the small powers again, and gets a correction of . Then another. Each correction is roughly the square of the last.
Twenty-one years later Joseph Raphson published a cleaner version that worked directly with the original equation instead of rebuilding a new polynomial each time. Thomas Simpson extended it in 1740 to general functions and to systems of two equations. The method carries Newton's and Raphson's names, and every quadratically convergent algorithm since is a descendant.
Newton's move — throw away the nonlinear terms because the correction is small — is linearisation, and it is the most important idea in numerical analysis. In modern language: near a guess , Taylor's theorem gives
Drop the last term, set the rest to zero and solve for .
Newton's method. Geometrically: follow the tangent line at (x_k, g(x_k)) down to where it crosses zero.
💡Quadratic convergence
Let be the error, with and . Expanding about and substituting into the Newton step gives
The new error is proportional to the square of the old one. If , then is around : the number of correct digits roughly doubles every step. Bisection adds a fixed 0.3 digits per step; Newton multiplies the digits by two.
Derivation
Why the error is squared
Expand about the current iterate , evaluate at the root , and keep the exact Taylor remainder (lesson 1-3):
Divide by , which is not zero near a simple root:
The Newton step says . Substitute it, and the first two terms become :
This is exact. As , and both approach and the factor approaches the constant . The derivation also shows when Newton fails: the division needed , and the conclusion is only useful once — that is, close enough to the root.
📐Newton's cubic, digit by digit
From , with and , the iterates are 2.0, 2.1, 2.0945681211, 2.0945514817 and 2.0945514815423265, with correct digits of 1.3, 2.6, 5.1, 10.1 — doubling, exactly as the theory says. The constant predicts ; the measured value is .
If I have seen further it is by standing on the shoulders of Giants.
How Newton fails. The derivation assumed a good guess and a nonzero slope. Remove either and the method can misbehave badly:
- A flat tangent. If , the tangent is nearly horizontal and the next iterate is thrown far away. For the nozzle equation below, the slope is exactly zero at the throat, .
- Divergence. For , the root is 0, but from any each iterate is further out than the last, alternating in sign.
- Cycles. For starting at 0, Newton goes to 1 and straight back to 0, forever.
- Multiple roots. At a double root too; convergence becomes linear, gaining only a fraction of a digit per step.
Newton's convergence is local: guaranteed only once you are close enough. How close depends on the function.
The secant method. Newton needs . Sometimes you have no formula for it — might be the output of a simulation. Replace the tangent with the secant line through the last two iterates:
This is false position without the bracket: it always uses the two newest points, so nothing gets stuck. The error now satisfies , and the order of convergence solves :
The secant method's order of convergence is the golden ratio. Each step costs one function evaluation instead of Newton's two (g and g′), so per evaluation the secant method is often faster than Newton.
Derivation
From to the golden ratio
The error relation. Near the root write , with and , evaluated at . The secant slope through the last two points is then
a slightly wrong tangent. Put it into the secant step , subtract , divide top and bottom by and write :
For small errors , so to second order
The order. Suppose the method has order : for every . Then also , so . Substitute both into the error relation:
For this to hold as the powers of on the two sides must agree: , or . Its positive root is .
Measuring it. The same assumption gives for consecutive ratios; taking logarithms, — the estimator used in the callout below and in the lab.
🕰Measuring order from data
If , then . In double precision the secant method reaches machine precision in about six steps — too few for the estimate to settle. Run it in 300-digit arithmetic and the estimates go 1.50, 1.67, 1.60, 1.625, 1.615, 1.619, 1.618, 1.618… homing in on the golden ratio. You will do exactly that in the lab.
💡Safeguarded Newton
Production root finders combine the two worlds: keep a bracket , try a Newton (or secant) step, and accept it only if it lands inside the bracket. If it does not, or if it fails to shrink the bracket enough, take a bisection step instead. Then update the bracket using the sign of at the new point.
Near the root every Newton step is accepted and you get quadratic convergence. Far from it, bisection keeps you safe.
scipy.optimize.newton does not do this; rtsafe in Numerical Recipes and brentq (with interpolation instead of derivatives) do.📐The rocket nozzle
In a converging–diverging nozzle the isentropic area ratio fixes the Mach number:
For and there are two answers: a subsonic upstream of the throat and a supersonic downstream. Newton from finds the first in 5 steps; from it finds the second in 6. From it cannot even start — the slope of is zero at the throat. The physics decides which root you want; your starting guess must respect it.
💡Where you will use this
Rocket Propulsion: exit Mach from area ratio, chamber temperature from an energy balance, shock positions. Orbital Mechanics: Kepler's equation is solved by Newton in every orbit propagator. Aircraft Engines: turbomachinery matching. Structures: nonlinear finite-element analysis is Newton's method on millions of unknowns, and its convergence plots are the doubling digits of this lesson.
📚Further reading
- Michael Heath, Scientific Computing: An Introductory Survey (2nd ed.; SIAM Classics 2018), chapter 5, 'Nonlinear Equations' — Newton, secant and safeguarded methods with their convergence rates.
- C. T. Kelley, Solving Nonlinear Equations with Newton's Method (SIAM, 2003) — a short, practical book on making Newton work in real codes.
- Tjalling Ypma, 'Historical development of the Newton–Raphson method', SIAM Review 37(4), 531–551 (1995) — what Newton, Raphson and Simpson actually wrote.
↓But there is a problem
Newton converges spectacularly when it converges and goes badly wrong when it does not. We have seen the symptoms — cycles, divergence, sudden jumps — but not the cause.
Here is an experiment you can do on any scientific calculator. Set it to radians, type any number, and press cos over and over. Whatever you start from, the display settles on 0.739085… and stays there.
Why that number? Why does the calculator converge at all? And why does it take dozens of presses, when Newton takes four?