Secant Method and Order of Convergence

Published on 2026-11-04·v1.0

Learning Objectives

  • Derive the secant method from Newton's method and count its cost in function evaluations.
  • State the formal definition of order of convergence, and tell a true order from a bound on a bracket.
  • Derive the error relation εk+1≈Cεkεk−1\varepsilon_{k+1}\approx C\varepsilon_k\varepsilon_{k-1} and, from it, the order ϕ=(1+5)/2\phi=(1+\sqrt5)/2.
  • Measure that order from the errors of a run, and explain why float64 alone gives only a rough value.
  • Compare Newton and the secant method per evaluation under a stated cost model, and break each hypothesis of the order theorem.

Context & Motivation

newtons-method needs f′f' at every step. Often no formula for it exists: ff may be a simulation, a solver call, or a closed library. The secant method keeps the idea of solving a line and replaces the tangent by the line through the last two points, so it needs only values of ff.

The cost is a lower order, and the surprise is that the lower order can still win. Order per iteration is the wrong yardstick when iterations cost different amounts. This lesson makes "order" precise, derives the unusual value 1.618…1.618\ldots, and measures it.

Core Theory

From Newton to the secant

Replace f′(xk)f'(x_k) in Newton's iteration by the slope through the last two iterates:

xk+1=xk−f(xk) xk−xk−1f(xk)−f(xk−1).x_{k+1}=x_k-f(x_k)\,\frac{x_k-x_{k-1}}{f(x_k)-f(x_{k-1})}.

It needs two distinct starting points, which need not surround the root. Since f(xk−1)f(x_{k-1}) is already stored, each iteration costs one new evaluation, so xkx_k costs kk evaluations in total for k≥2k\ge2. The step is undefined when f(xk)=f(xk−1)f(x_k)=f(x_{k-1}), where the secant line is horizontal.

Order of convergence, formally

Let xk→rx_k\to r with ek=∣xk−r∣≠0e_k=\lvert x_k-r\rvert\neq0. The sequence has order p≥1p\ge1 with constant AA if

lim⁡k→∞ek+1ek p=A,0<A<∞,\lim_{k\to\infty}\frac{e_{k+1}}{e_k^{\,p}}=A,\qquad 0<A<\infty,

with A<1A<1 also required when p=1p=1. Order 1 is linear and order 2 is quadratic. If ek+1/ek→0e_{k+1}/e_k\to0 the convergence is superlinear, which every p>1p>1 satisfies. This is an asymptotic statement about one sequence, under the hypotheses of whatever theorem produced it.

Not every convergent sequence has an order. A weaker notion only asks that ek≤bke_k\le b_k for some sequence bkb_k that has order pp. Bisection is the standard case: the bracket half-width has order 1 with constant 12\tfrac12, but the midpoint errors in general do not. On the equation of Example 1, starting from [0,2][0,2], the ratio ek+1/eke_{k+1}/e_k ranged from 0.0050.005 to 89.889.8 within 15 steps and settled on nothing. Special cases exist: for 3x−13x-1 on [0,1][0,1] the ratio is exactly 12\tfrac12.

If ek+1=Aek pe_{k+1}=Ae_k^{\,p} held exactly, then ek/ek−1=(ek−1/ek−2)pe_k/e_{k-1}=(e_{k-1}/e_{k-2})^p, which gives the measurement used throughout:

pk=ln⁡(ek/ek−1)ln⁡(ek−1/ek−2).p_k=\frac{\ln(e_k/e_{k-1})}{\ln(e_{k-1}/e_{k-2})}.

The error relation

Let f[a,b]=f(b)−f(a)b−af[a,b]=\frac{f(b)-f(a)}{b-a} and f[a,b,c]=f[b,c]−f[a,b]c−af[a,b,c]=\frac{f[b,c]-f[a,b]}{c-a}, and write the signed error εk=xk−r\varepsilon_k=x_k-r. The secant line through xk−1x_{k-1} and xkx_k is the degree-1 interpolant of ff, so for every xx

f(x)=f(xk)+f[xk−1,xk] (x−xk)+f[xk−1,xk,x] (x−xk−1)(x−xk).f(x)=f(x_k)+f[x_{k-1},x_k]\,(x-x_k)+f[x_{k-1},x_k,x]\,(x-x_{k-1})(x-x_k).

Set x=rx=r, use f(r)=0f(r)=0, and note that the first two terms are the line, which vanishes at xk+1x_{k+1}. This gives an exact formula:

εk+1=f[xk−1,xk,r]f[xk−1,xk]  εk εk−1.\varepsilon_{k+1}=\frac{f[x_{k-1},x_k,r]}{f[x_{k-1},x_k]}\;\varepsilon_k\,\varepsilon_{k-1}.

