Professional Documents
Culture Documents
Given a function which is defined in terms of one or more independent variables, the
roots (also called zeros) of the equation are the values of the independent variable(s) for
which the function equals 0:
Note that, in general, the z values are complex numbers, comprised of real and
imaginary components (indicated by the “i”): z = x + iy.
The values of z1, z2, z3, z4, and z5 which satisfy this equation may not be possible by
analytical methods, so the equation would be rearranged into the following form:
Once in this form (the standard form), solving the original equation becomes a
matter of finding the z1, z2, z3, z4, and z5 values for which f equals 0, and well-developed
fields of mathematics and computer science provide several root-finding techniques for
solving such a problem. Note that since the theme of this article is polynomial root-finding,
further examples will focus on single-variable equations, specifically, polynomials.
Root-finding Techniques
f(z) = z2 + z - 2
Because the equation is a simple polynomial, a first approach to finding its zeros
might be to put the equation into the form (z - "1)(z - "2) and make a few educated
guesses; a person could quickly determine that "1 = 1 (a strictly real result) is one root of
this equation. This root could then be divided out of the original polynomial
(z2 + z - 2)/(z - 1) = (z + 2)
In this simple example, the two roots were found easily; the second root was found
immediately after the first one was known. However, in most real-world problems the roots
of a quadratic are not found so easily. Furthermore, in problems where the original
polynomial is of degree greater than two, when one root is found, the other roots do not
follow immediately--more sophisticated techniques are required.
Among the techniques available are analytical ones, in other words, techniques that yield
explicit, algebraic results. For example, in the case of a quadratic equation, explicit
expressions for the two roots are possible via the Quadratic Formula: once a quadratic
equation is arranged into the standard form
a z2 + b z + c = 0
(a, b, and c are known constants), the two roots are found via the Q uadratic Formula:
The quantity within the square root sign (b2 - 4ac) is called the discriminant and determines
whether the solution is complex or strictly real. If the discriminant is less than 0, the
numerator contains an imaginary component and the roots are, therefore, complex. If the
discriminant is greater than or equal to 0, the solutions are real. In fact, if the discriminant is
0, the two roots are real and equal:
"1 = (-b + %0)/(2a) = -b/(2a)
"2 = (-b - %0)/(2a) = -b/(2a)
For the multitude of real-world problems that are not amenable to an analytical
solution, numerical root-finding is a well-developed field offering a wide variety of tools from
which to choose; many computer programs written for the computation of roots are based
on algorithms that make them applicable to the computation of roots of functions in addition
to polynomials, and virtually all of them employ an iterative approach that terminates once
the desired degree of tolerance has been achieved. For example, the bisection method is a
simple and reliable method for computing roots of a function when they are known ahead
of time to be real only. The algorithm starts with the assumption that a zero is somewhere
on a user-supplied interval [a,b]. In other words, the function value f(a) is of the opposite
sign of f(b)–in going from a to b, f either goes from being positive to being negative, or it
goes from being negative to being positive. A point, m, in the middle of the interval [a,b] is
then selected. The function is evaluated at point m: f(m). If the sign of f(m) is the same as
the sign of f(a), the desired zero is not in the interval [a,m]. In this case, the interval is cut in
half and the new interval becomes [m,b]. O n the other hand, if the sign of f(m) is not the
same as the sign of f(a), the desired zero is in the interval [a,m]. In this case, the interval is
cut in half and the new interval becomes [a,m]. This process is repeated until either the
interval converges to a desired tolerance or a value of f is found that is within an acceptable
tolerance, in which case the value of z at this point is the value returned by the program as
the root.
Stage One is the “No Shift” stage; the main purpose of this stage is to accentuate the
smaller zeros. The search for a zero is started by taking an initial guess of 0 for a fixed
number, M, of iterations (M is usually assigned the value 5 on the basis of numerical
experience1).
Stage T wo is the “Fixed Shift” stage, the purpose of this stage is to separate zeros of equal
or almost equal magnitude. As a starting point in this stage, the following value is used:
s = $ exp(i2)
Stage T hree is the “Variable Shift” stage, which is terminated when the computed value of
the polynomial at a possible zero is less than or equal to a specified bound.
In addition to the three fundamental stages around which it was developed, the
Jenkins-Traub Algorithm incorporates several other techniques for making it as effective as
possible. O ne of those techniques is deflation of the polynomial by synthetic division each
time a root is found. Consider the following monic polynomial:
to yield
The b i are new constants. The root-finding process is then repeated on this
new–simpler–polynomial. As each root is found, the polynomial becomes successively
simpler and each successive iteration of the algorithm involves, in general, fewer
computations.
For polynomials whose coefficients are real only, when a complex root is found (z1 =
x + iy), an additional benefit arises: that root’s complex conjugate is also a root (z2 = x - iy).
In other words, two roots are computed–and the polynomial can be deflated by two
degrees–in a single iteration of the algorithm. Furthermore, this deflation involves real only,
rather than complex, operations; the product of these two roots is a real quadratic equation:
(a n zn + a n-1 zn-1 + a n-2 zn-2 + a n-3 zn-3 + . . . a 0)/(z2 - 2xz + (x2 + y2))
In fact, for computing roots of polynomials which have only real coefficients, a modified
version of the Jenkins-Traub Algorithm has been written which incorporates several
features that take advantage of the characteristics of real-only polynomials to yield
significant decreases in program execution time; “If the complex and real algorithms are
applied to the same real polynomial, the real algorithm is about four times as fast.” (4)
The Jenkins-Traub Algorithm not only deflates the polynomial as roots are computed, it
computes the roots roughly in order of increasing magnitude. T his approach is taken
because deflation of a polynomial can be unstable unless done by factors in order of
increasing magnitude. By starting the search for roots with an initial guess of 0, as is done
in Stage One, roots are, indeed, computed roughly in order of increasing magnitude, the
factors by which the polynomial is successively deflated are roughly in order of increasing
magnitude--the deflation of the polynomial is made quite stable.
The roots of this polynomial are very close and should test how effectively the algorithm
discerns near-multiple roots:
1.001
0.998
1.00002
0.99999
In addition, the polynomial is real-only so that readers may confirm the results with a free,
ready-to-use, online Javascript program (URL given below).
0.9980051486669109
0.9998618452719573
1.0001539207016332
1.0009890853594987
Conclusion
Since its introduction in 1969 (in Michael Jenkins’ PhD thesis) the Jenkins-Traub Algorithm
has been rigorously tested and has proven itself as an excellent algorithm for the
computation of the roots of polynomials. It is extremely robust, is globally convergent for any
distribution of zeros, and converges at a better than quadratic rate. Attesting to its high
quality is the fact that source code for programs (written in FOR TR AN) based on the
algorithm have been posted on the NETLIB site, a repository of high-quality numerical
programs; the complex coefficient version is posted as CPOLY
(http://www.netlib.org/toms/419) and a real coefficient only version has been posted as
RPOLY (http://www.netlib.org/toms/493). Translations into C++ and Javascript are also
available; for example, Polynomial Root-finder (http://www.akiti.ca/PolyRootRe.html) is a
Javascript translation of RPO LY and has been successfully tested with data published in
Jenkins’ PhD thesis. In addition, the algorithm is incorporated in commercial software
products (i.e. - Mathematica). The proven effectiveness of the Jenkins-Traub Algorithm and
its wide-spread distribution make it an extremely important tool in the toolbox of numerical
analysts.
References
4)
W ikipedia
http://en.wikipedia.org/wiki/Jenkins-Traub_Algorithm_for_Polynomial_Zeros