Newton's Method

Published on 2026-11-04·v1.0

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 ek+1=f′′(ξk)2f′(xk)ek2e_{k+1} = \frac{f''(\xi_k)}{2f'(x_k)}e_k^2.
  • 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 2\sqrt 2 and showed the errors 2.45×10−32.45\times10^{-3}, 2.12×10−62.12\times10^{-6}, 1.59×10−121.59\times10^{-12}: 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 ff with a sign change. fixed-point-iteration shrinks the error by a factor near ∣g′(r)∣\lvert g'(r)\rvert. Newton's method picks a gg 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 xkx_k, replace ff 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:

xk+1=xk−f(xk)f′(xk),f′(xk)≠0.x_{k+1} = x_k - \frac{f(x_k)}{f'(x_k)}, \qquad f'(x_k)\neq 0.

Each iteration costs one evaluation of ff and one of f′f'. 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 f′(x)=0f'(x)=0, because the tangent line of f′f' is the derivative of the quadratic model of ff.

Newton as a fixed-point iteration

The iteration is xk+1=g(xk)x_{k+1}=g(x_k) with g(x)=x−f(x)/f′(x)g(x)=x-f(x)/f'(x). Where f′≠0f'\neq0, the fixed points of gg are exactly the roots of ff. Differentiating,

g′(x)=f(x) f′′(x)f′(x)2,g'(x) = \frac{f(x)\,f''(x)}{f'(x)^2},

so g′(r)=0g'(r)=0 at any root with f′(r)≠0f'(r)\neq0. A contraction factor of zero is why the convergence beats every linear rate.

The local convergence theorem

Write ek=xk−re_k = x_k - r.

Hypotheses. rr is a root of ff. On I=[r−δ,r+δ]I=[r-\delta,r+\delta], ff is twice continuously differentiable and f′f' has no zero. With C=max⁡I∣f′′∣/(2min⁡I∣f′∣)C = \max_I\lvert f''\rvert \big/ \big(2\min_I\lvert f'\rvert\big), also Cδ<1C\delta<1.

Conclusion. For every x0∈Ix_0\in I the iterates stay in II, xk→rx_k\to r, and ∣ek+1∣≤Cek2\lvert e_{k+1}\rvert\le C e_k^2. If no eke_k is zero, then

