Secant Method Calculator (Order phi = 1.618)

Secant method calculator for roots: superlinear convergence order phi=1.618, x_{n+1} = x_n - f(x_n)(x_n-x_{n-1})/(f(x_n)-f(x_{n-1})), no derivative needed.

Calculation parameters
Was this calculator useful?

Secant method

The secant method is an iterative algorithm for finding roots of equations f(x) = 0. Unlike Newton, it does not require the derivative: it approximates f'(x_n) using the slope of the secant between (x_{n-1}, f(x_{n-1})) and (x_n, f(x_n)). Formula: x_{n+1} = x_n - f(x_n) (x_n - x_{n-1}) / (f(x_n) - f(x_{n-1})).

Geometric idea

Given two initial points x_0, x_1, draw the secant line through (x_0, f(x_0)) and (x_1, f(x_1)). Intersection with x-axis is next iterate x_2. Repeat with x_1, x_2 to get x_3, and so on. Secant converges to root by approximating tangent more closely.

Superlinear convergence

The method has convergence order phi = (1 + sqrt(5))/2 ~ 1.618 (golden ratio). Error: |e_{n+1}| ~ C |e_n|^phi. Slower than Newton (order 2) but faster than bisection (order 1). Error sequence follows Fibonacci pattern: each error is product of previous by logarithm of previous.

Iteration formula

x_{n+1} = x_n - f(x_n) * (x_n - x_{n-1}) / (f(x_n) - f(x_{n-1})). Can be rewritten as: x_{n+1} = (x_{n-1} f(x_n) - x_n f(x_{n-1})) / (f(x_n) - f(x_{n-1})), more numerically stable to avoid cancellation.