For f∈C2f\in C^2, f[a,b]=f′(η)f[a,b]=f'(\eta) and f[a,b,c]=12f′′(ζ)f[a,b,c]=\tfrac12f''(\zeta) for points between the arguments. So near a simple root the fraction tends to C=f′′(r)/(2f′(r))C=f''(r)/(2f'(r)), the same constant as Newton's. Newton's error is proportional to εk2\varepsilon_k^2; here one of the two factors is the older, larger error.

The order is the golden ratio

Hypotheses. f∈C2f\in C^2 near rr, f(r)=0f(r)=0, f′(r)≠0f'(r)\neq0, f′′(r)≠0f''(r)\neq0, and x0≠x1x_0\neq x_1 are close enough to rr. Conclusion. xk→rx_k\to r with order ϕ=(1+5)/2≈1.618\phi=(1+\sqrt5)/2\approx1.618 and constant ∣C∣ϕ−1\lvert C\rvert^{\phi-1}.

The reason shows up in a logarithm. With yk=ln⁡(∣C∣ek)y_k=\ln(\lvert C\rvert e_k), the relation ek+1≈∣C∣ekek−1e_{k+1}\approx\lvert C\rvert e_ke_{k-1} becomes yk+1≈yk+yk−1y_{k+1}\approx y_k+y_{k-1}, the Fibonacci recurrence. Its solutions are yk=αϕk+β(−1/ϕ)ky_k=\alpha\phi^k+\beta(-1/\phi)^k. Convergence means yk→−∞y_k\to-\infty, so α<0\alpha<0, the second term dies out, and yk+1/yk→ϕy_{k+1}/y_k\to\phi. For the constant, suppose ek+1=Aek pe_{k+1}=Ae_k^{\,p}. Then ek−1=(ek/A)1/pe_{k-1}=(e_k/A)^{1/p}, and substituting gives Aek p=∣C∣A−1/pek 1+1/pAe_k^{\,p}=\lvert C\rvert A^{-1/p}e_k^{\,1+1/p}. Matching exponents gives p2=p+1p^2=p+1, and matching constants gives A=∣C∣1/p=∣C∣p−1A=\lvert C\rvert^{1/p}=\lvert C\rvert^{p-1}. This argument treats ≈\approx as ==; a full proof bounds the fraction above.

Worked Examples

Example 1: the order measured

Solve Kepler's equation from newtons-method, f(E)=E−0.3sin⁡E−1f(E)=E-0.3\sin E-1, with x0=1x_0=1, x1=1.5x_1=1.5. In float64, against a reference root computed to 2000 digits:

text
k x_k e_k e_k/(e_{k-1}e_{k-2}) p_k 0 1.0 2.881e-01 1 1.5 2.119e-01 2 1.2785142391301476 9.577e-03 0.1569 3 1.2877773371566017 3.140e-04 0.1547 1.104 4 1.2880917861898569 4.730e-07 0.1573 1.901 5 1.2880913131884923 2.335e-11 0.1572 1.526 6 1.2880913132118377 1.177e-17

The two-term ratio already matches C=0.1572C=0.1572. The order column does not settle: float64 gives only three clean values, 1.101.10, 1.901.90, 1.531.53, and the (−1/ϕ)k(-1/\phi)^k term still matters at that stage. At k=6k=6 the relation predicts 1.7×10−181.7\times10^{-18}, below the rounding error, and x6x_6 is simply the float nearest rr. Then f(x6)=0f(x_6)=0, x7=x6x_7=x_6, and the formula for x8x_8 is 0/00/0, so a stopping test is mandatory rather than optional. scipy.optimize.newton(f, 1.0, x1=1.5, tol=1e-12), which runs the secant method when no fprime is given, stops after 6 iterations with a result one float away, because it writes the update differently.

The limit needs more digits, so here is the same iteration at 2000 digits:

text
k e_k e_k/(e_{k-1}e_{k-2}) e_k/e_{k-1}^phi p_k 6 1.736e-18 0.1572012 0.27676 1.6553 8 1.738e-48 0.1572012 0.30198 1.6234 10 4.757e-127 0.1572012 0.31221 1.6188 12 9.732e-333 0.1572012 0.31620 1.6181 14 3.047e-871 0.1572012 0.31774 1.6181

pkp_k approaches ϕ=1.61803\phi=1.61803 and the third column heads for ∣C∣ϕ−1=0.31870\lvert C\rvert^{\phi-1}=0.31870, in agreement with the theorem.

Example 2: Newton against the secant method, per evaluation

Same equation, with Newton from x0=1x_0=1. Counting ff and f′f' as one evaluation each, and listing the error of the best iterate those evaluations can produce:

text
evaluations Newton Secant (x1 = 1.5) 2 1.3e-02 9.6e-03 3 3.1e-04 4 2.7e-05 4.7e-07 5 2.3e-11 6 1.2e-10 1.2e-17 8 1.2e-17

