Example 1. Use the
secant method to find the three roots of the cubic
polynomial
.
Determine the secant iteration formula
that
is used.
Show details of the computations for the starting
value
.
Solution 1.
Enter the function.
The secant iteration formula
is
Hopefully, the iteration
will
converge to a root of
.
Graph the function
.
![[Graphics:../Images/SecantMethodMod_gr_30.gif]](../Images/SecantMethodMod_gr_30.gif)
![[Graphics:../Images/SecantMethodMod_gr_31.gif]](../Images/SecantMethodMod_gr_31.gif)
There are three real root.
Starting with the values
.
Use the secant 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.
From the second graph we see that there are two other real
roots.
Use the starting values
.
Use the starting values ![]()
.
Compare our result with Mathematica's built in numerical root finder.
![[Graphics:../Images/SecantMethodMod_gr_94.gif]](../Images/SecantMethodMod_gr_94.gif)
|
|
|
|
|
|
Let's see how good they are.
Mathematica can obtain better numerical answers, but the number of iterations needs to be increased.
Mathematica can also solve for the roots symbolically.
|
|
|
|
|
|
The answers can be manipulated into real expressions.
|
|
|
|
|
|
The answers can be expressed in decimal form.
![[Graphics:../Images/SecantMethodMod_gr_116.gif]](../Images/SecantMethodMod_gr_116.gif)
|
|
|
|
|
|
These answers are in agreement with the ones we found with the secant method.
(c) John H. Mathews 2004