Académique Documents
Professionnel Documents
Culture Documents
Tyler ONeill
December 11, 2013
Abstract
The purpose of this article is to provide a summary and explanation
for the implementation of root-finding methods in Wolfram Mathematica.
Root-finding methods are used to evaluate roots of a function. A root of
a function is defined to be the x-value of f (x) such that f (x) = 0. These
methods are typically iterative approximations, which means that they
are well suited for computation using a system like Mathematica. The
methods explored are Newtons method, the bisection method, and the
secant method.
1
1.1
Newtons Method
Overview
f (xn1 )
f 0 (xn1 )
1.2
Intuition
1.3
Mathematica Demonstration
The Mathematica demonstration for this method asks for a function and an
x0 to start the process. A command is executed that shows the current value of
x and f (x) as well as a graph that shows where the current value of x is relative
to the rest of the curve. The user can change the number of iterations and see
how that improves the accuracy of the guess.
1.4
Errata
2
2.1
c, and likewise if f (c) < 0 then b is replaced with c. This process is continued
until the desired accuracy is reached.
2.2
Intuition
Intuition for this root-finding method can be derived from the intermediate
value theorem. Because f is continuous on the interval [a, b] there must be some
value c such that f (c) = 0 because f (a) > 0 and f (b) < 0.
2.3
Mathematica Demonstration
2.4
Errata
Function continuity Perhaps the biggest problem with the bisection method
is the fact that the function must be continuous on the interval [a, b]. Failing
this prerequisite, another method must be used.
Slow convergence As opposed to Newtons method, which converges in
quadratic time, this method converges in only linear time. This means that
it will take more applications of the method to attain the same accuracy that
could have been attained when using a method like Newtons method.
3
3.1
The final method to be explored is the secant method. This method can be seen
as a more primordial version of Newtons method as its underlying concepts are
the same. Essentially, with this method x0 and x1 are chosen, again a priori,
so that they are close to a root of f . Then a recurrence relation between the
root of the secant line between x0 and x1 is used such that xn will be a fairly
accurate guess for the root of the function f . Mathematically:
xn = xn1 f (xn1 )
xn1 xn2
f (xn1 ) f (xn2 )
3.2
Intuition
f (x1 ) f (x0 )
(x x1 ) + f (x1 )
x1 x0
f (x1 ) f (x0 )
(x x1 ) + f (x1 )
x1 x0
x1 x0
f (x1 ) f (x0 )
This value of x is now defined to be x2 and the process is repeated with x1 and
x2 .
3.3
Mathematica Demonstration
3.4
Errata
4
4.1
Newtons method and the bisection method are not similar and use completely
different methodologies to compute a root. Whereas Newtons method uses linear approximations of a curve to zone-in on a root, the bisection method
simply divides a region where a root lies. Both do have constraints on the function f whose root is to be found. Newtons method requires f is continuously
differentiable near the root and the bisection method requires f to be continuous
across its parameters a and b.
4.2
Newtons method and the secant method share a lot in common. Both rely
on the principle of linear approximations of a curve. Truly, the only difference
is that Newtons method uses tangent lines (using the Newtonian invention
of derivatives), whereas the secant method uses secant line approximations.
Expectedly, the secant method was discovered long before Newtons method
(in the 18th B.C. century egypt, in fact [2]). As previously noted, the order of
convergence for Newtons method is 2 and for the secant method it is .
4.3
The bisection method and the secant method do not share a lot in common.
They do both require two parameters: xn and xn1 for the secant method
and a and b for the bisection method. The secant methods approach is to use a
recurrence relation to move toward the root, whereas the bisection method uses
bracketing to narrow down a region to find the root.
Conclusion
References
[1] Grinshpan The Order of Convergence for the Secant Method.
[2] Joanna M. Papakonstantinou and Richard A. Tapia Origin and Evolution
of the Secant Method in One Dimension
[3] Kristin Koehler, California State University Brents Method