Newton's Method
Learning Objectives
- Derive Newton's iteration from the degree-1 Taylor polynomial and write it as a fixed-point iteration.
- State the local convergence theorem with all its hypotheses and prove the error relation .
- Measure the order of convergence from the errors of a real float64 run, and locate the iteration where rounding ends the measurement.
- Break each hypothesis in turn (smoothness, a simple root, a good start, a nonzero derivative along the way) and predict what the run does.
- Explain why library root finders protect the Newton idea with a bracket.
Context & Motivation
sequences-and-convergence ran Newton's iteration for and showed the errors , , : the exponent roughly doubles each step. That lesson proved the sequence converges and observed the digits doubling. This one explains the doubling and says when it holds.
The two earlier root finders set the comparison. bisection-and-convergence-rate halves a bracket every step for any continuous with a sign change. fixed-point-iteration shrinks the error by a factor near . Newton's method picks a for which that factor is zero at the root. The price is a derivative at every step and the loss of bisection's guarantee: Newton can diverge, cycle forever, or land on a root far from the one wanted.
Core Theory
The iteration from the tangent line
Near a current guess , replace by its degree-1 Taylor polynomial (see taylor-and-maclaurin-series-with-error-bounds), which is the tangent line, and solve that line for its zero:
Each iteration costs one evaluation of and one of . The Taylor lesson calls the degree-2 polynomial the local model behind Newton's method for minimization. That is this same iteration applied to the equation , because the tangent line of is the derivative of the quadratic model of .
Newton as a fixed-point iteration
The iteration is with . Where , the fixed points of are exactly the roots of . Differentiating,
so at any root with . A contraction factor of zero is why the convergence beats every linear rate.
The local convergence theorem
Write .
Hypotheses. is a root of . On , is twice continuously differentiable and has no zero. With , also .
Conclusion. For every the iterates stay in , , and . If no is zero, then
Proof. Taylor's theorem with Lagrange remainder, expanded at and evaluated at , gives a between them with
Dividing by and using gives
So , which keeps the iterates in and sends the error to zero. Then and tend to , and continuity of and gives the limit.
The theorem is sufficient and local. It says nothing about starts outside , and "quadratic" means at least quadratic: if the limit is and the order can be higher. For at the step is , and from the errors are , , , with going , , .
Multiple roots
If with , smooth and , then and the theorem does not apply. Computing the limit of gives , so Newton is still a contraction near , but only a linear one, with ratio for a double root. When is known, the step makes that derivative zero again.
Stopping
Near a simple root , so the step size estimates the error of , not of , which is much smaller. The residual is a backward error: exactly solves . Turning it into a forward error divides by , which fails on flat functions. For at the residual is and the error is . See conditioning-and-numerical-stability for that distinction. A robust loop tests the step and the residual and also caps the iteration count, because neither test fires on a cycle.
Worked Examples
Example 1: Kepler's equation, with the order measured
Orbit propagation solves for the eccentric anomaly . Take , , so and , and start at . A float64 run, with errors measured against the root computed to 80 digits, :
textk x_k e_k e_k/e_{k-1}^2 p_k 0 1.0 -2.881e-01 1 1.3012752012180726 1.318e-02 0.1588 2 1.288118592417824 2.728e-05 0.1569 2.004 3 1.2880913133288192 1.170e-10 0.1572 2.000 4 1.2880913132118377 -1.177e-17
Here is the observed order. It agrees with the theorem's , and the ratio agrees with . At the theory predicts , but floats near are apart. The truncation error has fallen below the rounding error, is the float nearest , the computed is exactly , and the ratio and stop meaning anything. Four iterations, eight evaluations.
The theorem applies with room to spare. Everywhere and , so and any qualifies. A sweep of 20,001 starts within of converged in at most 7 iterations each. scipy.optimize.newton(f, 1.0, fprime=df, tol=1e-12) returns the same float in 4 iterations.
Example 2: dividing with only multiplication
For the iteration simplifies to , with no division in it. It also has an exact error law: . So it converges if and only if , that is . Global answers like this are rare. With and :
textx0 = 0.10 0.13 0.1417 0.142848 0.1428571422 (ratio |e_k|/e_{k-1}^2 = 7.0000) x0 = 0.28 0.0112 0.0215 0.0398 0.0685 0.1042 0.1324 0.1421 x0 = 0.29 -0.0087 -0.0179 -0.0381 -0.0864 -0.2250 -0.8044 -6.1387
The first line shows the predicted constant . The second starts inside the region, so it converges, but its first steps are nothing like quadratic. The third starts further along and runs off to .
Example 3: losing smoothness lowers the order
Take . The root is simple and is continuous with , but is unbounded near , so . For the next iterate simplifies to , which predicts order with constant . From :
textk e_k e_k/e_{k-1}^(3/2) p_k 2 8.728e-03 0.3474 1.296 4 3.288e-06 0.4862 1.468 6 8.105e-14 0.5000 1.500 8 6.196e-31 0.5000 1.500
Remove more and convergence goes too. With , whose derivative is unbounded at the root, every step is exactly , and alternates between and forever.
Example 4: a double root, and where rounding stops it
has a double root at . From the ratio reads , , , and it has settled at by , the predicted . The observed order is . Worse, more iterations do not rescue it. With f = x**3 - 3*x + 2 and df = 3*x**2 - 3, the error reaches about at , then turns erratic and freezes at at . That exact value means little: spellings such as x*x*x or 3*x*x change each evaluation by about 1 ulp, and across eight spellings of and the freeze ranged from to . Near the root , and once is near the rounding noise of evaluating the cubic, returns noise. That happens at , about the square root of machine precision, and it comes from the problem's conditioning rather than from Newton. How is written matters far more: (x-1)**2*(x+2) has no such cancellation. With df = 2*(x-1)*(x+2) + (x-1)**2 it reaches exactly at , and other spellings of stop within 1 ulp of a step or two earlier.
With known, the modified step on the factored form gives errors , , , , then , with reaching . On the expanded form the same step, with the code above, reaches and then jumps back to , while x*x*x stops at : the noise is now in the numerator of a large step, so the last digits depend on the spelling.
Example 5: starting points and flat spots
In the first four cases a simple root exists and only the start is at fault.
- Kepler at high eccentricity. With , , the root is . From , and the first step lands at . The run then visits , , and before converging after 19 iterations. From it descends monotonically in 7 iterations. The theorem covers only about here, so both starts are outside it. The start at works for a different reason: between and , and , so the tangent lines stay below the graph and the iterates cannot overshoot .
- A cycle that attracts. from gives exactly. This is not one unlucky point: falls onto the same cycle, and of 4001 evenly spaced starts in , 1437 end on it. The others reach the real root .
- Divergence. For , starts of size below converge and larger ones diverge: reaches , while gives , , , , .
- A vanishing derivative. at divides by zero. At the tangent is nearly flat, the first step lands at , and the run converges to , not to the nearest root .
- No real root. from never settles; the iterates wander, reaching within 60 iterations.
Example 6: what libraries do about it
On the problem, scipy.optimize.newton with fprime and tol=1e-12 reproduces the runs above: 19 iterations from and 7 from . scipy.optimize.brentq on the bracket with xtol=1e-12 needs no derivative and no good start, uses 12 evaluations of , and returns a value within of . A bracket cannot be lost, which is why a common design takes a Newton step when it stays inside the bracket and a bisection step when it does not. In dimensions the division becomes a linear solve with the Jacobian at each step, which is one reason lu-decomposition-and-partial-pivoting matters here.
Common Misconceptions & Pitfalls
- "Newton's method always converges quadratically." The guarantee is local: a simple root, a function, a close start. Examples 3, 4 and 5 break those hypotheses one at a time.
- "Quadratic from the first step." The order is a limit. In Example 2 with the first steps are slow, and in Example 5 the first steps move away from the root.
- "The digits double until the answer is exact." They double until truncation error meets rounding error, which took four steps in Example 1.
- "A slow double root just needs more iterations." Example 4 stops improving at about in the expanded form, however long it runs.
- "The theorem's is where Newton works." It is where the proof works. The start at in Example 5 is outside it and converges anyway.
- "A small means is close to the root." On , a residual of goes with an error of .
- "It uses fewer iterations, so it is cheaper." Each iteration evaluates and .
secant-method-and-order-of-convergencedoes the comparison per evaluation.
Summary
Newton's method solves the tangent line at each step: . As a fixed-point iteration it has at a simple root. Taylor's theorem turns that into , so for with near and a start close enough, the error is squared at each step, with limiting constant . A real run shows this as a ratio that settles and , until rounding takes over. Each hypothesis matters: without the order fell to or the run cycled, with the convergence became linear and stalled near , and with a poor start the run diverged, cycled, or found a distant root. When a bracket is available, brentq trades speed for a guarantee.
Documentation Links
- Driscoll and Braun: Fundamentals of Numerical Computation, 4.3 Newton's method
- Driscoll and Braun: Fundamentals of Numerical Computation, 4.2 Fixed-point iteration
- Demanet (2012): MIT 18.330 Introduction to Numerical Analysis, Chapter 4: Nonlinear equations
- Johnson (2015): MIT 18.335J Introduction to Numerical Methods, Square Roots via Newton's Method
- SciPy documentation: scipy.optimize.newton
- SciPy documentation: scipy.optimize.brentq