Module

for

Brent's Method

       

Background

    We start by reviewing the secant method and then extend it to the inverse quadratic interpolation method.  Mueller's proposed a method using successive bisection and inverse quadratic interpolation which was extended by Brent's and others.  It uses a combination of the bisection, regula falsi, and inverse quadratic interpolation methods.

 

Theorem (Secant Method).  Assume that [Graphics:Images/BrentMethodMod_gr_1.gif] and there exists a number [Graphics:Images/BrentMethodMod_gr_2.gif], where [Graphics:Images/BrentMethodMod_gr_3.gif].  If   [Graphics:Images/BrentMethodMod_gr_4.gif], then there exists a [Graphics:Images/BrentMethodMod_gr_5.gif] such that the sequence [Graphics:Images/BrentMethodMod_gr_6.gif] defined by the iteration  

    [Graphics:Images/BrentMethodMod_gr_7.gif]   

    [Graphics:Images/BrentMethodMod_gr_8.gif]    

for  [Graphics:Images/BrentMethodMod_gr_9.gif]  will converge to [Graphics:Images/BrentMethodMod_gr_10.gif] for certain initial approximations  [Graphics:Images/BrentMethodMod_gr_11.gif].  

Proof  Brent's Method  

 

Algorithm (Secant Method).  Find a root of  [Graphics:Images/BrentMethodMod_gr_12.gif]  given two initial approximations  [Graphics:Images/BrentMethodMod_gr_13.gif]  using the iteration  

    [Graphics:Images/BrentMethodMod_gr_14.gif]   for    [Graphics:Images/BrentMethodMod_gr_15.gif].

Computer Programs Secant Method  

Mathematica Subroutine (Secant Method).

[Graphics:Images/BrentMethodMod_gr_16.gif]

Example 1.  Use the secant method to find the three roots of the cubic polynomial  [Graphics:Images/BrentMethodMod_gr_17.gif].  
Show details of the computations for the starting value  [Graphics:Images/BrentMethodMod_gr_18.gif].

Solution 1.

 

Theorem (Inverse Quadratic Method).  Assume that [Graphics:Images/BrentMethodMod_gr_68.gif] and there exists a number [Graphics:Images/BrentMethodMod_gr_69.gif], where [Graphics:Images/BrentMethodMod_gr_70.gif].  If [Graphics:Images/BrentMethodMod_gr_71.gif], then there exists a [Graphics:Images/BrentMethodMod_gr_72.gif] such that the sequence [Graphics:Images/BrentMethodMod_gr_73.gif] defined by the iteration  

    [Graphics:Images/BrentMethodMod_gr_74.gif]
      
    [Graphics:Images/BrentMethodMod_gr_75.gif]  

for  [Graphics:Images/BrentMethodMod_gr_76.gif]  will converge to [Graphics:Images/BrentMethodMod_gr_77.gif] for certain initial approximations  [Graphics:Images/BrentMethodMod_gr_78.gif].  

Proof  Brent's Method  

 

Algorithm (Inverse Quadratic Method).  Find a root of  [Graphics:Images/BrentMethodMod_gr_79.gif]  given three initial approximations  [Graphics:Images/BrentMethodMod_gr_80.gif]  using the iteration  

    [Graphics:Images/BrentMethodMod_gr_81.gif]   

for    [Graphics:Images/BrentMethodMod_gr_82.gif].

Mathematica Subroutine (Inverse Quadratic Method).

[Graphics:Images/BrentMethodMod_gr_83.gif]

    The computation of  [Graphics:Images/BrentMethodMod_gr_84.gif]  is seen to require 12 function evaluations (because [Graphics:Images/BrentMethodMod_gr_85.gif] occurs 13 times).  This number can be reduced to 3 function evaluations per iteration by using the following "algebraic trick."   

