• Aucun résultat trouvé

COMPUTER RESULTS FOR EXAMPLE 3.11

*3.5 CONVERGENCE OF THE NEWTON AND SECANT METHODS

COMPUTER RESULTS FOR EXAMPLE 3.11

Although in the examples above we encountered no real difficulties in obtaining accurate solutions, the student is warned against assuming that

polynomial root finding is without pitfalls. We enumerate some of the difficulties which may be encountered.

1. In Newton’s method the accuracy of the zero is limited by the accuracy to which the correction term p(xi)/p'(xi) can be computed. If, for example, the error in computing p(xi), due to roundoff or other causes, is then the computed zero can be determined only up to the actual z e r o p l u s Figure 3.1 shows dramatically the magnitude of possible errors. Substantial errors will also arise if p(x) has a double zero at for then p’(x) will vanish as and any round-off errors in computing p(xi) will be magnified.

To illustrate the behavior of Newton’s method around a double root, we consider the polynomial

which has a double zero at x = 2. Choosing x0 = 1.5, we obtain, using t h e I B M 7 0 9 4 ( a m a c h i n e with 27-binary-digit floating-point arithmetic), the results in Table 3.1.

The numbers after E indicate the exponents of 10. The underlined digits are known to be incorrect because of loss of significance in computing p(xi) and p'(xi). From this table we may make the following observations (see Exercise 3.5-5 in this connection):

a. The iterates are converging in spite of the fact that p'(2) = 0.

Table 3.1

3.6 POLYNOMIAL EQUATIONS: REAL ROOTS 117

b. The rate of convergence is linear, not quadratic, as is normally the case for Newton’s method. An examination of the corrections p(xi)/p'(xi) shows that the error is being reduced by a factor of

about with each iteration, up to iteration 12.

c. After iteration 13 we can expect no further improvement in the solution. This is because there are no correct figures left in p(xi), and at the same time p'(xi) is of the order of 10-3. Thus the quotient p(xi)/p'(xi) will produce an incorrect result in the fifth decimal place, making it impossible to improve the solution.

2. In some cases an improper choice of the initial approximation will cause convergence to a zero other than the one desired.

3. For some polynomials an improper choice of x0 may lead to a divergent sequence. In Example 3.2, for instance, if we take x0 = 0, we obtain the successive approximations

x5 = - 1.40, which certainly do not appear to be converging to the zero obtained before. An examination of the graph of the polynomial p(x) = x3- x - 1 (see Fig. 3.7) will help to explain this behavior. The succes-sive iterates may oscillate indefinitely about the point a t which p(x) has a maximum value.

4. Some polynomials, especially those of high degree, are very unstable, in the sense that small changes in the coefficients will lead to large changes in the zeros (see Example 3.12 below).

5. Once we have found a zero of a polynomial p(x), the nested multiplica-tion Algorithm (3.47) supplies us with the coefficients of the polynomial q(x) which has all the remaining zeros of p(x) as zeros. To find these zeros it would therefore seem simpler to deal with the reduced or deflated polynomial q(x) rather than with p(x). But we can expect a loss of accuracy in the later zeros because the coefficients in the reduced polynomials will contain errors from incomplete convergence

Figure 3.7

and from roundoff. To minimize such loss of accuracy, the zeros should be obtained in increasing order of magnitude (see Example 3.12). Also, the accuracy of a zero found from a reduced polynomial can be improved by iterating with the original polynomial.

Example 3.12 To illustrate the two polynomials

some of the dangers in polynomial zero finding, we consider (3.49) and

(3.50) We have used Newton’s method (on a CDC 6500) to find all the zeros of these polynomials, working with the reduced polynomial at each stage, with roughly 10 percent error in the initial guess, and with the termination criterion |xi - xi - 1| <

10- 7|xi|.

The zeros of the first polynomial, (3.49), are 1, 2, 3, 4, 5, 6, and 7. Column A in the table below contains the approximations found, starting with the initial guesses 0.9, 1.9, 2.9, 3.9, 4.9, 5.9, and 6.9. The number of iterations required is listed after each zero.

The zeros in column B are those obtained when the coefficient of x2 in (3.49) is replaced by - 13,133, i.e., after a change of one unit in the fifth place of one coefficient is made. Only five zeros are found, and some of these differ from the corresponding zeros in column A in the second place. In order to confirm that these changes are not just due to roundoff, and to ascertain the fate of the two missing zeros, we also used Müller’s method (to be discussed in the next section) which produced the seven zeros listed in column C. These are accurate to all places shown. Note that zeros 5 and 6 have been changed into a complex conjugate pair. Thus a change of 1/100 of 1 percent in one of the coefficients has led to a change of 10 percent in some of the zeros. When the coefficients of a polynomial have been obtained experimentally, errors of this magnitude are easily encountered in the coefficients. We must, therefore, view with great caution zeros of polynomials of high degree found in this manner, especially when there is some doubt about the accuracy of the coefficients.

The zeros of the second polynomial, (3.50), are 0.5, 1, 2, 4, and 8. Starting with the initial guesses 0.45, 0.9, 1.8, 3.6, and 7.2, we computed the zeros in ascending order as shown in column D. Finally, in column E, we have listed the results of computing these zeros in descending order, i.e., starting with the initial guess 7.2 to get the zero 8, then using the reduced polynomial and the initial guess 3.6 to obtain the zero 4, etc. Although the first zero found is accurate to nine places, subsequent zeros are found only to six places. Moreover, the number of iterations required is greater. This illustrates the point that it is best to compute the zeros of smallest absolute value first.