Newton–Raphson: Where the Formula Comes From and When It Converges
When the secant method and Newton–Raphson converge, the tangent as a first-order Taylor polynomial, the identity that gives the error of one step, an error bound, the exact order and the higher orders when f″(r)=0, convergence and order of the secant method, and the failures (almost flat slope, a cycle, divergence, a double root).
Last updated:
In the table of the secant method and Newton–Raphson page the error fell from 8.58×10−2 to 2.45×10−3, then to 2.12×10−6 and 1.60×10−12: the number of correct digits almost doubled at every step. Here we check where the formula comes from, what determines the error of one step, when convergence is guaranteed and why, and what happens when the conditions fail.
When the Methods Converge
After the two algorithms of the secant method and Newton–Raphson page we state when each one converges, before any error bound. The conditions are sufficient and local: they are not necessary (a method can converge without them), and they are not a promise for every starting point.
Newton–Raphson. Let f be twice continuously differentiable near a simple root r (that is, f(r)=0 and f′(r)=0). A start close enough to r guarantees convergence. The reason fits in a few lines. The method is xn+1=N(xn) with N(x)=x−f′(x)f(x), and
N′(x)=f′(x)2f(x)f′′(x)
vanishes at r, because f(r)=0. Since N′ is continuous near r, there is a small interval I around r on which ∣N′∣≤q<1. For x∈I the mean value theorem gives ∣N(x)−r∣=∣N(x)−N(r)∣≤q∣x−r∣ (note that N(r)=r). So the next point stays in I and the error is multiplied by at most q in every step: it shrinks geometrically. How close is “close enough” is made quantitative in the section “When Convergence Is Guaranteed”.
Secant method. The same smoothness and a simple root, but two distinct starting points, both close enough to the root. Opposite signs are not needed: unlike regula falsi, the root does not have to lie between the two points.
What breaks the conditions:
a double root(f′(r)=0): there is no simple root;
a slope close to zero at the start (for the secant method, a chord slope close to zero), which flings the next point far away;
a start outside the neighbourhood, where the iteration can cycle or diverge.
The section “Why Newton Fails” shows each of these in numbers, and the example tabs of the explorer on the secant and Newton–Raphson page show three of them in a graph.
This is the Taylor polynomial of degree one of f around xn. When the point is 0 it is called a Maclaurin polynomial, like ex≈1+x in the glossary.
Derive: find the point xn+1 where the line P crosses the x-axis, that is P(xn+1)=0.
Solution
f(xn)+f′(xn)(xn+1−xn)=0 so
xn+1=xn−f′(xn)f(xn)
provided f′(xn)=0. When the slope of the tangent is zero the line is horizontal and has no single crossing point with the axis. Newton–Raphson solves the approximation P(x)=0 instead of the equation f(x)=0, and replaces the curve by a new tangent again and again.
How Wrong Is One Step
The tangent is close to the curve only near xn. The difference between them is called the Taylor error term (in books: the Taylor remainder; it has nothing to do with the residualδn=∣f(xn)∣ of the stopping rules), and Taylor’s formula describes it:
Taylor's formula with an error term
If f is twice differentiable on an interval that contains a and x, there is a point ξ (the Greek letter xi) between a and x for which
f(x)=f(a)+f′(a)(x−a)+21f′′(ξ)(x−a)2
The first two terms are the Taylor polynomial of degree one, and the last term is the error term. The exact place of ξ is unknown; we only know that it is between a and x. The formula is proved in calculus, and here we use it without proof.
Why the point ξ exists
Think of f(t) as the position of a car at time t, so f′ is its speed and f′′ its acceleration. The position at time x>a is built from three parts: the position at the start, f(a), what the car would cover at the initial speed alone, f′(a)(x−a), and the contribution of the acceleration. The fundamental theorem of calculus and one integration by parts give this contribution (for a twice continuously differentiable f) as
R=∫ax(x−t)f′′(t)dt
so that f(x)=f(a)+f′(a)(x−a)+R. An acceleration at an early time counts more, because it has longer to act before time x: its weight x−t is larger. The weights are non-negative, and ∫ax(x−t)dt=2(x−a)2. Hence
R=2(x−a)2⋅(a weighted average of f′′ on [a,x])
A weighted average with non-negative weights lies between the smallest and the largest value of f′′. Since f′′ is continuous, the intermediate value theorem says that the average is attained at some point ξ∈[a,x]. A constant acceleration f′′(ξ) would then reproduce exactly the same final position, and this is the term 21f′′(ξ)(x−a)2. (For x<a the argument is the same, read backwards in time.)
The ordinary mean value theorem, applied once, is not enough here: one needs this weighted form, or two applications of Rolle’s theorem.
Denote by r the root (f(r)=0) and by en=xn−r the error after n steps.
Derive: substitute a=xn and x=r in Taylor’s formula, divide by f′(xn), and use xn−xn+1=f′(xn)f(xn). What do you get for en+1 in terms of en?
Hint
After the division three terms appear. Two of them together are r−xn+1.
Solution
0=f(xn)+f′(xn)(r−xn)+21f′′(ξn)(r−xn)2. After dividing by f′(xn):
The given f′(xn)f(xn)=xn−xn+1 yields f′(xn)f(xn)+(r−xn)=r−xn+1, and (r−xn)2=en2. So 0=−en+1+2f′(xn)f′′(ξn)en2, that is:
en+1=2f′(xn)f′′(ξn)en2
The new error is a coefficient times the square of the previous one, so the convergence is quadratic. The coefficient Cn=2f′(xn)f′′(ξn) is not one fixed number: it depends on n, because xn and ξn change from step to step. But ξn lies between xn and the root r, and xn→r, so near the root the coefficient approaches one number, 2f′(r)f′′(r). “Constant” here means that the coefficient stays between two fixed numbers and tends to a limit.
Example: x2−2
For f(x)=x2−2 the identity is exact, with no ξ:en+1=2xnen2. From x0=1.5 and the root r=2:
n
xn
en
en+1/en2
0
1.500000000000
8.58×10−2
0.3333
1
1.416666666667
2.45×10−3
0.3529
2
1.414215686275
2.12×10−6
0.3536
3
1.414213562375
1.60×10−12
The ratio approaches 2f′(r)f′′(r)=2⋅222=0.3536.
An Error Bound
The identity en+1=2f′(xn)f′′(ξn)en2 is exact, but we cannot compute with it: ξn is unknown, and xn changes from step to step. So instead of the exact value of the coefficient we look for a bound on it: one number K that fits all the steps and that can be computed in advance from the function alone.
To bound a fraction we bound the numerator from above and the denominator from below: the largest possible fraction is the largest numerator divided by the smallest denominator. Suppose there is an interval I that contains the root and all the points xn (and so also ξn, which lies between them and the root), and on which two conditions hold:
∣f′′(x)∣≤M: the curvature is bounded. This bounds the numerator, ∣f′′(ξn)∣≤M, without knowing where ξn is.
∣f′(x)∣≥m>0: the slope stays away from zero. This bounds the denominator from below, ∣f′(xn)∣≥m, and avoids dividing by a tiny number. This is exactly the situation of a nearly flat tangent that flings the next point far away.
Hence 2f′(xn)f′′(ξn)≤2mM, that is:
∣en+1∣≤Ken2,K=2mM
For x2−2 on [1,2]:f′(x)=2x≥2 so m=2,f′′(x)=2 so M=2 and K=21. The bound Ken2 against the actual next error:
n
Ken2 (the bound)
en+1 (actual)
0
3.68×10−3
2.45×10−3
1
3.01×10−6
2.12×10−6
2
2.26×10−12
1.60×10−12
The bound holds in every row and is close to the actual error, because the actual constant 0.354 is close to K=0.5.
Procedure: how to bound Newton’s error
Choose an interval. Choose a radius ρ and an interval I=[r−ρ,r+ρ] around the root (r is estimated in advance, for example from a bracket), so that x0 is inside it.
Find M. The largest value of ∣f′′∣ on I (check the ends and the points where f(3)=0).
Find m. The smallest value of ∣f′∣ on I, and make sure that m>0, that is, that f′ does not vanish on the interval.
Compute K=2mM and check that Kρ<1.
Conclude. If the check passed, every xn stays in I, and ∣en+1∣≤Ken2, so ∣en∣≤K1(K∣e0∣)2n.
If the check failed, reduce ρ (so m grows or M shrinks) or go back to a method with a bracket.
For x2−2 with ρ=0.4:M=2,m≈2.03,K≈0.493 and Kρ≈0.197<1, so the bound holds.
When Convergence Is Guaranteed
The bound ∣en+1∣≤Ken2 guarantees that the error shrinks in a step only when K∣en∣<1, and then ∣en+1∣<∣en∣. This gives the condition, and “close enough” gets a numerical meaning: a distance smaller than K1.
Claim (local convergence). Let I=[r−ρ,r+ρ] be an interval on which ∣f′∣≥m>0 and ∣f′′∣≤M, with Kρ<1 for K=2mM. If x0∈I, then every xn belongs to I and:
∣en∣≤K1(K∣e0∣)2nn→∞0Proof
Denote qn=K∣en∣. Suppose xn∈I, that is ∣en∣≤ρ. Then f′(xn)=0 and the Newton step is defined, and the bound gives ∣en+1∣≤Ken2=qn∣en∣. Since qn≤Kρ<1, we get ∣en+1∣<∣en∣≤ρ, so xn+1∈I. By induction all the points are in I.
Multiplying the bound by K gives qn+1≤qn2, and by induction qn≤q02n. Since q0≤Kρ<1, the power q02n tends to 0, and dividing by K gives the claim.
Why does this mean that the number of digits doubles at every step? qn+1≤qn2 says that −log10qn+1≥2(−log10qn): the number of correct digits, relative to K1, at least doubles in a step.
Example: x2−2 from 1.5
Choose ρ=0.4 and I=[r−0.4,r+0.4]. The left end is r−0.4≈1.014, so m=2(r−0.4)≈2.03 and M=2,K≈0.493 and Kρ≈0.197<1. The claim applies to every start in I, and x0=1.5 is inside it, with K∣e0∣≈0.0423. The bound K1(K∣e0∣)2n gives 8.58×10−2,3.63×10−3,6.49×10−6 and 2.08×10−11 for n=0,1,2,3, above the errors in the table above.
A Condition That Holds From Any Start on the Right Side
The local condition has a drawback: you need to know m and M and the distance of the start. Another condition guarantees convergence without bounds, when the shape of f is convenient.
Claim (convergence from any start on the right side). Let f be twice continuously differentiable on [a,b] with f(a)f(b)<0, and suppose that f′ and f′′ do not change sign on the interval and f′=0 on it. Then f has a unique root r in the interval, and for every x0∈[a,b] with f(x0)f′′(x0)>0 Newton’s method converges to r.
Proof
We prove the case f′>0 and f′′≥0 on the interval: f is increasing and convex. The other three cases follow by replacing f with −f or substituting x↦−x. Since f is increasing and f(a)f(b)<0, there is a unique root r, and the condition f(x0)f′′(x0)>0 says f(x0)>0, that is x0>r.
From the identity en+1=2f′(xn)f′′(ξn)en2≥0 we get xn+1≥r for every n. When the point is to the right of the root, f(xn)≥0 and f′(xn)>0, so xn+1=xn−f′(xn)f(xn)≤xn. The sequence is decreasing and bounded below by r, so it converges to a limit L≥r in the interval. Passing to the limit in xn+1=xn−f′(xn)f(xn), with f and f′ continuous and f′(L)=0, gives f′(L)f(L)=0, that is f(L)=0. The root is unique, so L=r.
In the example x2−2 on [1,2]:f(1)=−1,f(2)=2,f′=2x>0 and f′′=2>0. The start x0=2 satisfies ff′′>0, and the sequence decreases to the root: 2,1.5,1.41667,1.41422,1.4142135624. From x0=1 the condition does not hold, but the first step lands at 1.5, to the right of the root, because the identity always gives e1≥0.
The Exact Order of Convergence
Near a simple root (f′(r)=0) there are three separate facts, and so far we have proved two of them:
Convergence:xn→r (in the sections “When Convergence Is Guaranteed” and “A Condition That Holds From Any Start on the Right Side”).
A quadratic bound:∣en+1∣≤Ken2 (in the section “An Error Bound”).
The exact order: the limit of ∣en∣2∣en+1∣.
The bound says that the error shrinks at least like a square, and does not rule out a faster decrease. The order of convergence is defined by the limit of the ratio, not by a bound on it. Here en=xn−r is the signed error and ∣en∣ is the absolute error; in a square there is no difference, en2=∣en∣2.
Claim (the order of Newton’s method). Let f be twice continuously differentiable in a neighborhood of a root r with f′(r)=0, and suppose that Newton’s sequence satisfies xn→r and xn=r for every n (the method does not land exactly on the root and stop). Then
When f′′(r)=0 the limit is positive and finite, and the order of convergence is exactly 2.
Proof
Since xn→r, from some n on all the points lie in a neighborhood where f is twice continuously differentiable and f′=0 (the derivative is continuous and f′(r)=0). There the identity from the section “How Wrong Is One Step” holds, and since en=0 we may divide it by en2:
en2en+1=2f′(xn)f′′(ξn)
for some ξn between xn and r.
ξn→r. The point ξn lies between xn and r, so 0≤∣ξn−r∣≤∣en∣. The right side tends to 0, and by the squeeze theorem ∣ξn−r∣→0 too.
Continuity.f′′ is continuous, so f′′(ξn)→f′′(r);f′ is continuous, so f′(xn)→f′(r).
Limit of a quotient. The denominator tends to 2f′(r)=0, so the quotient tends to 2f′(r)f′′(r). The absolute value is a continuous function, so the ratio of the absolute errors also tends to the absolute value of the limit.
The paragraph after the identity said that the coefficient Cn approaches 2f′(r)f′′(r); this is the proof. The sections above gave a bound on the ratio, and this claim gives its limit. For x2−2 from 1.5 the ratios in the table of the section “How Wrong Is One Step” are 0.3333,0.3529 and 0.3536: they are not only below the bound K=0.5, they tend to 2f′(r)f′′(r)=221≈0.3536. Here f′′(r)=2=0, so the order is exactly 2.
When f′′(r)=0: Higher Orders
If f′′(r)=0 the limit of the previous section is 0: the ratio ∣en∣2∣en+1∣ tends to zero, and the error shrinks faster than a square. To find out how fast, we look for the first derivative above f′ that does not vanish at the root.
Claim (higher order). Let p≥2 be an integer, let f be p times continuously differentiable in a neighborhood of a root r, and suppose
f′(r)=0,f′′(r)=f′′′(r)=⋯=f(p−1)(r)=0,f(p)(r)=0
(for p=2 no derivative vanishes, and this is the case of the previous section). If Newton’s sequence satisfies xn→r and xn=r for every n, then
n→∞limenpen+1=p!f′(r)(p−1)f(p)(r)=0
so ∣en∣p∣en+1∣ tends to the absolute value of the limit, and the order of convergence is exactly p. For p=2 the limit is 2f′(r)f′′(r), as in the previous section, and for p=3 it is 3!f′(r)2f′′′(r)=3f′(r)f′′′(r).
The function. The Taylor polynomial of degree p−1 of f around r is just f′(r)e, because f(r)=0 and the derivatives of orders 2 to p−1 vanish. So, for some ηn between xn and r:
f(xn)=f′(r)e+p!f(p)(ηn)ep
The derivative. The same formula for f′ with a polynomial of degree p−2: the derivatives of f′ of orders 1 to p−2 at the root are f′′(r),…,f(p−1)(r), all zero. So, for some θn between xn and r:
As in the previous section, ηn→r and θn→r by the squeeze theorem, and f(p) and f′ are continuous. So the limit is
f′(r)f(p)(r)((p−1)!1−p!1)=f′(r)f(p)(r)⋅p!p−1
because (p−1)!1=p!p.
The intuition. The closer f is to a straight line near the root, the more accurate the tangent: when the derivatives of orders 2 to p−1 vanish, the gap between f and its tangent at r is of order ep rather than e2. A linear function with nonzero slope is its own tangent, and Newton solves it in one step. But all derivatives of order 2 and higher vanishing at one point does not by itself make f a straight line without an extra assumption (for example that f equals its Taylor series around r), so the claim is stated only for a finite p.
Example: x+xp
For f(x)=x+xp the root is r=0, with f′(0)=1,f(k)(0)=0 for 2≤k≤p−1 and f(p)(0)=p!. By the claim, enpen+1→p!⋅1(p−1)p!=p−1.
Work it out: write Newton’s step for f(x)=x+xp as a single fraction. Then, for p=3, compute x1 from x0=0.1 and the ratio e03e1.
The root is 0, so en=xn and e03e1=1.032≈1.942. In general enpen+1=1+pxnp−1p−1, and since xn→0 the ratio tends to p−1.
From x0=0.1, the errors after three steps:
p
e1
e2
e3
2
8.333×10−3
6.831×10−5
4.665×10−9
3
1.942×10−3
1.464×10−8
6.278×10−24
4
2.988×10−4
2.392×10−14
9.813×10−55
5
3.998×10−5
4.086×10−22
4.554×10−107
The ratios enpen+1 tend to p−1:
p
e1/e0p
e2/e1p
e3/e2p
2
0.8333
0.9836
0.9999
3
1.9417
2.0000
2.0000
4
2.9880
3.0000
3.0000
5
3.9980
4.0000
4.0000
The number of correct digits grows roughly p-fold at each step: for p=5 the exponent of the error goes from −22 to −107, roughly 5-fold. These errors are far below the floor of double precision. In double precision the step xn−f′(xn)f(xn) subtracts two close numbers (catastrophic cancellation), and the result is accurate only to about 10−16 relative to xn: for p=5 the second step already gives exactly 0. So the tables were computed in exact arithmetic with fractions.
Why Newton Fails
Every failure breaks one of the conditions of the local convergence claim (in the section “When Convergence Is Guaranteed”): a slope that stays away from zero (m>0), an interval on which f′′ is bounded, or a start that is close enough. The table summarizes four cases. The first three are tabs in the explorer of the secant method and Newton–Raphson page: “Newton from far”, “Newton cycles” and “Newton diverges”.
Case
What happens
What is broken
An almost zero slope
A far jump
m small, K large
A cycle (x3−2x+2 from 0)
Returns to earlier points
f′ vanishes on the way, f′′ changes sign
arctan from 1.6
Moving away from the root
A start above the threshold, f′ decays
x2 at a double root
Linear convergence
f′(r)=0
An almost zero slope
For f(x)=x2−2 from x0=0.01 the slope is f′(0.01)=0.02, and the first step jumps to 0.01+0.022−0.0001=100.005. From there Newton returns slowly, roughly halving the distance at each step, so it takes 11 steps to an error of 10−10, against 3 steps from 1.5.
The reason: when the slope is small, m is small and K=2mM is large, so the range ∣e0∣<K1 that the claim requires is very small.
The values and the count
The next values are 50.012,25.026,12.553,6.356,3.335,1.968. The count of 11 steps measures the true error. The explorer’s stopping rule checks both the step and ∣f∣, so it needs one more step: 12 against 4.
A cycle
For f(x)=x3−2x+2 the real root is r≈−1.769. From x0=0 Newton jumps to x1=1, and from there back to x2=0, and so on forever: the tangent at each of the two points leads to the other.
The reason: between the start and the root f′(x)=3x2−2 vanishes (at x=−2/3≈−0.816), so there is no m>0 and the local claim is empty. f′′(x)=6x also changes sign, so the global condition does not hold.
The computation of the two steps
At x0=0:f(0)=2 and f′(0)=−2, so x1=0−−22=1. At 1:f(1)=1 and f′(1)=1, so x2=1−11=0.
Divergence
For f(x)=arctanx the root is 0 and the step is xn+1=xn−(1+xn2)arctanxn. There is a threshold: below it the sequence converges, for example from 1.3, and above it the sequence moves away, and from 1.6 we get −2.003,3.551,−14.09,285.2.
The reason: the derivative 1+x21 becomes small as we move away from the root, so m is small on a long interval, and f′′ changes sign at 0.
Where the threshold is
The threshold x∗≈1.3917 is the solution of (1+x2)arctanx=2x. Then x1=−x∗ and the sequence jumps between x∗ and −x∗.
A double root
When f′(r)=0 the derivative vanishes exactly at the root, so on every interval that contains it there is no m>0.
Work it out: for f(x)=x2 the root is 0. Write Newton’s step, compute x1,x2,x3 from x0=1, and check what happens to the ratio of consecutive errors. Is the convergence quadratic?
Solution
xn+1=xn−2xnxn2=2xn. From 1 we get 0.5,0.25,0.125, and the error is halved at each step, that is, enen+1=21. The convergence is linear, not quadratic.
When to Stop
In a computation we do not know en, only the step εn=∣xn−xn−1∣ and the residual δn=∣f(xn)∣, which are the stopping rules of the course. Two estimates connect them to the error:
By the residual. By the mean value theorem f(xn)=f(xn)−f(r)=f′(η)en for some η between xn and r, so ∣en∣≤m∣f(xn)∣. When the slope is small, a small residual does not guarantee a small error.
By the step. Suppose K∣en−1∣≤21. Then εn≥∣en−1∣−∣en∣≥∣en−1∣(1−K∣en−1∣)≥21∣en−1∣, that is ∣en−1∣≤2εn, and from the bound ∣en∣≤Ken−12 we get ∣en∣≤4Kεn2.
For x2−2 from 1.5:ε2=∣x2−x1∣=2.45×10−3, and the bound 4Kε22=1.2×10−5 against the actual error e2=2.1×10−6. After a step of 2.45×10−3 the error of the new approximation is far smaller than the step, because it is about the square of the step.
The Secant Method: Convergence and Order
In the secant method the step xn+1=xn−f(xn)f(xn)−f(xn−1)xn−xn−1 uses the two latest points. We assume, as for Newton, that r is a simple root (f′(r)=0) and that f is twice continuously differentiable near it. The error ek=xk−r is a signed error: positive to the right of the root and negative to its left. When only the size matters we write ∣ek∣.
The Error in One Step
Write fk=f(xk) and bring the step to a common denominator:
xn+1=fn−fn−1xn(fn−fn−1)−fn(xn−xn−1)
In the numerator the terms xnfn and −fnxn cancel, and what remains is:
xn+1=fn−fn−1xn−1fn−xnfn−1
Subtract r=fn−fn−1rfn−rfn−1 from both sides. The numerator becomes (xn−1−r)fn−(xn−r)fn−1, that is:
en+1=fn−fn−1en−1fn−enfn−1
Work it out: for f(x)=x2−2, substitute into this formula and find en+1 in terms of en,en−1 and the points xn−1,xn.
Hint
fk=xk2−2=xk2−r2. Factor it.
Solution
fk=(xk−r)(xk+r)=ek(xk+r). In the numerator: en−1en(xn+r)−enen−1(xn−1+r)=enen−1(xn−xn−1). In the denominator: xn2−xn−12=(xn−xn−1)(xn+xn−1). After cancelling xn−xn−1:
en+1=xn−1+xnenen−1
The new error is the product of the two previous errors times a coefficient. From x0=2 and x1=1.5 the first coefficient is 3.51≈0.2857, and as the points approach 2 it approaches 221≈0.3536.
The replacement. When xn−1 and xn are close to the root, so are ζn−1 and ζn, and f′′ is continuous. So we replace f′′(ζn) and f′′(ζn−1) by f′′(r). The numerator becomes 21f′′(r)enen−1(en−en−1), and the denominator, by en2−en−12=(en−en−1)(en+en−1), becomes (en−en−1)(f′(r)+21f′′(r)(en+en−1)). The factor en−en−1 is common to both, and we cancel it:
The second ≈ holds because en+en−1→0. The new error is approximately a constant times the product of the two previous errors, not times the square of one error as in Newton. The constant C is the same as Newton’s.
For x2−2 from x0=2 and x1=1.5 the errors e0,…,e5 are 5.858×10−1,8.579×10−2,1.436×10−2,4.206×10−4,2.124×10−6 and 3.158×10−10. The ratios enen−1en+1 for n=1,2,3,4 are 0.2857,0.3415,0.3517 and 0.3535, approaching C=2⋅222≈0.3536.
What the replacement neglects, and when the cancellation is allowed
Let τn be the larger of ∣f′′(ζn)−f′′(r)∣ and ∣f′′(ζn−1)−f′′(r)∣. The replacement changes the bracket in the numerator by αn=(f′′(ζn)−f′′(r))en−(f′′(ζn−1)−f′′(r))en−1 and the bracket in the denominator by βn=(f′′(ζn)−f′′(r))en2−(f′′(ζn−1)−f′′(r))en−12, so
When xn→r, also ζn→r, so τn→0 because f′′ is continuous. But αn and βn are small relative to ∣en∣+∣en−1∣, and we divide them by en−en−1. So the cancellation is justified when the ratio λn=∣en−en−1∣∣en∣+∣en−1∣ stays bounded. Then en−en−1αn≤τnλn→0 and en−en−1βn≤τnλn(∣en∣+∣en−1∣)→0, and the ratio tends to 2f′(r)f′′(r)=C.
The ratio λn is bounded when the error shrinks at every step by at least a fixed factor: if ∣en∣≤q∣en−1∣ with q<1, then ∣en−en−1∣≥(1−q)∣en−1∣ and ∣en∣+∣en−1∣≤(1+q)∣en−1∣, so λn≤1−q1+q. This is what the claim in the subsection “Bound and Convergence” guarantees. When two consecutive errors are almost equal, en−en−1 is very small and the neglected terms can be larger than it. The exact identity in that subsection needs no such assumption.
Bound and Convergence
To prove that the method converges we need an exact identity, without ≈. Rolle’s theorem, applied twice, gives it:
en+1=Knenen−1,Kn=2snf′′(ξn)
Here sn=xn−xn−1fn−fn−1 is the slope of the secant line, and ξn is a point in the smallest interval that contains xn−1,xn and r. By the mean value theorem sn=f′(ηn) for some ηn between xn−1 and xn. For x2−2 this is the formula from the exercise: f′′=2 and sn=xn−1+xn.
Proof: the exact identity by Rolle's theorem
Rolle’s theorem (from calculus): if a differentiable function takes the same value at two points, its derivative vanishes at some point between them. Let L be the line through (xn−1,fn−1) and (xn,fn), and assume that r differs from both points. Otherwise fn−1=0 or fn=0, the step gives xn+1=r, and both sides of the identity are zero.
An auxiliary function. Define g(x)=f(x)−L(x)−κ(x−xn−1)(x−xn), and choose the number κ (the Greek letter kappa) so that g(r)=0. This is possible because (r−xn−1)(r−xn)=0. The line L passes through both points, so also g(xn−1)=0 and g(xn)=0:g has three distinct zeros.
Rolle twice. Between any two neighbouring zeros of g there is, by Rolle’s theorem, a zero of g′, so g′ has two distinct zeros. Between them there is a zero of g′′: a point ξn in the smallest interval that contains xn−1,xn and r.
Finding κ.L is a line, so L′′=0, and the second derivative of (x−xn−1)(x−xn) is 2. So g′′(x)=f′′(x)−2κ, and g′′(ξn)=0 gives κ=21f′′(ξn). From g(r)=0 we get f(r)−L(r)=21f′′(ξn)(r−xn−1)(r−xn).
To errors.f(r)=0 and (r−xn−1)(r−xn)=en−1en, so −L(r)=21f′′(ξn)en−1en.
The point xn+1. The point xn+1 is where L crosses the axis, L(xn+1)=0, and L is a line with slope sn. So L(r)=L(r)−L(xn+1)=sn(r−xn+1)=−snen+1.
Comparison. From the last two items snen+1=21f′′(ξn)en−1en. When f′ does not vanish between xn−1 and xn,sn=f′(ηn)=0, and dividing by sn gives the identity.
Claim (local convergence of the secant method). Let I=[r−ρ,r+ρ] be an interval on which ∣f′∣≥m>0 and ∣f′′∣≤M. Denote K=2mM (the same K as in Newton’s bound) and q=Kρ, and assume q<1. If x0=x1 both lie in I, then every xn belongs to I, every step is defined until the root is reached exactly (and then we stop), and:
∣en+1∣≤K∣en∣∣en−1∣≤q∣en∣
Hence ∣en∣≤qn−1∣e1∣ for every n≥1, and the errors tend to 0 at least as fast as a geometric sequence with ratio q.
The claim requires two distinct starts close enough to the root, and does not require the root to lie between them. These are sufficient, local conditions: they are not necessary, and they say nothing about a distant start. For x2−2 the method converges to 2 also from x0=10 and x1=9, although every interval [r−ρ,r+ρ] around the root that contains 10 also contains 0, where f′=0. A double root (f′(r)=0) does not satisfy the condition m>0 on any interval around it.
For x2−2 with ρ=0.6:m=2(r−0.6)≈1.628,M=2,K≈0.614 and q≈0.368<1. The starts x0=2 and x1=1.5 are inside I(∣e0∣≈0.586), so every error is smaller than the previous one by at least the factor 0.368. In fact ∣e2∣/∣e1∣≈0.167, and the next ratios are smaller still.
Proof: the approximations stay in the interval and the errors shrink
By induction on n≥1. The hypothesis: xn−1 and xn are in I, distinct, and neither of them is r (otherwise the root is found and we stop). For n=1 this is the assumption of the claim.
The step is defined. By the mean value theorem sn=f′(ηn) with ηn between xn−1 and xn, that is in I. So ∣sn∣≥m>0, that is fn=fn−1.
The bound.ξn lies in the smallest interval that contains xn−1,xn and r, all of which are in I, so ∣f′′(ξn)∣≤M. From the identity: ∣en+1∣=2∣sn∣∣f′′(ξn)∣∣en∣∣en−1∣≤K∣en∣∣en−1∣.
The new approximation is in the interval.∣en−1∣≤ρ, so ∣en+1∣≤Kρ∣en∣=q∣en∣<∣en∣≤ρ, that is xn+1∈I.
The points are distinct. By item 3 ∣en+1∣<∣en∣, so xn+1=xn. If xn+1=r the root is found; otherwise the hypothesis holds for n+1.
By item 3 ∣en+1∣≤q∣en∣ for every n≥1, and by induction ∣en∣≤qn−1∣e1∣.
The Order of Convergence
Claim (the order). Denote φ=21+5≈1.618 (the golden ratio). Assume that xn→r, that xn=r for every n, and that f′′(r)=0. Then
n→∞limenen−1en+1=C=2f′(r)f′′(r)
and also:
n→∞lim∣en∣φ∣en+1∣=∣C∣φ−1
That is, the order of convergence of the secant method is φ: the number of correct digits grows by a factor of about 1.618 at each step, against a factor of 2 for Newton.
Where does φ come from? If ∣en+1∣≈A∣en∣p for every n, then also ∣en∣≈A∣en−1∣p. Substitute both into ∣en+1∣≈∣C∣∣en∣∣en−1∣: the left side gives the power ∣en−1∣p2, and the right side ∣en−1∣p+1. Matching the powers gives p2=p+1, whose positive solution is φ. This matching of powers assumes in advance that the ratio ∣en+1∣/∣en∣p approaches a constant, so it does not prove that the limit exists. The proof in the next block makes no such assumption.
For x2−2 from 2 and 1.5 the ratios ∣en+1∣/∣en∣φ for n=1,…,6 are 0.764,0.403,0.616,0.477,0.559 and 0.507: they oscillate around ∣C∣φ−1≈0.526 and approach it. We computed e7≈2.6×10−26 with hundreds of digits, because it is far below machine precision.
Proof: the limit and the golden-ratio order
The limit of Kn. Since f′(r)=0 and f′,f′′ are continuous, there is an interval I around r as in the local convergence claim, and from some index on xn−1 and xn lie in it. From there the identity en+1=Knenen−1 holds, with Kn=2f′(ηn)f′′(ξn). Both ends of the smallest interval that contains xn−1,xn and r tend to r, so by the squeeze theorem ξn→r and ηn→r. By continuity of f′′ and f′ we get Kn→2f′(r)f′′(r)=C. Also Kn=0, because en+1=0.
Logarithms. Let cn=∣C∣∣en∣>0 and un=−lncn. Multiplying the identity by ∣C∣ gives cn+1=∣C∣∣Kn∣cncn−1, and after taking logarithms un+1=un+un−1+dn with dn=−ln∣C∣∣Kn∣→0. The value un is large when the error is small, and up to a constant it is the number of correct digits.
Fibonacci. Without dn this is the Fibonacci recurrence tn+1=tn+tn−1. Substituting tn=pn gives p2=p+1, whose roots are φ=21+5 and ψ=21−5≈−0.618, and the solutions are Aφn+Bψn. Note that φ+ψ=1 and φψ=−1.
The deviation from growth by φ. Let vn=un+1−φun. By 1−φ=ψ and −ψφ=1:vn=ψun+un−1+dn=ψ(un−φun−1)+dn=ψvn−1+dn.
The deviation tends to 0. Let ϵ>0 and N be such that ∣dk∣≤ϵ for every k>N. Unrolling the recurrence gives vn=ψn−NvN+∑j=0n−N−1ψjdn−j, so ∣vn∣≤∣ψ∣n−N∣vN∣+ϵ∑j=0∞∣ψ∣j, where ∑j=0∞∣ψ∣j=1+∣ψ∣+∣ψ∣2+⋯=1−∣ψ∣1, because ∣ψ∣<1. The first term tends to 0, so for every large enough n,∣vn∣≤ϵ+1−∣ψ∣ϵ. This holds for every ϵ>0, so vn→0.
Conclusion.vn=−lncn+1+φlncn=−lncnφcn+1→0, so cnφcn+1=∣C∣1−φ∣en∣φ∣en+1∣→1, which is the claim. Moreover unun+1=φ+unvn→φ, because un→∞: the number of digits grows by a factor of about φ.
The recurrence vn=ψvn−1+dn explains the oscillation in the numbers for x2−2: the deviations alternate in sign and shrink at each step by a factor of about ∣ψ∣≈0.618. In the example the ratios vn/vn−1 are −0.711,−0.598,−0.619 and −0.618. Another proof of the order, with a different tool, is on the secant method and Newton–Raphson page.
Takeaways
The tangent is the Taylor polynomial of degree one, and Newton solves it instead of the equation.
The Taylor error term gives the identityen+1=2f′(xn)f′′(ξn)en2, and so the bound ∣en+1∣≤Ken2 with K=2mM.
The conditionK∣e0∣<1 guarantees quadratic convergence, because qn=K∣en∣ satisfies qn+1≤qn2. Another condition, derivatives that do not change sign and a start on the right side, guarantees monotone convergence.
Every failure breaks a condition: a slope close to zero, a start far from the root, a sign change of the derivatives, or a double root.
A small residual (δn) is not a small error when the slope is small.