Example 2. Use the
inverse quadratic method to find the three roots of the cubic
polynomial
.
Show details of the computations for the starting
value
.
Solution 2.
Enter the function.
The inverse quadratic iteration formula
is
![[Graphics:../Images/BrentMethodMod_gr_99.gif]](../Images/BrentMethodMod_gr_99.gif)
Hopefully, the iteration
will
converge to a root of
.
Graph the function
.
![[Graphics:../Images/BrentMethodMod_gr_104.gif]](../Images/BrentMethodMod_gr_104.gif)
There are three real root.
Root (i) Starting
with the values
. 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.
Now use the subroutine for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_122.gif]](../Images/BrentMethodMod_gr_122.gif)
The efficient version for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_124.gif]](../Images/BrentMethodMod_gr_124.gif)
Compare with the slower secant method.
![[Graphics:../Images/BrentMethodMod_gr_126.gif]](../Images/BrentMethodMod_gr_126.gif)
From the graph we see that there are two other real roots.
Root (ii) Use the
starting values
,
and the subroutine for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_129.gif]](../Images/BrentMethodMod_gr_129.gif)
The efficient version for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_131.gif]](../Images/BrentMethodMod_gr_131.gif)
Compare with the slower secant method.
![[Graphics:../Images/BrentMethodMod_gr_133.gif]](../Images/BrentMethodMod_gr_133.gif)
Root (iii) Use the
starting values ![]()
,
and the subroutine for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_137.gif]](../Images/BrentMethodMod_gr_137.gif)
The efficient version for the inverse quadratic method.
![[Graphics:../Images/BrentMethodMod_gr_139.gif]](../Images/BrentMethodMod_gr_139.gif)
Compare with the secant method.
![[Graphics:../Images/BrentMethodMod_gr_141.gif]](../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