Algorithm Search⌘K

Proofs: Newton-Raphson method

These are the human proofs of Newton-Raphson method, at full length.

Newton's method ends, converges quadratically near a simple root, and converges monotonically on a convex side full

This proof shows: correctness, termination, local-convergence, monotone-convergence.

We write xkx_k for the value of xx at the start of pass k+1k + 1 of the loop of lines L2 to L11, so x0x_0 is the input, ek=xk−x∗e_k = x_k - x^* and sk=xk+1−xk=−f(xk)/f′(xk)s_k = x_{k+1} - x_k = -f(x_k)/f'(x_k).

Claim 1 (termination and the meaning of the flags). NEWTON returns after at most kmax⁡k_{\max} passes. A result with the flag "root" is a point xx with f(x)=0f(x) = 0. A result with the flag "converged" is a point xk+1x_{k+1} with ∣xk+1−xk∣≤δa+δr∣xk+1∣|x_{k+1} - x_k| \le \delta_a + \delta_r |x_{k+1}|.

Proof. The loop of line L2 runs at most kmax⁡k_{\max} times, each pass does a fixed number of operations besides one call of ff and at most one of f′f', and line L12 returns after the loop. Line L4 returns xx only when f(x)=0f(x) = 0. Line L10 returns xnew=x+sx_{\text{new}} = x + s only when ∣s∣≤δa+δr∣xnew∣|s| \le \delta_a + \delta_r |x_{\text{new}}|. Line L7 is reached only when d≠0d \ne 0 and f(x)f(x), dd are finite (line L6), so the division is defined. □\square

Lemma (the error identity). Let f∈C2f \in C^2 on an interval II that holds xkx_k and a root x∗x^*, with f′(xk)≠0f'(x_k) \ne 0. Then there is ξk\xi_k between xkx_k and x∗x^* with

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