The secant method wins here despite the lower order. The result does depend on x1x_1: with x1=2x_1=2 it reaches the rounding floor at 7 evaluations, and with x1=1.0001x_1=1.0001 at 6.

Asymptotically, the number of correct digits is multiplied by pp per iteration, so per unit of work it is multiplied by p1/wp^{1/w}, where ww is the work of one iteration. If f′f' costs θ\theta times as much as ff, Newton gets 21/(1+θ)2^{1/(1+\theta)} and the secant method gets ϕ\phi. At θ=1\theta=1 that is 1.4141.414 against 1.6181.618. The two are equal at θ=ln⁡2/ln⁡ϕ−1=0.44\theta=\ln2/\ln\phi-1=0.44, so Newton is ahead only when f′f' costs less than about 44% of ff. Kepler's f′f' only adds a cos⁡E\cos E to the sin⁡E\sin E of ff, and if both come from one call then θ\theta is near 00 and Newton is ahead, even though the table above, which charges full price for f′f', favors the secant method. The model ignores the starting phase and rounding, and it assumes both methods are in their asymptotic regime.

Example 3: each hypothesis removed

f′(r)≠0f'(r)\neq0. For f(x)=x2f(x)=x^2 the iteration is exactly 1/xk+1=1/xk+1/xk−11/x_{k+1}=1/x_k+1/x_{k-1}, again Fibonacci, so the ratio tends to 1/ϕ=0.6181/\phi=0.618 and the order is 1. On x3−3x+2x^3-3x+2, with double root 11 and starts 22 and 1.81.8, the ratio reaches 0.61800.6180 by k=20k=20, then rounding breaks it and the run freezes at 2.7×10−92.7\times10^{-9} at k=40k=40, near the floor Newton hit. Per evaluation this is still better than Newton's 0.50.5 per two evaluations, which is 0.7070.707 per evaluation.

f∈C2f\in C^2. For f(x)=x+x∣x∣f(x)=x+x\sqrt{\lvert x\rvert} and a,b>0a,b>0, f[a,b,0]=1/(a+b)f[a,b,0]=1/(\sqrt a+\sqrt b), so ek+1≈ekek−11/2e_{k+1}\approx e_ke_{k-1}^{1/2} instead. The same argument gives p=1+1/(2p)p=1+1/(2p), so p=(1+3)/2=1.36603p=(1+\sqrt3)/2=1.36603. Measured from x0=0.5x_0=0.5, x1=0.4x_1=0.4, in float64 (the root at 00 leaves plenty of exponent range):

text
k e_k e_k/(e_{k-1}e_{k-2}^(1/2)) p_k 6 8.657e-06 0.7315 1.349 9 8.960e-14 0.9508 1.359 13 3.609e-46 1.0002 1.366

f′′(r)≠0f''(r)\neq0. Removing this one speeds the method up. For sin⁡x\sin x at r=0r=0, f[a,b,0]≈−(a+b)/6f[a,b,0]\approx-(a+b)/6, so ek+1≈16ekek−12e_{k+1}\approx\tfrac16e_ke_{k-1}^2, and p=1+2/pp=1+2/p gives p=2p=2. A 6000-digit run from 0.50.5, 0.40.4 gives pkp_k of 1.9611.961, 2.0202.020, 1.9901.990, 2.0052.005, and the ratio ek+1/(ekek−12)e_{k+1}/(e_ke_{k-1}^2) settles at 0.1666670.166667. Still, by the definition above this sequence has no order. Here yk=ln⁡eky_k=\ln e_k plus a constant obeys yk+1=yk+2yk−1y_{k+1}=y_k+2y_{k-1}, with roots 22 and −1-1, and the (−1)k(-1)^k term never dies out relative to the constant: ek/ek−12e_k/e_{k-1}^2 alternates between 0.7819090.781909 and 0.2131530.213153 from k=5k=5 to k=12k=12, with no drift. So pk→2p_k\to2, yet no limit AA exists, the same distinction drawn for bisection. The value 1.6181.618 is therefore a statement under its hypotheses, not a property of the method alone.

Good starts. For x2−4x^2-4 with x0=−3x_0=-3, x1=3x_1=3 the two values of ff are equal and the first step divides by zero, although roots lie between the starts. For arctan⁡x\arctan x, starts 33, 44 give −13.3-13.3, −4.1-4.1, 70.670.6, 30.430.4, −3270-3270 and diverge, while 1.21.2, 22 converge. At high eccentricity (e=0.99e=0.99, M=0.2M=0.2), starts 0.20.2, 0.30.3 stay below 55 and reach the root at k=13k=13, a calmer run than Newton's excursion to 1126.71126.7 in newtons-method. That is one case: neither method is safe from a bad start.

