You are on page 1of 2

Brents Method

Brents method for approximately solving f (x) = 0, where f : R R, is a hybrid method


that combines aspects of the bisection and secant methods with some additional features that
make it completely robust and usually very efficient. Like bisection, it is an enclosure method
that begins with an initial interval across which f changes sign and, as the iterations proceed,
determines a sequence of nested intervals that share this property and decrease in length. Con-
vergence of the iterates is guaranteed, even in floating-point arithmetic. If f is continuous on
the initial interval, then each of the decreasing intervals determined by the method contains a
solution, and the limit of the iterates is a solution. Like the bisection and secant methods, the
method requires only one evaluation of f at each iteration; in particular, f is not required.
The following provides a rough outline of how the method works. The full details of the
method are complicated and can be found in R. P. Brent, Algorithms for Minimization without
Derivatives, PrenticeHall, 1973. The method builds upon an earlier method of T. J. Dekker
and is the basis of MATLABs fzero routine.
At each iteration, Brents method first tries a step of the secant method or something better. If
this step is unsatisfactory, which usually means too long, too short, or too close to an endpoint
of the current interval, then the step reverts to a bisection step. There is also a feature that
occasionally forces a bisection step to guard against too little progress for too many iterations.
In the details of the method, a great deal of attention has been paid to considerations of
floating-point arithmetic (overflow and underflow, accuracy of computed expressions, etc.).
An overview of the operation of the method is as follows:
The method begins with
a stopping tolerance > 0,
points a and b such that f (a)f (b) < 0.
If necessary, a and b are exchanged so that |f (b)| |f (a)|; thus b is regarded as the
better approximate solution. A third point c is initialized by setting c = a.
At each iteration, the method maintains a, b, and c such that b 6= c and
(i) f (b)f (c) < 0, so that a solution lies between b and c if f is continuous;
(ii) |f (b)| |f (c)|, so that b can be regarded as the current approximate solution;
(iii) either a is distinct from b and c, or a = c and is the immediate past value of b.

Each iteration proceeds as follows:


1. If |b c| , then the method returns b as the approximate solution.
2. Otherwise, the method determines a trial point b as follows:

1
af (b)bf (a)
(i) If a = c, then b is determined by linear (secant) interpolation: b = f (b)f (a) .

(ii) Otherwise, a, b, and c are distinct, and b is determined using inverse quadratic
interpolation:
Determine , , and such that p(y) = y 2 + y + satisfies p(f (a)) = a,
p(f (b)) = b, and p(f (c)) = c.
Set b = .
3. If necessary, b is adjusted or replaced with the bisection point. (The rules are complicated.)
4. Once b has been finalized, a, b, c, and b are used to determine new values of a, b, and c.
(The rules are complicated.)

Remark: In part (ii) of step 2, the coefficients , , and (especially) are easily determined
using standard methods at the cost of a few arithmetic operations. (Of course, there needs to
be a safeguard against the unlikely event that f (a), f (b), and f (c) are not distinct.) Note that
is just p(0), so if f really were the inverse of a quadratic, i.e., f 1 (y) = p(y) = y 2 + y +
for all y, then b = would satisfy f (b) = f (p(0)) = f (f 1 (0)) = 0. Thus inverse quadratic
interpolation provides a low-cost approximate zero of f that should be more accurate than that
obtained by linear (secant) interpolation. Note that if direct quadratic interpolation were used
instead of inverse quadratic interpolation, i.e., if we found p(x) = x2 + x + such that
p(a) = f (a), p(b) = f (b), and p(c) = f (c), then it would be necessary to find a b such that
p(b) = 0 using the quadratic formula, which involves a square root. By using inverse quadratic
interpolation, Brents method avoids this square root.

You might also like