Skip to content
CoreSource checked

Secant Method

Finds roots using a line through two recent estimates.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Intermediate
Family
Root Finding
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
5
Code example
Not ready
Visualization
Ready

Overview

The Secant Method approximates the derivative with two function values and uses that line to choose the next root estimate.

Core Concepts

numeric approximationroot estimateiterative updateroot findingconvergence checkerror control

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(1)

Average

O(t)

Worst

O(t)

Space

O(1)

When to Use

  • Use Secant Method when you need to use two recent points.
  • Use it for root finding without derivatives with inputs like function.
  • Use it when an approximate numeric result is acceptable and the input assumptions are satisfied.
  • Use it when the Root Finding tradeoff is acceptable for the problem size.

When Not to Use

  • Avoid it when rounding error, ill-conditioning, or convergence failure would hide the real answer.
  • Avoid it when the required output is not approximate root.

What It Does

  • Uses two recent points
  • Updates the estimate from their secant line

Use Cases

  • Root finding without derivatives
  • Numerical equation solving
  • Engineering calculators

Inputs

  • Function
  • Two initial estimates

Outputs

  • Approximate root

Key Formulas (1)

Secant update

xnext = x1 − f(x1) · (x1 − x0) / (f(x1) − f(x0))
x_next = x1 - f(x1) * (x1 - x0) / (f(x1) - f(x0))

Approximates Newton's Method without directly computing a derivative.

Pseudocode

  1. 1.Start with two estimates
  2. 2.Evaluate the function at both
  3. 3.Draw the secant line
  4. 4.Use its x-intercept as the next estimate
  5. 5.Repeat until the estimate stabilizes

Canonical Example

Input
equation = x^2 - 9 = 0 or matrix system Ax = b
Output
approximate numeric solution
Explanation
Secant Method: The method iteratively or algebraically approximates the requested mathematical result.

Implementation Notes

  • Keep the input contract explicit: Function; Two initial estimates.
  • Use this step as the implementation spine: Start with two estimates.
  • Then preserve the next state change: Evaluate the function at both.
  • Use small examples with known answers to verify the numeric update before scaling up.

Common Pitfalls

  • The Secant Method can be faster than Bisection but is less guaranteed.
  • Stopping based only on iteration count instead of checking residual, tolerance, or error.
  • Returning approximate root without handling empty, invalid, or boundary inputs.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show a line through two points predicting the next root estimate.

Secant Method mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Start with two estimates
secant-line-root

Notes

Secant Method operates in O(t) time and O(1) space within the Root Finding family. Key governing relation: x_next = x1 - f(x1) * (x1 - x0) / (f(x1) - f(x0)). Often compared with Newton's Method and Bisection Method.

Sources (1)

What each reference supports for this entry.

Numerical Recipes

Book

Reference text and implementation-oriented treatment for root finding, interpolation, integration, and ODE methods.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toBisection Method

Secant uses a slope estimate instead of interval halving.

ApproximatesNewton's Method

Secant approximates Newton's derivative with finite differences.

Tags

Numerical MethodsRoot FindingIterative