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 xk for the value of x at the start of pass k+1 of the loop of lines L2 to L11, so x0 is the input, ek=xk−x∗ and sk=xk+1−xk=−f(xk)/f′(xk).
Claim 1 (termination and the meaning of the flags). NEWTON returns after at most kmax passes. A result with the flag "root" is a point x with f(x)=0. A result with the flag "converged" is a point xk+1 with ∣xk+1−xk∣≤δa+δr∣xk+1∣.
Proof. The loop of line L2 runs at most kmax times, each pass does a fixed number of operations besides one call of f and at most one of f′, and line L12 returns after the loop. Line L4 returns x only when f(x)=0. Line L10 returns xnew=x+s only when ∣s∣≤δa+δr∣xnew∣. Line L7 is reached only when d=0 and f(x), d are finite (line L6), so the division is defined. □
Lemma (the error identity). Let f∈C2 on an interval I that holds xk and a root x∗, with f′(xk)=0. Then there is ξk between xk and x∗ with
ek+1=2f′(xk)f′′(ξk)ek2. Proof. Taylor's theorem with the Lagrange remainder at xk, evaluated at x∗, gives 0=f(x∗)=f(xk)−f′(xk)ek+21f′′(ξk)ek2. Divide by f′(xk): ek−f(xk)/f′(xk)=2f′(xk)f′′(ξk)ek2. The left side is xk+1−x∗=ek+1. □
Claim 2 (local quadratic convergence). Let f∈C2 on I=[x∗−r,x∗+r] with r>0, f(x∗)=0 and f′(x)=0 for x∈I. Let M=maxI∣f′′∣/(2minI∣f′∣), and assume that x0∈I and M∣e0∣≤1/2. In exact arithmetic, with kmax=∞ and δa=δr=0:
- each xk lies in I, and ∣ek+1∣≤M∣ek∣2≤21∣ek∣;
- M∣ek∣≤(M∣e0∣)2k, so xk→x∗;
- if no ek is zero, ek+1/ek2→f′′(x∗)/(2f′(x∗));
- for every k, ∣ek∣≤2∣sk∣ and ∣ek+1∣≤4Msk2. So when line L10 returns xk+1 after the step sk with ∣sk∣≤τ, its error is at most 4Mτ2.
Proof. We prove "xk∈I and M∣ek∣≤(M∣e0∣)2k" by induction on k.
Base. x0∈I and the bound is an equality for k=0.
Step. Assume the statement for k. Then M∣ek∣≤M∣e0∣≤1/2. If ek=0, then f(xk)=0, the pass returns at line L4, and there is nothing more to prove. Otherwise f′(xk)=0 because xk∈I, and the lemma applies on I, since ξk lies between xk and x∗, both in I. It gives ∣ek+1∣≤M∣ek∣2=(M∣ek∣)∣ek∣≤21∣ek∣≤r, so xk+1∈I, and M∣ek+1∣≤(M∣ek∣)2≤(M∣e0∣)2k+1.
This proves items 1 and 2: since M∣e0∣≤1/2, M∣ek∣≤2−2k→0. (If M=0, then f′′=0 on I, f is linear on I, and e1=0.) For item 3, xk→x∗ forces ξk→x∗, and f′′ and f′ are continuous with f′(x∗)=0, so the factor in the lemma tends to f′′(x∗)/(2f′(x∗)).
For item 4, sk=ek+1−ek, so ∣ek∣≤∣sk∣+∣ek+1∣≤∣sk∣+21∣ek∣, which gives ∣ek∣≤2∣sk∣. Then ∣ek+1∣≤M∣ek∣2≤4Msk2. □
Claim 3 (monotone convergence on a convex side). Let f∈C2 on [x∗,∞) with f(x∗)=0, f′(x)>0 and f′′(x)≥0 for all x≥x∗, and let x0>x∗. Then in exact arithmetic x∗≤xk+1≤xk for all k, and xk→x∗.
Proof. Assume that xk≥x∗. If xk=x∗, line L4 returns. Otherwise xk>x∗, and since f′>0, f(xk)>f(x∗)=0 and f′(xk)>0, so sk=−f(xk)/f′(xk)<0 and xk+1<xk. The lemma on [x∗,xk] gives ek+1=2f′(xk)f′′(ξk)ek2≥0, so xk+1≥x∗. By induction the sequence is non-increasing and bounded below by x∗, so it has a limit L≥x∗. The map g(x)=x−f(x)/f′(x) is continuous on [x∗,∞) because f′>0 there, and xk+1=g(xk), so L=g(L), that is f(L)=0. Since f is strictly increasing on [x∗,∞), its only zero there is x∗, so L=x∗. □
The cases f′>0,f′′≤0 with x0<x∗, and the two cases with f′<0, follow by applying Claim 3 to −f(x), f(−x) or −f(−x), which have the same Newton iterates up to the sign of x.
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. ■