Advantages over Newton

  • No derivative needed: useful when f' is expensive or non-analytic.
  • Cost per iteration: 1 evaluation of f (Newton needs 2: f and f').
  • Practical efficiency: phi ~ 1.618 per iteration, but 2 secant iterations = 1 Newton in cost. Efficiency per cost: phi^2 ~ 2.618 vs 2.0 of Newton -> SECANT MORE EFFICIENT when f' is expensive.
  • Simpler implementation (no derivative computation).

Disadvantages

  • Convergence not guaranteed: if iterates jump far, divergence.
  • Numerical cancellation: f(x_n) - f(x_{n-1}) can be small near root.
  • Requires TWO initial points (not one like Newton).
  • May not converge if both initial points are on same side of root.

Numerical comparison Newton vs secant

For f(x) = x^2 - 2 (sqrt(2) ~ 1.41421356) with x0=1, x1=2:

  • Iter 2: x_2 = 1.4 (error 1.4e-2)
  • Iter 3: x_3 = 1.41429... (error 7.7e-5)
  • Iter 4: x_4 = 1.41421... (error 4.3e-7)
  • Iter 5: x_5 = 1.4142135623... (error 1.5e-11)
  • Iter 6: x_6 ~ machine epsilon (16 digits)

Newton from same start converges in 4 iterations with double speed but double cost per iter (needs derivative).

When to use secant

  • Analytic derivative not available or expensive.
  • Black-box functions (f returned by API calls or simulations).
  • Hardware implementations with high derivative cost.
  • Simple compromise between robustness and speed.
  • Combined with bisection (Brent) to guarantee convergence.

History

Secant method is ancient: present in Babylonian tables for root extraction. Fibonacci (1202) used it in Liber Abaci for approximate roots. Newton-Raphson (1690) added f'(x). Vincent (1818) and Cauchy (1829) studied convergence. Order = phi rigorously proven in XX century (Ostrowski 1973).

Variant: regula falsi

If two initial points have opposite signs, regula falsi (false position) guarantees maintained sign change: x_{n+1} = (x_n f(x_{n-1}) - x_{n-1} f(x_n)) / (f(x_{n-1}) - f(x_n)). Linear convergence only but robust. Illinois and Anderson-Bjorck variants improve order to ~ 1.618 maintaining robustness.

Why the order of convergence is the golden ratio

The most elegant feature of the secant method is that its order of convergence equals exactly the golden ratio phi = (1+sqrt5)/2 ~ 1.618. The proof starts from the error relation: near a simple root, the error at the next step is proportional to the product of the two previous errors, e_{n+1} ~ (f''/2f') e_n e_{n-1}. Seeking a law of the form e_{n+1} ~ C e_n^p, substituting gives the equation p^2 = p + 1, whose positive root is precisely phi.

This places the secant between bisection (order 1, linear) and Newton (order 2, quadratic): each iteration multiplies the number of correct digits by about 1.618. Since the secant uses a single function evaluation per step while Newton needs two (function and derivative), its efficiency per computational cost, measured as order raised to 1/number-of-evaluations, is phi ~ 1.618 against sqrt2 ~ 1.414 for Newton: the secant is often more efficient when the derivative is costly to compute.

Improved regula falsi: Illinois, Pegasus and Brent

Classical regula falsi always keeps the root bracketed between two points of opposite sign, guaranteeing convergence, but suffers from a flaw: often one of the two endpoints stays stuck, slowing convergence to linear. The Illinois, Pegasus and Anderson-Bjorck variants correct this behaviour by halving or rescaling the function value at the stagnant endpoint, restoring superlinear speed without losing the guarantee of bracketing the root.

The pinnacle of this family is Brent's method, considered the gold standard for one-dimensional root-finding: it combines the safety of bisection with the speed of secant and inverse-quadratic interpolation, choosing at each step the most promising method in a safe way. It is the algorithm behind the root-finding functions of most scientific libraries, because it unites guaranteed global robustness with the fast convergence typical of open methods.

Updated July 2026

Frequently Asked Questions

What is the secant method?

It is an iterative method for finding the roots of f(x)=0 that approximates the derivative with the difference quotient between two points. The formula x_{n+1} = x_n - f(x_n)(x_n - x_{n-1})/(f(x_n) - f(x_{n-1})) uses only function values, with no need for the analytic derivative.

Why are two initial points needed?

Because the secant constructs the line through two points (x_{n-1}, f(x_{n-1})) and (x_n, f(x_n)) and seeks its intersection with the x-axis. Two distinct estimates are therefore needed to define the first line; from there each new point replaces the oldest.

What is superlinear convergence?

It is a speed between linear and quadratic: the error decreases faster than a geometric progression but slower than the square. For the secant the order is exactly the golden ratio phi ~ 1.618, meaning the correct digits multiply by about 1.618 at each iteration.

What is the difference from Newton's method?

Newton uses the analytic derivative f'(x) and converges quadratically (order 2), but requires two evaluations per step. The secant approximates the derivative with two points, converges a bit more slowly (order 1.618) but uses a single evaluation: it is preferable when the derivative is hard or costly.

When can the secant fail?

It fails if the two function values become equal (horizontal secant, division by zero), if the initial points are too far from the root (divergence) or if the iteration oscillates. Unlike bisection it does not guarantee bracketing the root, so it has no guaranteed global convergence.

What is regula falsi?

It is a variant of the secant that always keeps the root bracketed between two points of opposite sign, guaranteeing convergence. It replaces only the endpoint that keeps the same sign as the new point. It is safer but can slow to linear convergence if one endpoint stays stuck.

When is the secant worthwhile?

When the function is known but its derivative is complicated, unavailable in closed form or costly to evaluate. In these cases the secant offers nearly Newton's speed without computing the derivative, often being the most efficient compromise in terms of computational cost.

Is there a method combining safety and speed?

Yes: Brent's method combines bisection, secant and inverse-quadratic interpolation, guaranteeing bisection's global convergence with the speed of open methods. It is the standard used by scientific libraries for one-dimensional root-finding.

Comments (0)

No comments yet. Be the first!