Algorithm (Inverse Quadratic Method).  Find a root of  [Graphics:Images/BrentMethodMod_gr_86.gif]  given three initial approximations  [Graphics:Images/BrentMethodMod_gr_87.gif]  iteration.  When the code in the above subroutine is executed the computation of  [Graphics:Images/BrentMethodMod_gr_88.gif]  is seen to require 13 function evaluations.   (because [Graphics:Images/BrentMethodMod_gr_89.gif] occurs 13 times).  The number of function evaluations can by using the following scheme.  

    [Graphics:Images/BrentMethodMod_gr_90.gif]  
    
    for    [Graphics:Images/BrentMethodMod_gr_91.gif].

Mathematica Subroutine (Inverse Quadratic Method).  Efficient version that uses only 3 function evaluations per iteration.

[Graphics:Images/BrentMethodMod_gr_92.gif]

Example 2.  Use the inverse quadratic method to find the three roots of the cubic polynomial  [Graphics:Images/BrentMethodMod_gr_93.gif].  
Show details of the computations for the starting value  [Graphics:Images/BrentMethodMod_gr_94.gif].

Solution 2.

 

Example 3.  Compare the secant method with the inverse quadratic method for finding the roots of the cubic polynomial  [Graphics:Images/BrentMethodMod_gr_142.gif].  

3 (a)  Investigate fast convergence at the simple root  [Graphics:Images/BrentMethodMod_gr_143.gif].  

Solution 3 (a).

3 (b)  Investigate slow convergence at the double root  [Graphics:Images/BrentMethodMod_gr_157.gif].  

Solution 3 (b).

 

 

More Background

    We will now review some root bracketing methods.  The regula falsi method usually converge faster than the bisection method bisection.  However, examples can be found when the bisection method converges faster.  To speed things up, Brent included inverse quadratic interpolation and his method combines the root bracketing methods: bisection, regula falsi; and inverse quadratic interpolation methods.  

 

Theorem (Bisection Method). Assume that  [Graphics:Images/BrentMethodMod_gr_172.gif] and that there exists a number [Graphics:Images/BrentMethodMod_gr_173.gif] such that [Graphics:Images/BrentMethodMod_gr_174.gif].  If  [Graphics:Images/BrentMethodMod_gr_175.gif] have opposite signs, and [Graphics:Images/BrentMethodMod_gr_176.gif] represents the sequence of midpoints generated by the bisection process, then  

        [Graphics:Images/BrentMethodMod_gr_177.gif]   for   [Graphics:Images/BrentMethodMod_gr_178.gif],

and the sequence [Graphics:Images/BrentMethodMod_gr_179.gif] converges to the zero  [Graphics:Images/BrentMethodMod_gr_180.gif].  

That is,      [Graphics:Images/BrentMethodMod_gr_181.gif].  

Proof Bisection Method  

 

Computer Programs  Bisection Method  

Mathematica Subroutine (Bisection Method).

[Graphics:Images/BrentMethodMod_gr_182.gif]

Theorem (Regula Falsi Method). Assume that  [Graphics:Images/BrentMethodMod_gr_183.gif] and that there exists a number [Graphics:Images/BrentMethodMod_gr_184.gif] such that [Graphics:Images/BrentMethodMod_gr_185.gif].  
If  [Graphics:Images/BrentMethodMod_gr_186.gif] have opposite signs, and

        [Graphics:Images/BrentMethodMod_gr_187.gif]  

represents the sequence of points generated by the Regula Falsi process, then the sequence [Graphics:Images/BrentMethodMod_gr_188.gif] converges to the zero  [Graphics:Images/BrentMethodMod_gr_189.gif].  

That is,      [Graphics:Images/BrentMethodMod_gr_190.gif].  

Proof False Position or Regula Falsi Method  

 

Computer Programs False Position or Regula Falsi Method  

Mathematica Subroutine (Regula Falsi Method).

[Graphics:Images/BrentMethodMod_gr_191.gif]

