RESEARCH ARTICLE A Modified Iterative Method for

0 downloads 0 Views 103KB Size Report
Sep 22, 2011 - A Modified Iterative Method for Finding The Real Roots of A ... According to Banach's fixed point theorem [15, 16], contractive ... g(x),. (2) where f(x) = ϕ(x) − x. (3). We have considered g(x) as an ... Further there exists a non-negative constant M < 1 such that for all x ∈ I, |g′ .... x2 + 2x − 1 = 0 ... −8x − 12 = 0.
c 2012 Modern Science Publishers ⃝ www.m-sciences.com

J. of Mod. Meth. in Numer. Math. eISSN: 2090-4770 pISSN: 2090-8296 Vol. 3, No. 1, 2012, 45–52

RESEARCH ARTICLE A Modified Iterative Method for Finding The Real Roots of A Polynomial U. Deka∗ , R. Prasad and A. N. Kafley Department of Physics, Sikkim Manipal Institute of Technology, Sikkim-737136, India (Received: 9 August 2011, Accepted: 22 September 2011) A more robust root finding technique using the fixed point theory is developed. This is based on the Successive Iteration method, with a different iteration function. The advantage of this method is that it is independent of the choice for the initial guess for the numerical computation. The iterative function used in this method has a very fast convergence in the range of [−1, 1]. The root is achieved to a very high degree of accuracy in very less number of iterative steps compared to many other iterative methods. A comparison of the root achieved to a desired accuracy using our method and the successive approximation method are presented. The nature of the convergence and the stability of the root(s) is also discussed. Keywords: Polynomial roots; fixed point function; contractive function; successive iteration; convergence. AMS Subject Classification: 12Y05, 13P15, 46E15, 97N40.

1.

Introduction

There are multitude of practical problems, which are not amenable to analytical solutions and numerical technique is an widely explored tool to find solutions for such problems. The problem of finding zeros of a given function or eigenvalues is a very common problem in the field of engineering and applied sciences [1]. There are number of efficient algorithms based on different methods like LinBarstow, Newton’s method [2, 3] for locally convergent cases and Graeffe, Bernoulli methods and qd algorithm for globally convergent cases [4–7]. The aim of achieving convergence with desired accuracy on a global framework has been difficult as a general case [8, 9]. Even though a lot of work has been done regarding development of new mathematical approach and computational technique for root finding in context of different areas [8–12] but there are still few very important areas to be looked into, considering the computational complexity with respect to fast convergence and error propagation [8]. The root finding of univariate polynomials is a very common problem. But in the goal of achieving a higher rate of convergence we have to compromise on the computational precision [11]. A simple convergent algorithm for finding the roots of a polynomial is discussed in [12], but it still has the problem of ill conditioning. The choice of the initial guess in almost all types of root finding techniques has always remain very important from the point of optimization of the computing time. There were some important effort toward achieving a global convergence [13] for polynomials. Many algorithms based on the Weierstrass (Durand-Kerner) iteration method as well as various extensions of it starts with a random set of initial approximations [11]. In fact, separate routines are used to find a proper initial guess, thereby increasing the computation time [1, 2, 14]. ∗ Corresponding author. Email address: udeka1@rediffmail.com (U. Deka).

U. Deka et al.

46

A number of fixed point theorems have been developed in the last century, each focussing on a specific class of functions. According to Banach’s fixed point theorem [15, 16], contractive function of a Banach’s space maps into itself and has a unique fixed point. Banach demonstrated that the simple iteration method (SIA), xi+1 = g(xi ), generates a Cauchy sequence that converges to the fixed point of any such function. In this communication, we have made an attempt to develop a simple and very effective iterative scheme for finding the real roots of a polynomial based on the Banach’s fixed point theorem [15]. Our motivation has been to reduce the number of iterative steps and to simplify the choice of the initial guess. Both of this aspects leads to the reduction of the computation effort and machine time. Since successive approximation methods involves the evaluation of a single function, the time required for computation is reduced as a normal consequence. The refinement in both of these aspects leads to the development of an optimized algorithm. In section 2, the basic background of the mathematical method is discussed. In section 3 an elaborate comparison of the roots evaluated using the new scheme with that of the normal successive approximation method [17] is shown. In section 4 the result and discussion is presented and finally the conclusion is covered in section 5.

2.

Mathematical Formulation

We have adopted the successive approximation method to find the real roots of a given polynomial. Successive approximation method is basically a very simple iterative method to find the roots of a polynomial. Here we have modified the iteration function for successive approximation as, g(xn ) =

ϕ(xn ) + xn , 2

