Example.
Use the secant method to find
the three roots of the cubic polynomial.
Determine the secant iteration formulathat
is used.
Show details of the computations for the starting value.
Solution.
Enter the function.
The secant iteration formulais
Hopefully, the iterationwill
converge to a root of.
Graph the function.
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.
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.
These answers are in agreement with the ones we found with the secant
method.
Back.
|