Mathwords logoMathwords

Secant Method — Definition, Formula & Examples

The secant method is a numerical technique for finding roots of an equation f(x)=0f(x) = 0 by repeatedly drawing secant lines through two recent approximations and using the x-intercept as the next guess.

Given two initial approximations x0x_0 and x1x_1, the secant method generates a sequence {xn}\{x_n\} defined by the recurrence xn+1=xnf(xn)xnxn1f(xn)f(xn1)x_{n+1} = x_n - f(x_n)\dfrac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}, which converges to a root of ff under suitable conditions. It can be viewed as a finite-difference approximation to Newton's method, replacing the derivative f(xn)f'(x_n) with the slope of the secant line through (xn1,f(xn1))(x_{n-1}, f(x_{n-1})) and (xn,f(xn))(x_n, f(x_n)).

Key Formula

xn+1=xnf(xn)xnxn1f(xn)f(xn1)x_{n+1} = x_n - f(x_n)\,\frac{x_n - x_{n-1}}{f(x_n) - f(x_{n-1})}
Where:
  • xnx_n = Current approximation to the root
  • xn1x_{n-1} = Previous approximation to the root
  • f(xn)f(x_n) = Value of the function at the current approximation
  • f(xn1)f(x_{n-1}) = Value of the function at the previous approximation

How It Works

Start with two initial guesses x0x_0 and x1x_1 near the root. Evaluate ff at both points and compute the slope of the secant line connecting them. Find where this secant line crosses the x-axis — that x-intercept becomes your next approximation x2x_2. Then repeat the process using x1x_1 and x2x_2, and so on. Stop when xn+1xn|x_{n+1} - x_n| or f(xn+1)|f(x_{n+1})| is smaller than your chosen tolerance. Unlike Newton's method, you never need to compute or know the derivative of ff.

Worked Example

Problem: Use the secant method with x0=2x_0 = 2 and x1=3x_1 = 3 to find one iteration toward a root of f(x)=x25f(x) = x^2 - 5.
Evaluate f at both points: Compute f(x0)f(x_0) and f(x1)f(x_1).
f(2)=45=1,f(3)=95=4f(2) = 4 - 5 = -1, \quad f(3) = 9 - 5 = 4
Apply the secant formula: Substitute into the recurrence relation to find x2x_2.
x2=34324(1)=3415=30.8=2.2x_2 = 3 - 4 \cdot \frac{3 - 2}{4 - (-1)} = 3 - 4 \cdot \frac{1}{5} = 3 - 0.8 = 2.2
Check the result: Evaluate ff at the new approximation.
f(2.2)=4.845=0.16f(2.2) = 4.84 - 5 = -0.16
Answer: After one iteration, x2=2.2x_2 = 2.2 with f(2.2)=0.16f(2.2) = -0.16, which is much closer to the true root 52.2361\sqrt{5} \approx 2.2361 than either starting guess.

Why It Matters

The secant method is widely used in engineering and scientific computing when a derivative is expensive or impossible to compute analytically. It converges faster than the bisection method (its order of convergence is approximately 1.618) while avoiding the derivative calculations that Newton's method requires. Courses in numerical analysis and computational mathematics treat it as a standard tool for nonlinear equation solving.

Common Mistakes

Mistake: Choosing two initial guesses where f(x0)f(x1)f(x_0) \approx f(x_1), which causes division by a near-zero denominator.
Correction: Pick starting values that give noticeably different function values so the secant line has a well-defined, non-extreme slope.