Secant Method
Move two initial guesses and step through the secant intercept, comparing convergence with denominator failure and unbracketed iterates.
By Riano · Published · Updated · Report a correction
Secant Method
Concept Overview
The secant method replaces the analytical derivative used in Newton’s method with a finite difference approximation based on the two most recent iterates. This eliminates the need to compute derivatives while retaining superlinear convergence under right conditions. However, unlike the bisection method, the iterates are not guaranteed to bracket the root.
Mathematical Definition
Starting with two initial guesses x0 and x1, the secant line passing through (x0, f(x0)) and (x1, f(x1)) is constructed. Setting its height to zero yields the next iterate x2, provided the function values are distinct.
The secant method requires two initial values. The amber segment visualizes the most recent secant update. Unlike Newton’s method, which uses a tangent line at a single point, this approach connects two existing points on the curve. Vertical guides point to the new estimate, which is evaluated and pushed to the iteration ledger.
Worked Example
For a sufficiently smooth function near a simple root, well-chosen starting guesses give local convergence of order (1 + √5) / 2, approximately 1.618. This is a local result, not a guarantee for arbitrary guesses. Solve f(x) = x2 − 2 as follows.
- Start with x0 = 1 and x1 = 2. The function evaluates to f(1) = −1 and f(2) = 2.
- Calculate the first secant update: x2 = 2 − (2)(2 − 1) / (2 − (−1)) = 4/3. Note f(4/3) = −2/9.
- Calculate the second update with x1 = 2 and x2 = 4/3: x3 = 4/3 − (−2/9)(4/3 − 2) / (−2/9 − 2) = 1.4.
Experiment
You can trace the geometry of the method interactively in the Secant Method visualization:
- Set the Function to
x^2 - 2and the Initial guesses to1and2. - Adjust the Iteration budget slider to exactly 1. Observe the first amber secant line intersecting the horizontal axis around 1.33.
- Step the Iteration budget slider to 2. The updated secant line connects (4/3, -2/9) to (2, 2) giving a clearer intersection precisely at 1.4.
Limitations
The secant method has several notable limitations that cause convergence failures, unbracketed iterates, or divisions by zero during practical use cases:
- Denominator failure: If the function values at two consecutive iterates are equal (f(xn) = f(xn-1)), the secant line becomes horizontal, and the denominator in the update formula becomes zero. The interactive visualization raises a denominator warning in such cases (for instance, starting with x0 = −1 and x1 = 1 for x2 − 2).
- Unbracketed iterates: Unlike the bisection method, the secant method does not ensure the root is enclosed within an interval. Iterates might bounce arbitrarily or diverge entirely if the initial guesses are poorly chosen.
- Repeated roots and flat regions: The run stops before another division when consecutive guesses differ by at most 1e-12 or the residual is at most 1e-10. A residual stop is approximate, not an exact-root certificate. Proposed iterates outside magnitude 1e6 are refused; plotted iterates are limited to |x| ≤ 12 and remain available in the ledger.
References
The mathematical background and convergence behavior parameters were obtained from formal analysis documented in the NIST Digital Library of Mathematical Functions, Section 3.8(iii).
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Secant Method module.
Try Secant Method on Riano →