![]()
![]()
for
The Newton-Raphson algorithm requires two
functions evaluations per iteration,
and
. Historically,
the calculation of a derivative could involve considerable
effort. But, with modern computer algebra software
packages such as Mathematica, this has become less of an
issue. Moreover, many functions have non-elementary forms
(integrals, sums, discrete solution to an I.V.P.), and it is
desirable to have a method for finding a root that does not depend on
the computation of a derivative. The secant method does not need a
formula for the derivative and it can be coded so that only one new
function evaluation is required per iteration.
The formula for the secant method is the same
one that was used in the regula falsi method, except that the logical
decisions regarding how to define each succeeding term are
different.
Theorem (Secant
Method). Assume that
and there exists a number
,
where
. If
,
then there exists a
such that the sequence
defined by the iteration
for
will converge to
for certain initial approximations
.
Proof Secant Method Secant Method
Algorithm
(Secant
Method). Find
a root of
given
two initial approximations
using
the iteration
for
.
Computer Programs Secant Method Secant Method
Mathematica Subroutine (Secant Method).
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.
Example 2. Use
Newton's method to find the roots of the cubic
polynomial
.
2 (a) Fast
Convergence. Investigate quadratic convergence
at the simple root
, using
the starting value ![]()
2 (b) Slow
Convergence. Investigate linear convergence at
the double root
, using
the starting value ![]()
Solution
2.
Reduce the volume of
printout.
After you have debugged you program and it is working
properly, delete the unnecessary print statements
and
and
![]()
Concise Program for the Secant Method
Now test this subroutine using the function in Example 1.
Error Checking in the Secant Method
Error checking can be added to the secant method. Here
we have added a third parameter
to
the subroutine which estimate the accuracy of the numerical
solution.
The following subroutine call uses a maximum of 20 iterations,
just to make sure enough iterations are performed.
However, it will terminate when the difference between consecutive
iterations is less than
.
By interrogating k afterward we can see how
many iterations were actually performed.
Various Scenarios and Animations for the Secant Method.
Example 3.
Fast
Convergence Find the solution
to
.
Use the Secant Method and the starting
approximations
and
.
Solution
3.
Example 4.
Slow
Convergence Find the solution
to
.
Use the Secant Method and the starting
approximations
and
.
Solution
4.
Example 5.
Convergence,
Oscillation Find the solution
to
.
Use the Secant Method and the starting
approximations
and
.
Solution
5.
Example 6.
Convergence Find
the solution to
.
Use the Secant Method and the starting
approximations
and
.
Solution
6.
Example 7.
NON Convergence, Diverging to
Infinity Find the solution
to
.
Use the Secant Method and the starting
approximations
and
.
Solution
7.
Example 8.
Convergence Find
the solution to
.
Use the Secant Method and the starting
approximations
and
.
Solution
8.
Animations (Secant Method Secant Method) . Internet hyperlinks to animations.
Research Experience for Undergraduates
Secant Method Secant Method Internet hyperlinks to web sites and a bibliography of articles.
Download this Mathematica Notebook Secant Method
Return to Numerical Methods - Numerical Analysis
(c) John H. Mathews 2004