Brent's Method

    The secant method and inverse quadratic interpolation method can be used to find a root  [Graphics:Images/BrentMethodMod_gr_192.gif]  of the function  [Graphics:Images/BrentMethodMod_gr_193.gif].  Combining these methods and making variations which include inverse interpolation have been presented by A. van Wijngaarden, J. A. Zonneveld and E. W. Dijkstra (1963), J. H. Wilkinson (1967), G. Peters and J. H. Wilkinson (1969), T. J. Dekker (1969) and were improved by R. P. Brent (1971).  

    Brent's method can be used to find a root  [Graphics:Images/BrentMethodMod_gr_194.gif]  provided that  [Graphics:Images/BrentMethodMod_gr_195.gif]  have opposite signs.  At a typical step we have three points  [Graphics:Images/BrentMethodMod_gr_196.gif]  such that  [Graphics:Images/BrentMethodMod_gr_197.gif],  and the point  a  may coincide with the point  c.  The points  [Graphics:Images/BrentMethodMod_gr_198.gif]  change during the algorithm, and the root always lies in either  [Graphics:Images/BrentMethodMod_gr_199.gif]  or  [Graphics:Images/BrentMethodMod_gr_200.gif].  The value  b  is the best approximation to the root and  a  is the previous value of  b.  The method uses a combination of three methods: bisection, regula falsi, and inverse quadratic interpolation.  It is difficult to see how each of these ideas are incorporated into the subroutine.  To assist with locating the lines that must be used in logical sequence some of the lines have been color coded.  But some lines are used in more than one method so look carefully at the subroutine and the portions listed below.  
    
    The Brent subroutine will find the root  [Graphics:Images/BrentMethodMod_gr_201.gif]  of the function  [Graphics:Images/BrentMethodMod_gr_202.gif]  in the interval  [Graphics:Images/BrentMethodMod_gr_203.gif]  to within a tolerance  [Graphics:Images/BrentMethodMod_gr_204.gif]  where  [Graphics:Images/BrentMethodMod_gr_205.gif]  is a positive tolerance and  [Graphics:Images/BrentMethodMod_gr_206.gif].  

 

Algorithm (Brent's Method).  Find a root  p  of  [Graphics:Images/BrentMethodMod_gr_207.gif]  given initial bracketing interval  [Graphics:Images/BrentMethodMod_gr_208.gif]  where  [Graphics:Images/BrentMethodMod_gr_209.gif] must have opposite signs.  At a typical step we have three points  [Graphics:Images/BrentMethodMod_gr_210.gif]  such that  [Graphics:Images/BrentMethodMod_gr_211.gif],  and  a  may coincide with  c.  The points [Graphics:Images/BrentMethodMod_gr_212.gif]  change during the algorithm, and the root always lies in either  [Graphics:Images/BrentMethodMod_gr_213.gif]  or  [Graphics:Images/BrentMethodMod_gr_214.gif].  The value  b  is the best approximation to the root and  a  is the previous value of  b.  The iteration uses a combination of  techniques:  

(i)   The Bisection Method  

        [Graphics:Images/BrentMethodMod_gr_215.gif],  or  

(ii)  Regula Falsi Method  

        [Graphics:Images/BrentMethodMod_gr_216.gif],  or  

(iii) Quadratic Interpolation  

        [Graphics:Images/BrentMethodMod_gr_217.gif]  

Derivations  Brent's Method  

 

Mathematica Subroutine (Brent's Method).  

[Graphics:Images/BrentMethodMod_gr_218.gif]

Example 4.  Use Brent's Method to find the three roots of the cubic polynomial  [Graphics:Images/BrentMethodMod_gr_219.gif].  

Solution 4.

 

Example 5.  Use Brent's Method to find the solution to the equation  [Graphics:Images/BrentMethodMod_gr_264.gif]  that lies in the interval  [Graphics:Images/BrentMethodMod_gr_265.gif].  

Solution 5.

 

Research Experience for Undergraduates

Brent's Method  Internet hyperlinks to web sites and a bibliography of articles.  

Numerical Analysis & Numerical Methods Project  

 

Download this Mathematica Notebook Brent's Method

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005