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.

Enter the function.  

[Graphics:../Images/BrentMethodMod_gr_95.gif]

[Graphics:../Images/BrentMethodMod_gr_96.gif]

The inverse quadratic iteration formula  [Graphics:../Images/BrentMethodMod_gr_97.gif]  is

[Graphics:../Images/BrentMethodMod_gr_98.gif]

[Graphics:../Images/BrentMethodMod_gr_99.gif]

 

Hopefully, the iteration  [Graphics:../Images/BrentMethodMod_gr_100.gif]  will converge to a root of  [Graphics:../Images/BrentMethodMod_gr_101.gif].

Graph the function  [Graphics:../Images/BrentMethodMod_gr_102.gif].

[Graphics:../Images/BrentMethodMod_gr_103.gif]

[Graphics:../Images/BrentMethodMod_gr_104.gif]

[Graphics:../Images/BrentMethodMod_gr_105.gif]

There are three real root.

Root (i)  Starting with the values  [Graphics:../Images/BrentMethodMod_gr_106.gif].  Use the inverse quadratic interpolation method to find a numerical approximation to the root.  First, do the iteration one step at a time.  Type each of the following commands in a separate cell and execute them one at a time.

[Graphics:../Images/BrentMethodMod_gr_107.gif]
[Graphics:../Images/BrentMethodMod_gr_108.gif]

[Graphics:../Images/BrentMethodMod_gr_109.gif]
[Graphics:../Images/BrentMethodMod_gr_110.gif]

[Graphics:../Images/BrentMethodMod_gr_111.gif]
[Graphics:../Images/BrentMethodMod_gr_112.gif]

[Graphics:../Images/BrentMethodMod_gr_113.gif]
[Graphics:../Images/BrentMethodMod_gr_114.gif]

[Graphics:../Images/BrentMethodMod_gr_115.gif]
[Graphics:../Images/BrentMethodMod_gr_116.gif]

[Graphics:../Images/BrentMethodMod_gr_117.gif]
[Graphics:../Images/BrentMethodMod_gr_118.gif]

[Graphics:../Images/BrentMethodMod_gr_119.gif]
[Graphics:../Images/BrentMethodMod_gr_120.gif]

Now use the subroutine for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_121.gif]

[Graphics:../Images/BrentMethodMod_gr_122.gif]

 

 

The efficient version for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_123.gif]

[Graphics:../Images/BrentMethodMod_gr_124.gif]

 

 

Compare with the slower secant method.

[Graphics:../Images/BrentMethodMod_gr_125.gif]

[Graphics:../Images/BrentMethodMod_gr_126.gif]

 

 

From the graph we see that there are two other real roots.

 

Root (ii)  Use the starting values  [Graphics:../Images/BrentMethodMod_gr_127.gif], and the subroutine for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_128.gif]

[Graphics:../Images/BrentMethodMod_gr_129.gif]

 

 

The efficient version for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_130.gif]

[Graphics:../Images/BrentMethodMod_gr_131.gif]

 

 

Compare with the slower secant method.

[Graphics:../Images/BrentMethodMod_gr_132.gif]

[Graphics:../Images/BrentMethodMod_gr_133.gif]

 

 

Root (iii)  Use the starting values [Graphics:../Images/BrentMethodMod_gr_134.gif][Graphics:../Images/BrentMethodMod_gr_135.gif], and the subroutine for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_136.gif]

[Graphics:../Images/BrentMethodMod_gr_137.gif]

 

 

The efficient version for the inverse quadratic method.  

[Graphics:../Images/BrentMethodMod_gr_138.gif]

[Graphics:../Images/BrentMethodMod_gr_139.gif]

 

 

Compare with the secant method.

[Graphics:../Images/BrentMethodMod_gr_140.gif]

[Graphics:../Images/BrentMethodMod_gr_141.gif]

 

 

Conclusion.  There is only a slight advantage to using the inverse quadratic interpolation over the secant method.  
Brent's method makes further improvements that are necessary to take full advantage of inverse interpolation.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005