Root finding · Definition

Secant method

numerical methodsroot finding

It arises as an alternative to Newton-Raphson when evaluating \(f'(x)\) is costly or impossible. It replaces the derivative with a slope taken from the secant line.

Definition

The secant method is an iterative procedure for approximating roots of a function \(f(x)=0\) using two previous approximations, without needing to compute the derivative.

\[x_{n+1}=x_n-f(x_n)\frac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})}\]

The iteration uses the line through \((x_{n-1}, f(x_{n-1}))\) and \((x_n, f(x_n))\), whose intersection with the x-axis defines \(x_{n+1}\). Its order of convergence is approximately \(\frac{1+\sqrt{5}}{2}\approx 1.618\), superlinear but below Newton's order 2. It requires two starting values close to the root.

For \(f(x)=x^2-2\) with \(x_0=1\) and \(x_1=2\), the first iteration gives \(x_2=2-f(2)\frac{2-1}{f(2)-f(1)}=2-2\cdot\frac{1}{3}=\frac{4}{3}\). Subsequent iterations rapidly converge to \(\sqrt{2}\).

A typical mistake is choosing two starting points where \(f\) has the same sign without checking for a sign change, which may make the iteration diverge or converge to an unwanted root. Also, if \(f(x_n)=f(x_{n-1})\) the quotient is undefined.

Think about it

Why can the secant method fail if the two starting points are far from the root?

The secant line may point elsewhere, so its x-axis intersection moves away from the root and the iteration may diverge or reach another root.

Exercises 10

References

  • Richard L. Burden, J. Douglas Faires, Annette M. Burden, Numerical Analysis, 10th edition, Cengage Learning, 2016.
  • Lloyd N. Trefethen, David Bau III, Numerical Linear Algebra, 1st edition, SIAM, 1997.