and used g(0) as an initial guess. We will also show that this initial guess works almost as a universal guess for different types of polynomial having real roots only. The initial guess so chosen lies in the required interval for convergence so that we converge to the root of the polynomial f (x) = 0. The root is nothing but the fixed point of g(x). According to fixed point theorem, if ξ be the root, then ξ = g(ξ). For obtaining the root of the equation of the form f (x) = 0,

(1)

we derive an equation of the form ′

x =

ϕ (x) + x = g(x), 2

(2)

where f (x) = ϕ(x) − x.

(3)

We have considered g(x) as an iteration function for solving (1). 2.1

Algorithm

The algorithm for solving the real root(s) of a given polynomial based on our proposed iterative function is simple and straight forward. The basic outlines of the algorithm for the considered iterative function g(x) and with a starting value x0 , is given below. For n = 0, 1, 2, 3, ...

A Modified Iterative Method for Finding The Real Roots of A Polynomial

47

Do xn+1 = g(xn ) Until |xn+1 − xn | ≤ Desired tolerance. It is necessary that the following conditions should be satisfied by the algorithm to become successful for finding the root of the equation. (i) For the given starting point x0 = g(0), we should be able to calculate x1 , x2 , x3 , .... successfully. (ii) The sequence of x1 , x2 , x3 , .... should converge to some ξ. (iii) The limit ξ must be a fixed point of g(x), i.e. ξ = g(ξ). To satisfy (i) we consider that there is an interval I = [a, b] such that, for all x ∈ I, g(x) maps I into itself. From this assumption, by induction the following property of n can be mentioned. That is if x0 = g(0) ϵ I, then for all n, xn ∈ I. Hence, xn+1 = g(xn ) is defined and is in I. Further (iii) holds if g(x) is continuous on I = [a, b]. Assumption 1: There exists an interval I = [a, b] such that for all x ∈ I, g(x) is defined and g(x) ∈ I. Assumption 2: The iteration function g(x) is continuous on I = [a, b]. Assumption 3: The iteration function is differentiable on I = [a, b]. ′

Further there exists a non-negative constant M < 1 such that for all x ∈ I, |g (x)| ≤ M , or more precisely ′ ϕ (x) + 1 ≤ M. 2

(4)

Theorem 2.1 If g(x) is continuously differentiable in some interval containing some fixed point ξ and if ′ ϕ (x)+1 2 ≤ M , then there exists an ε > 0, so that the modified iteration function converges whenever |x0 − ξ| ≤ ε. This is the Ostrowski theorem [18] for the modified iteration function. Proof Let g(x) = ϕ(x)+x be the iteration function. Now let x0 = g(0) be any point in I. Then the 2 modified successive approximation method generates a sequence x1 , x2 , x3 , . . . of points all lying in I (by Assumption 1 ). Now, ξ − xn+1 =

ϕ(ξ) + ξ ϕ(xn ) + xn ϕ(ξ) − ϕ(xn ) ξ − xn − = + . 2 2 2 2

Let en be the error in the nth iteration. Then, en+1 = ξ − xn+1 ,

n = 0, 1, 2, 3, . . .

or, en+1 =

ϕ(ξ) − ϕ(xn ) ξ − xn + . 2 2

For some ηn between ξ and xn , using the mean value theorem for derivatives we can write ′

ϕ (ηn ) =

ϕ(ξ) − ϕ(xn ) . ξ − xn

Hence, en+1

[ ′ ] ′ ϕ (ηn )(ξ − xn ) ξ − xn ϕ (ηn ) + 1 = + = (ξ − xn ) 2 2 2

U. Deka et al.

48

Therefore, [

en+1

] ′ ϕ (ηn ) + 1 = en . 2

(5)

Hence by Assumption 3, |en+1 | ≤ M |en |, and by induction on n |en+1 | ≤ M |en | ≤ M 2 |en−1 | ≤ ..... ≤ M n+1 |e0 |.

(6)

Since, 0 ≤ M < 1, we have lim M n+1 = 0.

n→∞

Therefore, lim |en+1 | = lim M n+1 = 0

n→∞

n→∞

regardless of the initial error e0 , which indicates that x1 , x2 , x3 , . . . converges to ξ. ′





