Mathematics / Free calculator

Secant root finder

Use two starting guesses to approximate a real root with the secant method.

01 Your inputs

Use x, + − * / ^, sin, cos, exp, ln, sqrt. Angles are in radians. Use explicit multiplication for clarity.

Entered function
f(x)=x2−2

1e-14 to 0.1. Arrows adjust by a factor of 10; you can also type any value in range. A residual tolerance is not a guaranteed bound on root error.

1–80 whole iterations.

Calculated on your device. Inputs are not transmitted or stored.

02 Your result

Enter your values and select Calculate.

The method

xn+1=xn−f(xn)(xn−xn−1)f(xn)−f(xn−1)

A worked example

For f(x) = x² − 2 and guesses 1 and 2, the secant iterates converge to √2 ≈ 1.4142135624.

Assumptions & limits

Real scalar functions with the restricted expression parser. Tolerances are absolute. Stopping by residual does not guarantee a small root error for flat or poorly conditioned functions. Discontinuities, poles, and convergence failures require independent review. Starting guesses must differ. Nearly equal function values stop iteration to prevent division by a tiny denominator. The iterates do not maintain a root bracket. Full double precision between operations; displayed values use up to 10 decimal places. Numerical outputs above 10¹⁰⁰ and nonfinite function evaluations are rejected.

Calculation source: Math Workbench: secant method.

Explore Math Workbench ↗