Brent's method
/ BRENT /
If you want a single, dependable root-finder for a function of one variable — the one to reach for when you do not want to think hard — Brent's method is the standard answer. It is the hybrid that gives you bisection's ironclad guarantee of convergence AND the fast local speed of the secant and interpolation methods, automatically switching between them so you never have to choose.
Brent's method keeps a bracket [a, b] around the root at all times (so it can never diverge), and at each step it tries a fast move: inverse quadratic interpolation (fit a sideways parabola through the last three points and read off where it hits zero) or, failing that, a secant step. It then checks whether the proposed point is reasonable — inside the bracket, and making the interval shrink fast enough. If the fast step looks unreliable or the interval is not shrinking, it falls back to a plain bisection step, which is slow but guaranteed. This bookkeeping (due to Dekker and refined by Richard Brent in 1973) means Brent's method converges superlinearly on well-behaved functions yet never does worse than bisection in the worst case.
Brent's method is what sits behind the default root finders in scientific libraries (it is the workhorse of routines named 'brentq' or 'fzero' in numerical software), because it needs no derivative, requires only a starting bracket with a sign change, and is robust on the kinds of messy functions real problems produce. The price of admission is the bracket: you must supply a, b with opposite-sign function values to begin, and like all bracketing methods it finds one root inside, not all roots. For multidimensional systems you need Newton or quasi-Newton methods instead — Brent is a one-dimensional specialist.
In practice you call something like brentq(f, a, b): given f(x) = x^3 - x - 1 and a bracket [1, 2] with a sign change, Brent's method returns 1.324717957... in a handful of steps. Internally it mostly uses fast inverse-quadratic steps but quietly drops to bisection on any iteration where the fast step would leave the bracket or fail to shrink it.
Bisection's safety plus interpolation's speed — the default 1-D solver.
Brent still needs a valid sign-change bracket to start and finds only ONE root inside it. It is a one-dimensional method; for nonlinear SYSTEMS you must use Newton or Broyden, not Brent.