Skip to content

Algorithms for solving f(x) = 0

Question

For a differentiable function ff, describe numerical algorithms for finding a root of f(x)=0f(x)=0.

Short answer

Bisection, Newton-Raphson and the secant method. Bisection halves a sign-change bracket [a,b][a,b] each step: guaranteed but only linear convergence. Newton uses xn+1=xn−f(xn)/f′(xn)x_{n+1}=x_n-f(x_n)/f'(x_n), converging quadratically near a simple root but may diverge from a poor start. The secant method replaces f′f' by a finite difference of the last two iterates (order about 1.621.62); hybrids such as Brent's method combine safety and speed.

Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 3.4 Important Calculus Methods, 'Newton's method B', p.44; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question