Now, since g (x) is continuous near ξ and |g (x)| < 1 there exists for any M with |g (ξ)| < M < 1, ′ and ϵ > 0, so that |g (x)| ≤ M for every x with |x − ξ| ≤ ϵ. Let us fix one such M with its corresponding ϵ. Then for I = [ξ − ϵ, ξ + ϵ], Assumption 3 is satisfied. ′ While for Assumption 1, let x be any point in I, so |x−ξ| ≤ ϵ. Then g(x)−ξ = g(x)−g(ξ) = g (η)(x−ξ) ′ for some η between x and ξ, hence in I. But then, |g(x) − ξ| ≤ g (η)|(x − ξ)| ≤ M ϵ < ϵ. This shows that g(x) is in I if x is in I. ′ Hence for a function f (x) = 0 and choosing an appropriate ϕ(x) such that ϕ (x)+1 < 1 the modified 2 successive approximation, i.e., xn+1 =

ϕ(xn )+xn 2

converges to the root ξ.

From eqn. (5), we can write ′ |en+1 | ϕ (ξ) + 1 lim = = C, n→∞ |en | 2

(7)

′ where C is a constant. The order of convergence is one and the asymptotic error constant is ϕ (x)+1 . 2 To guarantee that the initial error e0 is reduced by a factor of 10−m , (m > 0) we must perform n number of iterations, which is given by the known formula of n=

log(10−m ) , log(M )

(8)

where M < 1. The iteration procedure will continue till we achieve our desired value of predefined tolerance. That is, whenever |xn+1 − xn | < ϵ, using eqn. (5), we will have, [ ϕ′ (η ) + 1 ] n en − en 2 [ ϕ′ (η ) − 1 ] n = en . 2

xn+1 − xn = en+1 − en =

A Modified Iterative Method for Finding The Real Roots of A Polynomial

49

Taking the root ξ for ηn we have [ en =

] 2 (xn+1 − xn ). ϕ′ (ξ) − 1

(9)





This shows that the test is unsatisfactory whenever ϕ (ξ) is close to 1.

3.

Numerical Analysis

In this section, we report the computational result, which shows the nature of convergence of the roots evaluated by using the unmodified and modified successive approximation methods. We have chosen polynomials of different orders having both real and imaginary roots. The diverse nature of the polynomials are chosen to test the robustness and effectiveness of the algorithm. We have presented here the polynomials upto fifth order but we have carried out the same exercise for higher orders also. The result obtained are more or less similar in nature. We observe that in most of the cases the unmodified method does not converge for the same universal initial guess x0 , and when both the methods converges, it is seen that there is a fairly large difference in the number of iterative steps required. Normally, the number of steps required in the unmodified method is more than the modified one, except for few exceptional cases where it is comparable or slightly more. It is to be noted that the unmodified method depends greatly on the choice of the initial guess x0 . The reason for the exceptional cases may be attributed to the choice of an universal initial guess for the modified method whereas, a more proper choice of the initial guess is involved for the unmodified method. This is to note that the iterative steps involved in these two methods depend on the asymptotic error constants. Here we denote the asymptotic error constants ′ as K and M for the unmodified and modified methods ′ ϕ (x)+1 respectively, i.e K = |ϕ (x)| and M = 2 . We resent a comparison of the real roots of polynomials of different orders evaluated by using the two methods in Table 1. Table 1.: Comparison of the roots achieved by using the modified (M) and the unmodified (UM) method. The number of iterations required and the nature of convergence is presented. S. No. 1.

Polynomial x2 + 2x − 1 = 0

Roots √ -1 ± 2

2.

x3 − 3x − 18 = 0

3.

x3 − 2x2 + 7x +9 = 0

4.

x3 + 2.5x2 − 2x −1.5 = 0 x4 + 8x3 + 11x2 −8x − 12 = 0 x4 − 0.94x3 − 1.176x2 +0.6408x + 0.4752 = 0 x5 + x4 − 22x3 −46x2 + 21x + 45 = 0 x4 − 22x2 − 24x +45 = 0 x3 + x2 − 21x −45 = 0 x2 + 6x + 9 = 0

3, Single Real Root 0.9266796268 0.4155429543, 2.51113653 -0.5, 1, -3

5. 6. 7. 7.(a) 7.(b) 7.(c)

-1, 1, -2, -6 -0.66, -0.6, 1, 1.2 -1, 1, -3, -3, 5 1, -3, -3, 5 -3, -3, 5 -3, -3

Method UM M UM M UM M

Number of Iterations 20 15 9 31 167 8

Root Value achieved 0.41421356 0.41421356 3.0000000 3.0000000 -0.92667963 -0.92667963

UM M UM M UM M UM M UM M UM M UM M

133 8 14 18 FAIL 72 9 21 FAIL 16 8 25 FAIL FAIL