lim⁡k→∞ek+1ek2=f′′(r)2f′(r).\lim_{k\to\infty}\frac{e_{k+1}}{e_k^2}=\frac{f''(r)}{2f'(r)}.

Proof. Taylor's theorem with Lagrange remainder, expanded at xkx_k and evaluated at rr, gives a ξk\xi_k between them with

0=f(r)=f(xk)−f′(xk) ek+12f′′(ξk) ek2.0=f(r)=f(x_k)-f'(x_k)\,e_k+\tfrac12 f''(\xi_k)\,e_k^2.

Dividing by f′(xk)f'(x_k) and using ek+1=ek−f(xk)/f′(xk)e_{k+1}=e_k-f(x_k)/f'(x_k) gives

ek+1=f′′(ξk)2f′(xk) ek2.e_{k+1}=\frac{f''(\xi_k)}{2f'(x_k)}\,e_k^2.

So ∣ek+1∣≤Cek2≤(Cδ)∣ek∣\lvert e_{k+1}\rvert\le Ce_k^2\le(C\delta)\lvert e_k\rvert, which keeps the iterates in II and sends the error to zero. Then xkx_k and ξk\xi_k tend to rr, and continuity of f′f' and f′′f'' gives the limit.

The theorem is sufficient and local. It says nothing about starts outside II, and "quadratic" means at least quadratic: if f′′(r)=0f''(r)=0 the limit is 00 and the order can be higher. For sin⁡x\sin x at r=0r=0 the step is x−tan⁡x≈−x3/3x-\tan x\approx -x^3/3, and from x0=0.5x_0=0.5 the errors are 4.6×10−24.6\times10^{-2}, 3.3×10−53.3\times10^{-5}, 1.2×10−141.2\times10^{-14}, with ∣ek+1∣/∣ek∣3\lvert e_{k+1}\rvert/\lvert e_k\rvert^3 going 0.3700.370, 0.3340.334, 0.3330.333.

Multiple roots

If f(x)=(x−r)mh(x)f(x)=(x-r)^m h(x) with m≥2m\ge2, hh smooth and h(r)≠0h(r)\neq0, then f′(r)=0f'(r)=0 and the theorem does not apply. Computing the limit of g′g' gives g′(r)=1−1mg'(r)=1-\tfrac1m, so Newton is still a contraction near rr, but only a linear one, with ratio 12\tfrac12 for a double root. When mm is known, the step xk+1=xk−m f(xk)/f′(xk)x_{k+1}=x_k-m\,f(x_k)/f'(x_k) makes that derivative zero again.

Stopping

Near a simple root f(xk)≈f′(r) ekf(x_k)\approx f'(r)\,e_k, so the step size estimates the error of xkx_k, not of xk+1x_{k+1}, which is much smaller. The residual ∣f(xk)∣\lvert f(x_k)\rvert is a backward error: xkx_k exactly solves f(x)−f(xk)=0f(x)-f(x_k)=0. Turning it into a forward error divides by ∣f′(r)∣\lvert f'(r)\rvert, which fails on flat functions. For (x−1)3(x-1)^3 at x=1.001x=1.001 the residual is 10−910^{-9} and the error is 10−310^{-3}. 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 E−esin⁡E=ME-e\sin E=M for the eccentric anomaly EE. Take e=0.3e=0.3, M=1M=1, so f(E)=E−0.3sin⁡E−1f(E)=E-0.3\sin E-1 and f′(E)=1−0.3cos⁡Ef'(E)=1-0.3\cos E, and start at x0=Mx_0=M. A float64 run, with errors measured against the root computed to 80 digits, r=1.28809131321183768…r=1.28809131321183768\ldots:

text
k 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 pk=ln⁡∣ek/ek−1∣/ln⁡∣ek−1/ek−2∣p_k=\ln\lvert e_k/e_{k-1}\rvert\big/\ln\lvert e_{k-1}/e_{k-2}\rvert is the observed order. It agrees with the theorem's 22, and the ratio agrees with f′′(r)/(2f′(r))=0.1572f''(r)/(2f'(r))=0.1572. At k=4k=4 the theory predicts 0.1572 (1.17×10−10)2≈2×10−210.1572\,(1.17\times10^{-10})^2\approx2\times10^{-21}, but floats near 1.291.29 are 2.2×10−162.2\times10^{-16} apart. The truncation error has fallen below the rounding error, x4x_4 is the float nearest rr, the computed f(x4)f(x_4) is exactly 00, and the ratio and pkp_k stop meaning anything. Four iterations, eight evaluations.

The theorem applies with room to spare. Everywhere f′≥0.7f'\ge0.7 and ∣f′′∣≤0.3\lvert f''\rvert\le0.3, so C≤3/14C\le3/14 and any δ<14/3\delta<14/3 qualifies. A sweep of 20,001 starts within 4.664.66 of rr 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 f(x)=1/x−af(x)=1/x-a the iteration simplifies to xk+1=xk(2−axk)x_{k+1}=x_k(2-ax_k), with no division in it. It also has an exact error law: 1−axk+1=(1−axk)21-ax_{k+1}=(1-ax_k)^2. So it converges if and only if ∣1−ax0∣<1\lvert1-ax_0\rvert<1, that is 0<x0<2/a0<x_0<2/a. Global answers like this are rare. With a=7a=7 and 2/a=0.2857…2/a=0.2857\ldots:

text
x0 = 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 ∣f′′(r)/(2f′(r))∣=a\lvert f''(r)/(2f'(r))\rvert=a. The second starts inside the region, so it converges, but its first steps are nothing like quadratic. The third starts 0.010.01 further along and runs off to −∞-\infty.

Example 3: losing smoothness lowers the order

Take f(x)=x+x∣x∣f(x)=x+x\sqrt{\lvert x\rvert}. The root 00 is simple and f′f' is continuous with f′(0)=1f'(0)=1, but f′′f'' is unbounded near 00, so f∉C2f\notin C^2. For x>0x>0 the next iterate simplifies to 12x3/2/(1+32x)\tfrac12x^{3/2}/(1+\tfrac32\sqrt x), which predicts order 32\tfrac32 with constant 12\tfrac12. From x0=0.5x_0=0.5:

text
k 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 f(x)=sign⁡(x)∣x∣f(x)=\operatorname{sign}(x)\sqrt{\lvert x\rvert}, whose derivative is unbounded at the root, every step is exactly x↦−xx\mapsto-x, and x0=0.3x_0=0.3 alternates between 0.30.3 and −0.3-0.3 forever.

Example 4: a double root, and where rounding stops it

f(x)=x3−3x+2=(x−1)2(x+2)f(x)=x^3-3x+2=(x-1)^2(x+2) has a double root at 11. From x0=2x_0=2 the ratio ∣ek/ek−1∣\lvert e_k/e_{k-1}\rvert reads 0.5560.556, 0.5360.536, 0.5220.522, and it has settled at 0.50000.5000 by k=13k=13, the predicted 1−121-\tfrac12. The observed order is 1.0001.000. Worse, more iterations do not rescue it. With f = x**3 - 3*x + 2 and df = 3*x**2 - 3, the error reaches about 2×10−82\times10^{-8} at k=26k=26, then turns erratic and freezes at 3.6×10−93.6\times10^{-9} at k=30k=30. 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 ff and f′f' the freeze ranged from 1.5×10−91.5\times10^{-9} to 9.7×10−99.7\times10^{-9}. Near the root f(x)≈3e2f(x)\approx3e^2, and once 3e23e^2 is near the 10−1610^{-16} rounding noise of evaluating the cubic, ff returns noise. That happens at e≈10−8e\approx10^{-8}, about the square root of machine precision, and it comes from the problem's conditioning rather than from Newton. How ff 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 11 at k=54k=54, and other spellings of f′f' stop within 1 ulp of 11 a step or two earlier.

With m=2m=2 known, the modified step on the factored form gives errors 1.1×10−11.1\times10^{-1}, 1.9×10−31.9\times10^{-3}, 6.3×10−76.3\times10^{-7}, 6.7×10−146.7\times10^{-14}, then 00, with ek/ek−12e_k/e_{k-1}^2 reaching 0.1660.166. On the expanded form the same step, with the code above, reaches 1.6×10−101.6\times10^{-10} and then jumps back to 4.8×10−74.8\times10^{-7}, while x*x*x stops at 3.8×10−113.8\times10^{-11}: 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 e=0.99e=0.99, M=0.2M=0.2, the root is r=1.0669973652816r=1.0669973652816. From x0=M=0.2x_0=M=0.2, f′(x0)=0.030f'(x_0)=0.030 and the first step lands at 6.86.8. The run then visits −34.9-34.9, 13.313.3, and 1126.71126.7 before converging after 19 iterations. From x0=πx_0=\pi it descends monotonically in 7 iterations. The theorem covers only about δ≤0.42\delta\le0.42 here, so both starts are outside it. The start at π\pi works for a different reason: between rr and π\pi, f′>0f'>0 and f′′≥0f''\ge0, so the tangent lines stay below the graph and the iterates cannot overshoot rr.
  • A cycle that attracts. x3−2x+2x^3-2x+2 from x0=0x_0=0 gives 0,1,0,1,…0,1,0,1,\ldots exactly. This is not one unlucky point: x0=0.1x_0=0.1 falls onto the same cycle, and of 4001 evenly spaced starts in [−0.5,1.5][-0.5,1.5], 1437 end on it. The others reach the real root −1.76929-1.76929.
  • Divergence. For arctan⁡x\arctan x, starts of size below 1.391751.39175 converge and larger ones diverge: x0=1.3x_0=1.3 reaches 00, while x0=1.5x_0=1.5 gives −1.69-1.69, 2.322.32, −5.11-5.11, 32.332.3, −1575-1575.
  • A vanishing derivative. cos⁡x\cos x at x0=0x_0=0 divides by zero. At x0=0.001x_0=0.001 the tangent is nearly flat, the first step lands at 1000.00071000.0007, and the run converges to 637π/2≈1000.597637\pi/2\approx1000.597, not to the nearest root π/2\pi/2.
  • No real root. x2+1x^2+1 from x0=0.5x_0=0.5 never settles; the iterates wander, reaching ∣x∣=63.7\lvert x\rvert=63.7 within 60 iterations.

Example 6: what libraries do about it

On the e=0.99e=0.99 problem, scipy.optimize.newton with fprime and tol=1e-12 reproduces the runs above: 19 iterations from 0.20.2 and 7 from π\pi. scipy.optimize.brentq on the bracket [0,π][0,\pi] with xtol=1e-12 needs no derivative and no good start, uses 12 evaluations of ff, and returns a value within 1.3×10−131.3\times10^{-13} of rr. 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 nn 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 C2C^2 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 x0=0.28x_0=0.28 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 10−810^{-8} in the expanded form, however long it runs.
  • "The theorem's δ\delta is where Newton works." It is where the proof works. The start at π\pi in Example 5 is outside it and converges anyway.
  • "A small ∣f(x)∣\lvert f(x)\rvert means xx is close to the root." On (x−1)3(x-1)^3, a residual of 10−910^{-9} goes with an error of 10−310^{-3}.
  • "It uses fewer iterations, so it is cheaper." Each iteration evaluates ff and f′f'. secant-method-and-order-of-convergence does the comparison per evaluation.

Summary

Newton's method solves the tangent line at each step: xk+1=xk−f(xk)/f′(xk)x_{k+1}=x_k-f(x_k)/f'(x_k). As a fixed-point iteration it has g′(r)=0g'(r)=0 at a simple root. Taylor's theorem turns that into ek+1=f′′(ξk)2f′(xk)ek2e_{k+1}=\frac{f''(\xi_k)}{2f'(x_k)}e_k^2, so for f∈C2f\in C^2 with f′≠0f'\neq0 near rr and a start close enough, the error is squared at each step, with limiting constant f′′(r)/(2f′(r))f''(r)/(2f'(r)). A real run shows this as a ratio that settles and pk≈2p_k\approx2, until rounding takes over. Each hypothesis matters: without C2C^2 the order fell to 32\tfrac32 or the run cycled, with f′(r)=0f'(r)=0 the convergence became linear and stalled near 10−810^{-8}, 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