Secant Method

Goals

Understand the secant method and how it achieves superlinear convergence (order $\varphi$) close to Newton's method without using a derivative.

Contents

1. Overview

The secant method is an iterative method for finding a root of a nonlinear equation $f(x)=0$. It replaces the derivative $f'(x_n)$ in Newton's method by the slope of the secant line through the two most recent points $(x_{n-1}, f(x_{n-1}))$ and $(x_n, f(x_n))$. Because no derivative needs to be evaluated explicitly, it is especially useful when $f'$ is hard to obtain.

2. Algorithm

Secant method iteration formula

Given initial values $x_0, x_1$,

$$x_{n+1} = x_n - f(x_n)\,\dfrac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}, \qquad n = 1, 2, \ldots$$

This is Newton's formula with $f'(x_n)$ replaced by the difference quotient $\dfrac{f(x_n)-f(x_{n-1})}{x_n - x_{n-1}}$.

0 / 0
Figure 1. The secant-method iteration ($f(x) = x^2 - 2$, root $x^* = \sqrt{2}$). Draw the secant (straight line) joining the two most recent points $(x_{n-1}, f(x_{n-1}))$ and $(x_n, f(x_n))$; its intersection with the $x$-axis is the next approximation $x_{n+1}$. The secant is drawn through both points and extended to the $x$-axis. Use "▶ Auto-play" or "Next / Prev" to step through one step at a time.

3. Order of Convergence

Theorem (order of convergence of the secant method)

If $f$ is twice continuously differentiable and $x_0, x_1$ are taken sufficiently close to a simple root $x^*$, the secant method converges with order

$$p = \dfrac{1+\sqrt{5}}{2} = \varphi \approx 1.618$$

where $\varphi$ is the golden ratio.

For intuition: the error $e_n = x_n - x^*$ satisfies $|e_{n+1}| \approx C\,|e_n|^{\varphi}$, where the exponent $\varphi$ arises as the positive root of $r^2 = r + 1$ (the golden ratio).

This superlinear convergence sits between Newton's method (order 2) and bisection (order 1), but the secant method needs only one function evaluation per iteration (Newton's method needs two: $f$ and $f'$). Therefore, compared on a per-function-evaluation basis, the secant method's efficiency index is $\varphi^1 \approx 1.618$, exceeding Newton's $2^{1/2} \approx 1.414$.

4. Comparison with Newton's Method

PropertyNewton's methodSecant method
Iteration formula$x_{n+1}=x_n-\dfrac{f(x_n)}{f'(x_n)}$$x_{n+1}=x_n-f(x_n)\dfrac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})}$
Initial values needed$x_0$ (one)$x_0, x_1$ (two)
DerivativeRequiredNot required
Order of convergence2$\varphi \approx 1.618$
Function evaluations per iteration2 ($f, f'$)1 ($f$)
Efficiency index$2^{1/2}\approx 1.414$$\varphi \approx 1.618$
Convergence guaranteeLocalLocal
0 −4 −8 −12 −16 function evaluations log₁₀|error| 2 4 6 8 10 Newton's method Secant method
Figure 2. Accuracy per function evaluation (measured convergence for $f(x)=x^2-2$, root $\sqrt{2}$). Newton's method runs from $x_0=2$ with two function evaluations per iteration ($f$ and $f'$); the secant method runs from $x_0=1,\ x_1=2$ with one per iteration. Newton leads early, the two are level around 6 evaluations, and the secant method overtakes afterwards — because the efficiency index (secant $\varphi \approx 1.618$ > Newton $2^{1/2} \approx 1.414$) dominates asymptotically.

"Per iteration" and "per evaluation" are different

  • Per iteration, since the order satisfies $2 > \varphi$, Newton's method is always faster; the secant method never beats it in iteration count. Note that the horizontal axis of Figure 2 is "function evaluations", not iterations.
  • The crossover in Figure 2 reflects efficiency per function evaluation. The efficiency-index comparison ($\varphi \approx 1.618 > 2^{1/2} \approx 1.414$) assumes the cost of evaluating $f'$ is comparable to that of $f$.
  • In practice the conclusion depends on that assumption. Let the cost of $f$ be $1$ and the cost of $f'$ be $c$; then the efficiency index is Newton $=2^{1/(1+c)}$ and secant $=\varphi$, with the break-even at $c \approx 0.44$. When $f'$ is unavailable or expensive to compute ($c \gtrsim 0.44$), the secant method wins (this is its main purpose). Conversely, when $f'$ is cheaper than $f$ ($c \lesssim 0.44$, e.g. obtained via automatic differentiation or as a byproduct of $f$), Newton's method wins.
  • The crossover evaluation count (about 6 here) and the early ordering depend on the function, the initial values, and constants, and vary from case to case.

5. Method of False Position (Regula Falsi)

The method of false position (Regula Falsi) combines the secant method with the bisection method. It uses the same iteration formula as the secant method but always maintains $f(a_n)\cdot f(b_n) < 0$.

Method of false position

For an interval $[a_n, b_n]$ satisfying $f(a_n)\cdot f(b_n) < 0$, compute

$$c_n = a_n - f(a_n)\,\dfrac{b_n - a_n}{f(b_n) - f(a_n)}$$

and set $b_{n+1}=c_n$ if $f(a_n)\cdot f(c_n) < 0$, otherwise $a_{n+1}=c_n$.

Convergence is guaranteed, but one endpoint tends to stay fixed, which can degrade convergence to linear. Improved variants include the Illinois algorithm and the Pegasus method.

Secant method vs. Regula Falsi (same formula, different point choice)

Both take the next approximation from the same intercept formula $c = \dfrac{a\,f(b)-b\,f(a)}{f(b)-f(a)}$. The only difference is which two points are kept for the next iteration.

  • Secant method: always uses the two most recent points (the oldest is dropped unconditionally). It has no bracketing guarantee and may diverge, but it uses the freshest information and is fast (order $\varphi \approx 1.618$).
  • Regula Falsi: keeps the two points of opposite sign (the bracketing pair), replacing the same-sign endpoint with $c$. It therefore always brackets the root and convergence is guaranteed, but one endpoint can stay fixed forever (stagnation).

For the same $f(x)=x^3-x-2$ with seeds $1, 2$, the first step is identical ($c=1.333$). But the secant method then happily uses the same-sign pair $(1.333,\,1.463)$ at step 3 and races to the root $1.5214$ as $1.531 \to \cdots$, whereas Regula Falsi must keep $b=2$ to bracket the root, so only $a$ creeps up slowly (stagnation).

6. FAQ

Q1. What is the secant method?

An iterative method that takes the intersection of the $x$-axis with the secant through the two most recent approximations as the next approximation. It needs no derivative and can be interpreted as a difference-quotient approximation.

Q2. What is its order of convergence?

The golden ratio $\varphi = (1+\sqrt{5})/2 \approx 1.618$; it converges superlinearly. In efficiency per function evaluation it exceeds Newton's method.

Q3. How does it differ from the method of false position?

The method of false position is a bracketing method that maintains $f(a)f(b)<0$, so convergence is guaranteed. The secant method simply uses the two most recent points, so it has no convergence guarantee, but it is generally faster.

7. References

  • Wikipedia, "Secant method"
  • Wikipedia, "Regula falsi"
  • R. L. Burden & J. D. Faires, Numerical Analysis, 10th ed., Cengage, 2016.
  • J. F. Traub, Iterative Methods for the Solution of Equations, Chelsea, 1982.

Implementation in sangi

The algorithm in this article is available as sangi's secant_method.