-0.50000000 -0.50000000 -1.00000000 -0.99999999 NULL -0.58996562 -1.00000000 -1.00000000 NULL -1.00000000 5.00000000 5.00000000 NULL NULL

This is interesting to see that the we could not achieve any convergence using either of the methods

U. Deka et al.

50

for the perfect polynomial as given in S. No. 7. (c) in Table 1. In the next section, we will discuss about the modifications in the scheme, which is made to find the roots for perfect polynomials in just two iterations.

4.

Results And Discussions

0.417 0.416

(φ(x)+x)/2 x Convergence Route

0.415 0.414 0.413

2

f(x)=x +2x-1=0

0.412 0.411 0.411 0.412 0.413 0.414 0.415 0.416 0.417 0.418 Figure 1.: Root locus plot of the convergence to the root

This is very clear from the numerical analysis section that the modified root finding method is advantageous for finding the real roots of polynomials of any order. The number of iterative steps required to arrive at the desired level of accuracy is less when we use the modified method. The cases where we see the steps involved in the unmodified method is lesser than the modified method is because of the choice of the initial guess. A separate scheme is required to find the best possible initial trial for the unmodified method. Whereas, we have used the same universal initial value of “0” in case of the modified method. This has reduced the overall computation time. In figure 1, the the root locus of the convergence toward the root for the polynomial given in S. No. 1 of Table 1 is shown. In figure 2, a semilog plot of the number of iterations required to achieve a desired accuracy of the order of 10−8 is given. A very important requirement about the root evaluating algorithm is about its numerical stability. We have observed that the value of the root evaluated by using the unmodified method becomes unstable as seen in fig. 2, when the level of accuracy is increased. This can be conferred from the oscillations observed in the difference (D) of two consecutive values of f (x) evaluated for two consecutive steps of the root values. We would like to mention here that for a stable root, oscillations are undesirable. Oscillatory nature in f (x) increases as we increase the degree of accuracy for achieving the exact root. This indicates that the root finding algorithm itself becomes numerically unstable for higher accuracy. This is observed that when a higher degree of accuracy is specified the amplitude of oscillations increases for roots evaluated by the unmodified method. This is seen to be true for most of the polynomials. Whereas, we do not observe any such fluctuations during convergence when the modified method was used to evaluate the root. The monotonic decrease in the value of D for roots evaluated by the modified method is seen in figure 2. Hence, we can easily mention that the modified method has a great merit over the unmodified method as far as the stability of the algorithm is concerned. Similar, behavior are also observed for other polynomials.

A Modified Iterative Method for Finding The Real Roots of A Polynomial

51

Another very interesting issue has come up while solving the roots of perfect polynomials. Under normal situations, we do not require any numerical method to solve the roots of a perfect polynomial when it is given in the perfect form of its power, e.g. (x − a)n . When a perfect polynomial of higher order is given in an expanded form it is not always easy to know whether it is in the perfect form or not. Moreover, there are number of polynomials, which has a perfect part and an imperfect part. In such cases, it is always desirable to rewrite the polynomial as a product of the perfect and the imperfect part. Then by evaluating the roots of the perfect part of the polynomial the whole polynomial can be deflated to obtain the root(s) of the reduced order imperfect polynomial. Therefore it is very essential to find the roots for the perfect part with minimum number of iterative steps to minimize the overall computation time required. Now we have observed that the modified iteration function as well as the unmodified function do not converge to the desired root even after large number of iterations. We have verified that after 500 iterations also, we did not achieve any convergence in either of the cases. Whatever be the form of ϕ(x) we could not get a contraction mapping of g(x) by taking x0 = g(0). Thus, our initial proposition of making the method independent of initial guess seems not to work under all situations. We then introduce a new modification to the iteration function, which shows that the desired root for the perfect polynomial can be achieved in just 2 iterations. In fact, if we have an nth order perfect polynomial then also we can get the root after 2 iterations. This modification is very powerful and useful in the sense that we can check whether a polynomial is perfect or not without wasting time and computational effort.

0 Using modified scheme Using unmodified scheme

-1

log10(D)

-2

f(x)=x3-2x2+7x+9=0

-3 -4 -5 -6 -7 -8 -9 0

20

40

60

80

100

120

140

160

180

No. of iteration steps Figure 2.: Semilog plot of the decreasing difference of f(x) for two consecutive steps. A major modification in the overall algorithm is made to check for presence of any perfect root in the given polynomial first by using the following iterative function. This checking hardly requires any extra computation time as the perfect root is evaluated in just two steps only. If the root is not achieved in two steps then it should automatically adopt the iterative function as discussed earlier, as the given polynomial is not a perfect one. The modified iteration function for finding the root of a polynomial with n multiplicity is g(xn+1 ) = n (ϕ(xn ) − xn )) + xn . Suppose we have a polynomial P (x) = an xn + an−1 xn−1 + ... + a1 x + a0 , then the form of ϕ(x), which

