Root finding · Definition
Secant method
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.
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
- Which method replaces Newton-Raphson's derivative with a difference quotient?
- How many starting values does the secant method need?
- What geometric object defines the secant step?
- What happens if \(f(x_n)=f(x_{n-1})\) in the formula?
- Approximately what order of convergence does the secant method have?
- With \(f(x)=x^2-4\), \(x_0=1\) and \(x_1=3\), what is \(x_2\) under the secant method?
- If \(f(x)=x^3-x-2\) with \(x_0=1\) and \(x_1=2\), what is \(f(x_1)-f(x_0)\)?
- For \(f(x)=x^2-2\) with \(x_0=1\) and \(x_1=2\), what is \(x_2\)?
- Which initial condition should be checked before iterating with the secant method?
- For \(f(x)=x^2-3\) with \(x_0=1\) and \(x_1=2\), compute \(x_2\) and \(x_3\) with the secant method, and check whether the result is closer to \(\sqrt{3}\) than \(x_1\).
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.