Example 4: a black box, where f′f' does not exist as code

A projectile with quadratic drag obeys v˙=−gy^−k∥v∥v\dot{\mathbf v}=-g\hat{\mathbf y}-k\lVert\mathbf v\rVert\mathbf v, with g=9.81g=9.81 m/s², k=0.005k=0.005 per meter, and launch speed 100100 m/s. Find the angle θ\theta below the maximum-range angle that lands at 250250 m. The range has no formula, so f(θ)=range(θ)−250f(\theta)=\text{range}(\theta)-250 is one call to scipy.integrate.solve_ivp with method='DOP853', at about 270 right-hand-side evaluations. With starts 15∘15^\circ and 20∘20^\circ, rtol=1e-11 and atol=1e-13:

text
evaluations theta (degrees) f(theta) (m) 3 22.160585688 -2.93 4 22.957456986 -3.83e-01 5 23.077269499 -1.70e-02 6 23.082829199 -1.06e-04 7 23.082864214 -2.98e-08 8 23.082864223534 1.47e-10

Later iterates only bounce: ∣f∣\lvert f\rvert stays between 7×10−117\times10^{-11} and 5×10−105\times10^{-10}, the noise of the integrator. Rerunning with rtol=1e-5 and atol=1e-7 takes the same number of steps and arrives at 23.0828668∘23.0828668^\circ, off by 2.6×10−62.6\times10^{-6} degrees. The secant method converges just as fast to the root of the function it was given. Order describes that speed and says nothing about how accurately ff was computed.

Example 5: keeping a bracket

The secant method can leave the root's neighborhood, so a tempting fix is regula falsi: use the same line, but replace whichever endpoint keeps a sign change. Counting the evaluation at which a point within 10−1010^{-10} of rr is first evaluated, on Example 1's equation over [0,2][0,2]:

text
bisection 36 regula falsi 13 scipy.optimize.brentq 7 secant (1, 1.5, no bracket) 6

Regula falsi is only linear here. The function is convex on the bracket, so the endpoint 22 never moves, and the error ratio settles at 0.1030.103. Keeping the bracket that way gives up the superlinear order. brentq keeps a bracket and combines bisection with inverse quadratic interpolation, which is why it is the usual default when a sign change is known.

Common Misconceptions & Pitfalls

  • "Order 1.618 means it is slower than Newton." Per iteration, yes. Per evaluation it can be faster (Example 2), unless f′f' is cheap.
  • "The starts must bracket the root." They need not, and starts that do are not safe either: x2−4x^2-4 from ±3\pm3 fails at the first step.
  • "The secant method is regula falsi." Same line, different bookkeeping. Regula falsi keeps a sign change and drops to linear order (Example 5).
  • "A float64 run shows the order." It gives a few noisy values of pkp_k. In Example 1 the ratio ek/(ek−1ek−2)e_k/(e_{k-1}e_{k-2}) was far more informative.
  • "The order is 1.6181.618, always." It requires a simple root, C2C^2, and f′′(r)≠0f''(r)\neq0. Without those, Example 3 measured 11 and 1.3661.366, and a case where pk→2p_k\to2 with no order at all.
  • "Bisection has order 1." Its bracket does; its midpoint errors in general have no limiting ratio.
  • "A faster order means a more accurate answer." Example 4 converged at full speed to a value limited by the accuracy of ff.
  • "Keep iterating to be safe." After convergence the denominator is pure rounding noise, or exactly zero. Stop on the step size and the residual, and cap the iterations.

Summary

The secant method replaces f′(xk)f'(x_k) by the slope through the last two points, so it costs one evaluation per iteration and needs no derivative. Order is defined by ek+1/ek p→Ae_{k+1}/e_k^{\,p}\to A, and it is measured with pkp_k; bisection's midpoints in general have no such limit, only a bound. The exact relation εk+1=f[xk−1,xk,r]f[xk−1,xk]εkεk−1\varepsilon_{k+1}=\frac{f[x_{k-1},x_k,r]}{f[x_{k-1},x_k]}\varepsilon_k\varepsilon_{k-1} gives ek+1≈∣C∣ekek−1e_{k+1}\approx\lvert C\rvert e_ke_{k-1}, a Fibonacci recurrence for the logarithms, and so order ϕ\phi with constant ∣C∣ϕ−1\lvert C\rvert^{\phi-1}, for a simple root of a C2C^2 function with f′′(r)≠0f''(r)\neq0 and good starts. High-precision runs reach 1.61811.6181 and 0.31870.3187; float64 gives only a rough value. Asymptotically, per evaluation, the secant method beats Newton when f′f' costs more than about 44% of ff. Without the hypotheses the measured order changed to 11 or 1.3661.366, pkp_k tended to 22 with no true order, or the run failed. When a bracket is known, brentq is the usual choice.

Documentation Links