Proof. Taylor's theorem with the Lagrange remainder at xkx_k, evaluated at x∗x^*, gives 0=f(x∗)=f(xk)−f′(xk)ek+12f′′(ξk)ek20 = f(x^*) = f(x_k) - f'(x_k) e_k + \tfrac12 f''(\xi_k) e_k^2. Divide by f′(xk)f'(x_k): ek−f(xk)/f′(xk)=f′′(ξk)2f′(xk)ek2e_k - f(x_k)/f'(x_k) = \frac{f''(\xi_k)}{2 f'(x_k)} e_k^2. The left side is xk+1−x∗=ek+1x_{k+1} - x^* = e_{k+1}. □\square

Claim 2 (local quadratic convergence). Let f∈C2f \in C^2 on I=[x∗−r,x∗+r]I = [x^* - r, x^* + r] with r>0r > 0, f(x∗)=0f(x^*) = 0 and f′(x)≠0f'(x) \ne 0 for x∈Ix \in I. Let M=max⁡I∣f′′∣/(2min⁡I∣f′∣)M = \max_I |f''| / (2 \min_I |f'|), and assume that x0∈Ix_0 \in I and M∣e0∣≤1/2M |e_0| \le 1/2. In exact arithmetic, with kmax⁡=∞k_{\max} = \infty and δa=δr=0\delta_a = \delta_r = 0:

  1. each xkx_k lies in II, and ∣ek+1∣≤M∣ek∣2≤12∣ek∣|e_{k+1}| \le M |e_k|^2 \le \tfrac12 |e_k|;
  2. M∣ek∣≤(M∣e0∣)2kM |e_k| \le (M |e_0|)^{2^k}, so xk→x∗x_k \to x^*;
  3. if no eke_k is zero, ek+1/ek2→f′′(x∗)/(2f′(x∗))e_{k+1}/e_k^2 \to f''(x^*)/(2 f'(x^*));
  4. for every kk, ∣ek∣≤2∣sk∣|e_k| \le 2 |s_k| and ∣ek+1∣≤4Msk2|e_{k+1}| \le 4 M s_k^2. So when line L10 returns xk+1x_{k+1} after the step sks_k with ∣sk∣≤τ|s_k| \le \tau, its error is at most 4Mτ24 M \tau^2.

Proof. We prove "xk∈Ix_k \in I and M∣ek∣≤(M∣e0∣)2kM |e_k| \le (M |e_0|)^{2^k}" by induction on kk.

Base. x0∈Ix_0 \in I and the bound is an equality for k=0k = 0.

Step. Assume the statement for kk. Then M∣ek∣≤M∣e0∣≤1/2M |e_k| \le M |e_0| \le 1/2. If ek=0e_k = 0, then f(xk)=0f(x_k) = 0, the pass returns at line L4, and there is nothing more to prove. Otherwise f′(xk)≠0f'(x_k) \ne 0 because xk∈Ix_k \in I, and the lemma applies on II, since ξk\xi_k lies between xkx_k and x∗x^*, both in II. It gives ∣ek+1∣≤M∣ek∣2=(M∣ek∣)∣ek∣≤12∣ek∣≤r|e_{k+1}| \le M |e_k|^2 = (M |e_k|) |e_k| \le \tfrac12 |e_k| \le r, so xk+1∈Ix_{k+1} \in I, and M∣ek+1∣≤(M∣ek∣)2≤(M∣e0∣)2k+1M |e_{k+1}| \le (M |e_k|)^2 \le (M |e_0|)^{2^{k+1}}.

This proves items 1 and 2: since M∣e0∣≤1/2M |e_0| \le 1/2, M∣ek∣≤2−2k→0M |e_k| \le 2^{-2^k} \to 0. (If M=0M = 0, then f′′=0f'' = 0 on II, ff is linear on II, and e1=0e_1 = 0.) For item 3, xk→x∗x_k \to x^* forces ξk→x∗\xi_k \to x^*, and f′′f'' and f′f' are continuous with f′(x∗)≠0f'(x^*) \ne 0, so the factor in the lemma tends to f′′(x∗)/(2f′(x∗))f''(x^*)/(2 f'(x^*)).

For item 4, sk=ek+1−eks_k = e_{k+1} - e_k, so ∣ek∣≤∣sk∣+∣ek+1∣≤∣sk∣+12∣ek∣|e_k| \le |s_k| + |e_{k+1}| \le |s_k| + \tfrac12 |e_k|, which gives ∣ek∣≤2∣sk∣|e_k| \le 2 |s_k|. Then ∣ek+1∣≤M∣ek∣2≤4Msk2|e_{k+1}| \le M |e_k|^2 \le 4 M s_k^2. □\square

Claim 3 (monotone convergence on a convex side). Let f∈C2f \in C^2 on [x∗,∞)[x^*, \infty) with f(x∗)=0f(x^*) = 0, f′(x)>0f'(x) > 0 and f′′(x)≥0f''(x) \ge 0 for all x≥x∗x \ge x^*, and let x0>x∗x_0 > x^*. Then in exact arithmetic x∗≤xk+1≤xkx^* \le x_{k+1} \le x_k for all kk, and xk→x∗x_k \to x^*.

Proof. Assume that xk≥x∗x_k \ge x^*. If xk=x∗x_k = x^*, line L4 returns. Otherwise xk>x∗x_k > x^*, and since f′>0f' > 0, f(xk)>f(x∗)=0f(x_k) > f(x^*) = 0 and f′(xk)>0f'(x_k) > 0, so sk=−f(xk)/f′(xk)<0s_k = -f(x_k)/f'(x_k) < 0 and xk+1<xkx_{k+1} < x_k. The lemma on [x∗,xk][x^*, x_k] gives ek+1=f′′(ξk)2f′(xk)ek2≥0e_{k+1} = \frac{f''(\xi_k)}{2 f'(x_k)} e_k^2 \ge 0, so xk+1≥x∗x_{k+1} \ge x^*. By induction the sequence is non-increasing and bounded below by x∗x^*, so it has a limit L≥x∗L \ge x^*. The map g(x)=x−f(x)/f′(x)g(x) = x - f(x)/f'(x) is continuous on [x∗,∞)[x^*, \infty) because f′>0f' > 0 there, and xk+1=g(xk)x_{k+1} = g(x_k), so L=g(L)L = g(L), that is f(L)=0f(L) = 0. Since ff is strictly increasing on [x∗,∞)[x^*, \infty), its only zero there is x∗x^*, so L=x∗L = x^*. □\square

The cases f′>0,f′′≤0f' > 0, f'' \le 0 with x0<x∗x_0 < x^*, and the two cases with f′<0f' < 0, follow by applying Claim 3 to −f(x)-f(x), f(−x)f(-x) or −f(−x)-f(-x), which have the same Newton iterates up to the sign of xx.

Floating point. Claim 1 holds in floating point as stated, because it uses only the tests of lines L2, L4, L6 and L10. Claims 2 and 3 hold in exact arithmetic. In floating point the iterates follow them until the error reaches the limiting accuracy described on the main page. ■\blacksquare

Back to Newton-Raphson method