#math/numerical #flashcards/math
The `secant method` is an iterative numerical method for approximating%%::%% a [[Function Root|root]] of a function. Given $f(x_1),f(x_2)$ find the x-intercept.
<!--SR:!fsrs,2026-12-23T05:14:56.637Z,31,76.044402,5.71537734,2,5,0,0,2026-11-22T05:14:56.637Z-->
For $n\geq 1$, repeat
$
x_{n+1}
=x_n-f(x_n)\frac{x_n-x_{n-1}}{f(x_n)-f(x_{n-1})}
=\frac{x_{n-1}f(x_n)-x_nf(x_{n-1})}{f(x_n)-f(x_{n-1})}.
$
Each iteration uses the two most recent approximations, $x_{n-1}$ and $x_n$. Continue until the step size $|x_{n+1}-x_n|$ or residual $|f(x_{n+1})|$ is below a chosen tolerance.
The formula comes from constructing the line through the two points and setting its $y$-coordinate equal to zero. It requires $f(x_n)\neq f(x_{n-1})$, and convergence is not guaranteed for arbitrary starting values.
I used this method on a former App Ads bidding team where $f(x_{n})$ was an error function; see [[Root Finder Bidding Algorithm]].