REFERENCES

52

we have chosen is, ϕ(x) = −

(an xn + an−1 xn−1 + ... + a0 ) . a1

So our initial guess to find the root of P (x) = (x + z)n becomes g(0) = nϕ(0) = −n

a0 . a1

Here, we would like to mention that the unmodifed method fails to distinguish such differences.

5.

Conclusion

We see that modified method is highly versatile in finding the root of f (x) especially when K > 1 at x1 for most of the times, still M < 1 for the modified method. This is why the modified method ′ converges when the older method fails. When |ϕ (x)| > 1, the old method fails but the modified ′





| ϕ (x21 )+1 | < 1 because when ϕ (x) is < 0 and > 1, | ϕ (x21 )+1 | < 1 most of the time. It has also been observed that when x1 < 1, i.e., when the ratio of the constants of the iteration function for g(0) < 1 then the method converges definitely. Moreover, the modified method is numerically stable and computation time required is optimized. Henceforth, we can conclude that the modified iterative scheme is much advantageous in contrast to the older method in the perspective of choosing of the initial trial value, robustness and computational time taken. The simplicity, rapid convergence and universality of the initial trial value makes the algorithm very efficient and effective. Further, we would like to say that more research work is required to make the method more compatible with respect to transcendental equations and polynomials with imaginary roots, as the same modification may not be suitable for such cases.

References [1] M. A. Hasan, editor. Root Iterations and the Computation of Minimum and Maximum Zeros of Polynomials, Proceedings of IEEE International Symposium on Circuits and Systems, 2005. [2] P. Henrici. Applied and Computational Complex Analysis, volume 1. Jhon Wiley & Sons, New York, 1974. [3] A. S. Householder. The Numerical Treatment of a Single Nonlinear Equation. McGraw Hill, New York, 1970. [4] E. Schroder. Ueber unedlich viele algorithm zur auflosung der gleichungen. Math. Ann., 2:317:365, 1870. [5] J. F. Traub. A class of globally convergent iteration functions for the solution of polynomial equations. Math. Comp., 20:113:138, 1966. [6] A. S. Householder. Generalization of an algorithm of sebastiao c silva. Numer. Math., 16:375:382, 1971. [7] G. Poyla. Graeffe’s method for eigenvaluesgraeffe’s method for eigenvalues. Num. Math., 11:315:319, 1968. [8] J. Rothweiler. A rootfinding algorithm for line spectral frequencies. In the proceedings of IEEE International, Conference on Acoustics, Speeches and Signal Processing, 2:661:664, 1992. [9] J. Jr. Campbell, V. Welch, and T. Tremain. An expandable error-protected 4800 bps celp coder (u.s. federal standard 4800 bps voice coder). In IEEE Int. Conf. on Acoustics, Speech and Signal Processing, page 735:738, 1989. [10] J. Hubbard, D. Schleicher, and S. Sutherland. How to find all roots of complex polynomials by newton’s method. Inventiones Math., 146:1:33, 2001. [11] V. Y. Pan. Univariate polynomials: Nearly optimal algorithms for factorization and root finding. In B. Mourrain, editor, Int. Symp. Symbolic and Algebraic Computation, page 253:267, London, Canada, 2001. [12] J. B. More and K. T. Clark. A simple convergent algorithm for rapid solution of polynomials equations. IEEE Trans. Comps., 19:79:80, 1970. [13] M. Davis and B. Dawson. On the global convergence of halley’s iteratioin formula. Numer. Math., 24:133:135, 1975. [14] S. D. Conte and C.de Boor. Elementary Numerical Analysis An Algorithm Approach. McGraw Hill, Singapore, 3rd edition, 1981. [15] C. S. Banach. Sur les operations dans les ensembles abstraits et leur application aux equations integrales. Fund. Math., 3:133:181, 1922. [16] R. P. Agarwal, M. Meehan, and D.O’. Regan. Fixed Point Theory and Applications. Cambridge University Press, 2001. [17] V. Rajaraman. Computer Oriented Numerical Methods. Prentice-Hall of India, New Delhi, 2002. ¨ [18] A. Ostrowski. Uber einige l¨ osungen der funktionalgleichung ϕ(x) · ϕ(y) = ϕ(xy). Acta Mathematica, 41(1):271:284, 1918.