Newton's method needs the derivative $f'$, which may be costly or unavailable. The secant method replaces the tangent with the line through the two most recent points: $$x_{n+1} = x_n - f(x_n)\frac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}.$$
Key idea
Why it works
Worked example: Secant steps for √2
- $f(1) = -1$, $f(2) = 2$: $x_2 = 2 - 2 \cdot \frac{2 - 1}{2 - (-1)} = \frac{4}{3} \approx 1.3333$.
- $f(\frac{4}{3}) = -\frac{2}{9}$. Use $x_1 = 2$ and $x_2 = \frac{4}{3}$: $x_3 = \frac{4}{3} - \left(-\frac{2}{9}\right)\frac{4/3 - 2}{-2/9 - 2} = \frac{7}{5} = 1.4$.
- Then $x_4 \approx 1.414634$ and $x_5 \approx 1.4142114$: errors $1.4 \times 10^{-2}$, $4.2 \times 10^{-4}$, $2.1 \times 10^{-6}$, the exponent growing by a factor of about 1.6 each step.
Answer: $x_3 = 1.4$, $x_5 \approx 1.4142114$
Worked example: Keeping a bracket is a different method
- Both get $x_2 = \frac{4}{3}$ and $x_3 = 1.4$.
- Regula falsi keeps $2$ (where $f > 0$) as one end forever: $x_4 \approx 1.41176$, $x_5 \approx 1.41379$, errors $2.4 \times 10^{-3}$ and $4.2 \times 10^{-4}$.
- The secant method reached $2.1 \times 10^{-6}$ at $x_5$. Keeping the bracket is safer but only linear here.
Answer: the secant method is much faster here
In practice the secant method is a good choice when $f'$ is expensive or unknown and a reasonable starting pair is available. Stop when $|x_{n+1} - x_n|$ is below your tolerance. Watch for $f(x_n) = f(x_{n-1})$: then the secant line is flat and the formula divides by zero, just as Newton's method fails when $f'(x_n) = 0$.
Common mistake