Met. Muller
Met. Muller
Met. Muller
When complex roots are possible, the bracketing methods cannot be used because of
the obvious problem that the criterion for defining a bracket (that is, sign change) does not
translate to complex guesses.
Of the open methods, the conventional Newton-Raphson method would provide a
viable approach. In particular, concise code including deflation can be developed. If a
language that accommodates complex variables (like Fortran) is used, such an algorithm
will locate both real and complex roots. However, as might be expected, it would be sus-
ceptible to convergence problems. For this reason, special methods have been developed to
find the real and complex roots of polynomials. We describe two—the Müller and Bairstow
methods—in the following sections. As you will see, both are related to the more conven-
tional open approaches described in Chap. 6.
We want this parabola to intersect the three points [x0, f(x0)], [x1, f(x1)], and [x2, f (x2)]. The
coefficients of Eq. (7.17) can be evaluated by substituting each of the three points to give
f(x0 ) = a(x0 − x2 )2 + b(x0 − x2 ) + c (7.18)
f(x1 ) = a(x1 − x2 ) + b(x1 − x2 ) + c
2
(7.19)
f(x2 ) = a(x2 − x2 )2 + b(x2 − x2 ) + c (7.20)
FIGURE 7.3
A comparison of two related f (x) Straight f (x)
approaches for locating roots: line
(a) the secant method and
(b) Müller’s method. Root Parabola
estimate
x1 x0 x x2 x1 x0 x
Note that we have dropped the subscript “2” from the function for conciseness. Because we
have three equations, we can solve for the three unknown coefficients, a, b, and c. Because
two of the terms in Eq. (7.20) are zero, it can be immediately solved for c = f(x2). Thus, the
coefficient c is merely equal to the function value evaluated at the third guess, x2. This
result can then be substituted into Eqs. (7.18) and (7.19) to yield two equations with two
unknowns:
f(x0 ) − f(x2 ) = a(x0 − x2 )2 + b(x0 − x2 ) (7.21)
f(x1 ) − f(x2 ) = a(x1 − x2 )2 + b(x1 − x2 ) (7.22)
Algebraic manipulation can then be used to solve for the remaining coefficients, a and b.
One way to do this involves defining a number of differences,
h 0 = x1 − x0 h 1 = x2 − x1
f(x1 ) − f(x0 ) f(x2 ) − f(x1 )
δ0 = δ1 = (7.23)
x1 − x0 x2 − x1
These can be substituted into Eqs. (7.21) and (7.22) to give
(h 0 + h 1 )b − (h 0 + h 1 )2 a = h 0 δ0 + h 1 δ1
h1 b− h 21 a= h 1 δ1
which can be solved for a and b. The results can be summarized as
δ1 − δ0
a= (7.24)
h1 + h0
b = ah 1 + δ1 (7.25)
c = f(x2 ) (7.26)
To find the root, we apply the quadratic formula to Eq. (7.17). However, because of
potential round-off error, rather than using the conventional form, we use the alternative
formulation [Eq. (3.13)] to yield
−2c
x3 − x2 = √ (7.27a)
b ± b2 − 4ac
or isolating the unknown x3 on the left side of the equal sign,
−2c
x3 = x2 + √ (7.27b)
b ± b2 − 4ac
Note that the use of the quadratic formula means that both real and complex roots can be
located. This is a major benefit of the method.
In addition, Eq. (7.27a) provides a neat means to determine the approximate error. Be-
cause the left side represents the difference between the present (x3) and the previous (x2)
root estimate, the error can be calculated as
x3 − x2
εa = 100%
x3
cha01064_ch07.qxd 3/20/09 11:53 AM Page 183
Now, a problem with Eq. (7.27a) is that it yields two roots, corresponding to the ± term
in the denominator. In Müller’s method, the sign is chosen to agree with the sign of b. This
choice will result in the largest denominator, and hence, will give the root estimate that is
closest to x2.
Once x3 is determined, the process is repeated. This brings up the issue of which point
is discarded. Two general strategies are typically used:
1. If only real roots are being located, we choose the two original points that are nearest
the new root estimate, x3.
2. If both real and complex roots are being evaluated, a sequential approach is employed.
That is, just like the secant method, x1, x2, and x3 take the place of x0, x1, and x2.
and the calculation is repeated. The results, tabulated below, show that the method con-
verges rapidly on the root, xr = 4:
i xr a (%)
0 5
1 3.976487 25.74
2 4.00105 0.6139
3 4 0.0262
4 4 0.0000119
Pseudocode to implement Müller’s method for real roots is presented in Fig. 7.4. No-
tice that this routine is set up to take a single initial nonzero guess that is then perturbed to
FIGURE 7.4
Pseudocode for Müller’s method.
develop the other two guesses. Of course, the algorithm can also be programmed to ac-
commodate three guesses. For languages like Fortran, the code will find complex roots if
the proper variables are declared as complex.
If we divided by a factor that is not a root (for example, x + 6), the quotient would be a
fourth-order polynomial. However, for this case, a remainder would result.
On the basis of the above, we can elaborate on an algorithm for determining a root of
a polynomial: (1) guess a value for the root x = t, (2) divide the polynomial by the factor
x − t, and (3) determine whether there is a remainder. If not, the guess was perfect and the
root is equal to t. If there is a remainder, the guess can be systematically adjusted and the
procedure repeated until the remainder disappears and a root is located. After this is ac-
complished, the entire procedure can be repeated for the quotient to locate another root.
Bairstow’s method is generally based on this approach. Consequently, it hinges on the
mathematical process of dividing a polynomial by a factor. Recall from our discussion of
polynomial deflation (Sec. 7.2.2) that synthetic division involves dividing a polynomial by
a factor x − t. For example, the general polynomial [Eq. (7.1)]
f n (x) = a0 + a1 x + a2 x 2 + · · · + an x n (7.29)
can be divided by the factor x − t to yield a second polynomial that is one order lower,
f n−1 (x) = b1 + b2 x + b3 x 2 + · · · + bn x n−1 (7.30)
with a remainder R = b0, where the coefficients can be calculated by the recurrence rela-
tionship
bn = an
bi = ai + bi+1 t for i = n − 1 to 0
Note that if t were a root of the original polynomial, the remainder b0 would equal zero.
To permit the evaluation of complex roots, Bairstow’s method divides the polynomial
by a quadratic factor x 2 − rx − s. If this is done to Eq. (7.29), the result is a new polyno-
mial
f n−2 (x) = b2 + b3 x + · · · + bn−1 x n−3 + bn x n−2
with a remainder
R = b1 (x − r) + b0 (7.31)
As with normal synthetic division, a simple recurrence relationship can be used to perform
the division by the quadratic factor:
bn = an (7.32a)