CHAPTER 2 EXTRACTION OF THE QUADRATICS FROM REAL ALGEBRAIC POLYNOMIAL

Similar documents
Scientific Computing. Roots of Equations

3.3 Dividing Polynomials. Copyright Cengage Learning. All rights reserved.

ZEROS OF POLYNOMIAL FUNCTIONS ALL I HAVE TO KNOW ABOUT POLYNOMIAL FUNCTIONS

Appendix: Synthetic Division

Roots of Equations Roots of Polynomials

Chapter 6. Nonlinear Equations. 6.1 The Problem of Nonlinear Root-finding. 6.2 Rate of Convergence

More Polynomial Equations Section 6.4

Section 4.3. Polynomial Division; The Remainder Theorem and the Factor Theorem

Solution of Algebric & Transcendental Equations

Warm-Up. Simplify the following terms:

Goals for This Lecture:

Process Model Formulation and Solution, 3E4

Chapter 3: Root Finding. September 26, 2005

Linear System of Equations

The purpose of computing is insight, not numbers. Richard Wesley Hamming

M.SC. PHYSICS - II YEAR

Section 3.1: Characteristics of Polynomial Functions

ROOT FINDING REVIEW MICHELLE FENG

Dividing Polynomials: Remainder and Factor Theorems

Numerical Methods I Solving Nonlinear Equations

6x 3 12x 2 7x 2 +16x 7x 2 +14x 2x 4

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

SECTION 2.3: LONG AND SYNTHETIC POLYNOMIAL DIVISION

x 2 + 6x 18 x + 2 Name: Class: Date: 1. Find the coordinates of the local extreme of the function y = x 2 4 x.

Numerical Solution of f(x) = 0

MHF4U Unit 2 Polynomial Equation and Inequalities

Numerical Methods. Root Finding

Lesson 7.1 Polynomial Degree and Finite Differences

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

COURSE Iterative methods for solving linear systems

Advanced Math Quiz Review Name: Dec Use Synthetic Division to divide the first polynomial by the second polynomial.

Notes for Numerical Analysis Math 5465 by S. Adjerid Virginia Polytechnic Institute and State University. (A Rough Draft)

Computational Methods. Solving Equations

Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i

Intro to Scientific Computing: How long does it take to find a needle in a haystack?

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Finding the Roots of f(x) = 0

Lesson 7.1 Polynomial Degree and Finite Differences

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

Roots & Zeros of Polynomials. How the roots, solutions, zeros, x-intercepts and factors of a polynomial function are related.

5.3 The Power Method Approximation of the Eigenvalue of Largest Module

Long and Synthetic Division of Polynomials

Bisection Method. and compute f (p 1 ). repeat with p 2 = a 2+b 2

Linear System of Equations

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

Experience in Factoring Large Integers Using Quadratic Sieve

Inverses. Stephen Boyd. EE103 Stanford University. October 28, 2017

Unit 1: Polynomial Functions SuggestedTime:14 hours

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

7.3 The Jacobi and Gauss-Siedel Iterative Techniques. Problem: To solve Ax = b for A R n n. Methodology: Iteratively approximate solution x. No GEPP.

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

Math 3 Variable Manipulation Part 3 Polynomials A

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Procedure for Graphing Polynomial Functions

Matrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1

Day 6: 6.4 Solving Polynomial Equations Warm Up: Factor. 1. x 2-2x x 2-9x x 2 + 6x + 5

Appendix 8 Numerical Methods for Solving Nonlinear Equations 1

Chapter 1. Root Finding Methods. 1.1 Bisection method

Robotics 1 Inverse kinematics

Numerical Analysis using Maple and Matlab

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Numerical Methods. King Saud University

EIGENVALUE PROBLEMS. EIGENVALUE PROBLEMS p. 1/4

15 Nonlinear Equations and Zero-Finders

Chapter 2 Formulas and Definitions:

6.5 Dividing Polynomials

We say that a polynomial is in the standard form if it is written in the order of decreasing exponents of x. Operations on polynomials:

College Algebra Notes

Course Notes: Week 1

Chapter 2 Solutions of Equations of One Variable

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,

Math Numerical Analysis

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

S56 (5.1) Polynomials.notebook August 25, 2016

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018

Dividing Polynomials

Stabilization and Acceleration of Algebraic Multigrid Method

POLYNOMIALS. Maths 4 th ESO José Jaime Noguera

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

Letting be a field, e.g., of the real numbers, the complex numbers, the rational numbers, the rational functions W(s) of a complex variable s, etc.

The minimal polynomial

A Fast Algorithm for Computing High-dimensional Risk Parity Portfolios

Lesson 2.1: Quadratic Functions

Chapter 3: Polynomial and Rational Functions

5.1 Monomials. Algebra 2

ETNA Kent State University

Computational Methods for Engineers Programming in Engineering Problem Solving

x 3 2x = (x 2) (x 2 2x + 1) + (x 2) x 2 2x + 1 = (x 4) (x + 2) + 9 (x + 2) = ( 1 9 x ) (9) + 0

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

Scientific Computing. Roots of Equations

GENG2140, S2, 2012 Week 7: Curve fitting

Numerical Analysis Fall. Roots: Open Methods

Synthetic Substitution

Chapter 8. Exploring Polynomial Functions. Jennifer Huss

Learning Objectives. Zeroes. The Real Zeros of a Polynomial Function

1) Synthetic Division: The Process. (Ruffini's rule) 2) Remainder Theorem 3) Factor Theorem

ON THE GLOBAL KRYLOV SUBSPACE METHODS FOR SOLVING GENERAL COUPLED MATRIX EQUATIONS

Transcription:

24 CHAPTER 2 EXTRACTION OF THE QUADRATICS FROM REAL ALGEBRAIC POLYNOMIAL 2.1 INTRODUCTION Polynomial factorization is a mathematical problem, which is often encountered in applied sciences and many of the engineering disciplines. Development of numerical methods for root-extraction of algebraic polynomials is very much essential for higher order polynomial. In general, the root extraction is based on an initial approximation of one or two roots. The convergence on the result depends mainly on the nearness of the approximate root to the actual one. The problem of convergence on inaccurate results or divergence from actual roots due to improper initial approximation which is applied to numerical algorithms is addressed in this chapter. The numerical technique incorporating the methodologies for obtaining close initial approximate quadratic factor and error correcting technique are presented in the subsequent sections. The application of this technique to solve different class of polynomials is the central theme of this research work.

25 2.1.1 Nature of the Problem The literature study reveals that the iterative algorithms for obtaining the roots of an algebraic equation essentially begin with initial approximation and then provide a sequence of iterations converging to a root in the limit. This initial approximation should be sufficiently close to one of the roots to assure the convergence to accurate results. Consider a monic polynomial, P n (x) = a n x n + a n-1 x n-1 + + a 1 x + a 0 (2.1) where n is degree and a i s are real coefficients with a n =1. The roots of the polynomial equation can be determined by extracting the quadratic factors from the polynomial. The roots of a quadratic polynomial can be determined using a known closed form formula. Let D 2 (x) be an approximate quadratic factor of the polynomial P n (x). If P n (x) is divided by this factor D 2 (x), then a quotient polynomial Q n-2 (x) of degree (n-2) and a remainder polynomial R 1 (x) of degree one are obtained, following the remainder theorem in appendix (A1.2.7). Thus, the polynomial P n (x) can be written as P n (x) = D 2 (x) Q n-2 (x) + R 1 (x) (2.2)

26 where D 2 (x) = x 2 + px + q (2.3) Q n-2 (x) = b n-2 x n-2 + b n-3 x n-3 + + b 0 ; b n-2 =1 (2.4) R 1 (x) = e 1 x + e 2 (2.5) The coefficients e 1 and e 2 in the remainder polynomial R 1 (x) are the errors caused due to the approximation of the coefficients p and q in the divisor D 2 (x). If D 2 (x) is an exact factor of P n (x), then e 1 = e 2 =0. This chapter concentrates on determining a numerical method to arrive at the approximate quadratic factor D 2 (x) and develop an error correction technique which is applied in the successive iterations to refine this D 2 (x) such that e 1 and e 2 in R 1 (x) approach zero, conditioned by a specified error tolerance. 2.2 METHOD FOR THE EXTRACTION OF INITIAL QUADRATIC FACTOR The initial approximate quadratic factor D 2 (x) can be extracted from the coefficients of the polynomial P n (x), a n, a n-1, a n-2 a 1, a 0 by a (n+1) level triangular formation as shown in the Table 2.1. Let A n+1,n+1 denote the two dimensional triangular formation for extracting quadratic factor D 2 (x) from P n (x). a i,j A ( 0 ( 0 and the column index j denotes the coefficients of the polynomial in decending order.

27 An upper triangle is formed from 0 th level to n th level of rows by reducing column size by one at every level. The 0 th level of the triangular formation represents the coefficients of P n (x). This brings out the following relation; a 0,n = a n, a 0,(n-1) = a (n-1),, a 0,k = a k,, a 0,0 = a 0 where a 0,k is a k th element in the 0 th level in the triangular formation and a k is the coefficient of x k term in P n (x). The n th level represents the coefficient of P 0 (n). The 0 th level of triangular formation is assigned with the coefficients of the polynomial P n (x) in Equation (2.1) as a 0,j = a j ; j = 0, 1,, n (2.6) Each element in the 1 st level of the triangular formation is determined using the following relation a 1,j = a 0,(j+1) + a 0,j ; j = 0, 1,, n-1 (2.7) This reduces the degree of the polynomial to (n-1). The elements in the 2 nd level are determined using the following relation a 2,j = a 1,(j+1) + a 1,j ; j = 0, 1,, n-2 (2.8) Similarly, the elements in the third row are determined using the following relation a 3,j = a 2,(j+1) + a 2,j ; j = 0, 1,, n-3 (2.9)

28 And so on, until n th row of the triangular formation. In general, every element in each row in the triangular formation is generated using the following recurrence relation a (i+1),j = a i,j + a i,(j+1) ;the row index i = 0,1,, n ; the coefficient index j = 0, 1,, n-i (2.10) Table 2.1 Extraction of Initial Approximate Quadratic Factor Level Degree The Coefficients of P n (x) 0 n a 0,n a 0,(n-1) a 0,(n-2) a 0,(n-3) a 0,1 a 0,0 1 n-1 a 1,(n-1) a 1,(n-2) a 1,(n-3) a 1,1 a 1,0 2 n-2 a 2,(n-2) a 2,(n-3) a 2,1 a 2,0 : : : : : : n-2 2 a (n-2),2 a (n-2),1 a (n-2),0 n-1 1 a (n-1),1 a (n-1),0 n 0 a n,0 The initial approximate quadratic factor is extracted at the (n-2) th row. The elements a (n-2),2, a (n-2),1 and a (n-2),0 form the coefficients of the extracted quadratic factor as D 2 (x) = a (n-2),2 x 2 + a (n-2),1 x + a (n-2),0 (2.11) The above Equation (2.11) is made monic as D 2 (x) = x 2 + (a (n-2),1 / a (n-2).2 )x + (a (n-2),0 / a (n-2),2 ) (2.12)

29 can be written as In general, the extracted initial approximate quadratic factor D 2 (x) = x 2 +p 0 x+q 0 (2.13) where p 0 = (a (n-2),1 / a (n-2),2 ) and q 0 =(a (n-2),0 / a (n-2),2 ). 2.2.1 Quadratic Synthetic Division (Paolo Ruffini 1809) The division of the polynomial Equation (2.1) by the initial quadratic factor Equation (2.13) is carried out by the standard quadratic synthetic division scheme as b k = a k - pb k-1 - qb k-2 ; k = 0, 1,, n (2.14) The quotient polynomial Q n-2 (x) = b n x n-2 +b n-1 x n-3 + +b 2 and the remainder polynomial R 1 (x) = b 1 x+b 0 are obtained from the above Equation (2.14). The remainder coefficients b 1 and b 0 are errors caused due to the approximation of p 0 and q 0 values in D 2 (x). 2.3 ERROR CORRECTION AND CONVERGENCE This iterative numerical technique begins with the approximate coefficients p 0 and q 0 of the extracted initial quadratic factor D 2 (x) in Equation (2.13), which are then successively corrected iteration by iteration such that the error coefficients e 1 =b 1 and e 2 =b 0 in the remainder polynomial obtained from Equation (2.14) should approach zero, within a specified accuracy limit. This can be achieved by applying the following error correcting technique. The bisection principle is also used to converge the quadratic to actual results.

30 2.3.1 Error Correction in the Initial Quadratic Factor Let (p t, q t ) be the true values of p and q in Equation (2.3) and Then p t t (2.15) The computation of the error corrections to the coefficients of initial approximant in Equation (2.3) is formulated as 1 2/n. (2.16) where n is the degree of P n (x) and e 1 and e 2 are the error coefficients in the remainder R 1 (x). 0, q 0 be the initial values of p and q, then the improved values for the first iteration are p 1 = p 0 1 = q 0 1 and q 1 are evaluated, the quadratic synthetic division is repeated, and the next improved p 2 and q 2 are determined from the relation p 2 = p 1 and q 2 = q 1 In general, the improved coefficients for the k th iteration are p k =p k-1 q k =q k-1 (2.17) k-1 and q=q k-1. accuracy.

31 2.3.2 Stopping Criterion Let p k and q k be the coefficients of D 2 (x) at k th iteration and p k+1 and q k+1 be the coefficients of D 2 (x) at (k+1) th iteration. In this error correcting technique, the change in the values from p k to p k+1 and q k to q k+1 in the two consecutive iterations are measured as the absolute errors. The process of iteration is terminated when desired level of accuracy is obtained. An objective criterion for terminating the iteration process is formulated as p k+1 p k a and q k+1 q k a a is an absolute error or Iterations iterations. a considered in this chapter is 10-6 for the printing purpose. Hence the obtained results are rounded up to the accuracy limit of 10-6. However, the error tolerance can be extended to any higher limit based on the storage class in the implementation. 2.3.3 Convergence using Bisection Principle Any sign change from p k to p k+1 or q k to q k+1 in the successive iterations observed in Equation (2.17) indicates that the iterative process crosses the actual roots of the quadratic D 2 (x), following intermediate value property in A1.2.4. In order to bracket the roots within the coefficient intervals (p k to p k+1 ) and (q k to q k+1 ), the bisection technique is employed to enhance the convergence rate.

32 The midpoints are found to update the coefficients of D 2 (x) for the next iteration as p k+2 = (p k+1 + p k ) / 2 q k+2 = (q k+1 +q k ) / 2 (2.18) The repetition of error correcting technique and bisection principle is to be terminated when p and q have been obtained to the desired accuracy. Equation (2.17) as The convergence rate for p and q are determined from k = p k+1 - p k k = q k+1 - q k Let p k+1 = g(p k ), k = 0,1,2, q k+1 = g(q k ), k = 0,1,2, Let g(p k ) = p k + (e 1 / n) g(q k ) = q k + ( e 2 / n) Therefore g'(p k ) = g'(q k ) = 1. Hence, the scheme converges linearly. Since the convergence is linear to achieve a high degree of accuracy, a large number of iterations may be needed for some class of polynomial. However, the bisection technique is guaranteed to converge.

33 2.3.4 The Deflated Polynomial Let the extracted Quadratic factor be D 2 (x) = (x 2 + px + q) (2.19) The polynomial P n (x) can be divided by the Equation (2.18) using standard synthetic division, following the factor theorem property in A1.2.6 as Q n-2 (x) = P n (x) / D 2 (x) = b n x n-2 +b n-1 x n-3 + +b 3 x+b 2 ; b n =1 (2.20) where Q n-2 (x) is called as the deflated polynomial. In this case, the remainder polynomial R 1 (x) = 0 as the coefficients b 1 and b 0 in Equation (2.20) approach zero. The degree of the polynomial is reduced by 2. The next quadratic factor can be obtained in the similar process from the deflated polynomial. The application of this procedure is repeated until the degree of the polynomial becomes less than or equal to 2. 2.4 ALGORITHM FOR EXTRACTING ALL QUADRATICS In this section, the computational algorithms for the numerical technique incorporating the methodologies described in sections 2.2 and 2.3 to extract the quadratics of the polynomial P n (x) are presented. These algorithms are tested and analysed for a given P n (x) in the next section.

34 2.4.1 Algorithm for Initial Quadratic Factor The computational algorithm for the methodology formulated in section 2.2 to extract the initial quadratic is presented in this section. The computation involves only two rows in the formation of initial approximate quadratic factor D 2 (x) from the Table 2.1. The second row is determined from the first row and the first row is updated with the second row. The column size is reduced by 1 in successive iteration. The pseudo code of the algorithm for this scheme is deduced as: Algorithm 2.1 (Extracting the initial approximate quadratic D 2 (x) using Triangular Method): This algorithm extracts the initial approximate quadratic factor D 2 (x) from the given polynomial P n (x) = a n x n + a n-1 x n-1 + a n-2 x n-2 + +a 1 x+a 0, where n is the degree and a n, a n-1, a n-2,,a 1 and a 0 are real coefficients. Algorithm Initial_ApproxQuad(P n (x), n) /* The input parameters are the coefficients a n, a n-1,, a 1, a 0 and the degree n of P n (x). */ Step 1: // Triangular formation to extract initial quadratic D 2 (x) For i = 1 to n-2 do // Level of triangular formation For j = 0 to n-i do // Coefficient index Compute bj = a j + a j+1 ; Set a j = b j ; EndFor EndFor Step 2: // Coefficients of initial quadratic D 2 (x) Compute p = a 1 / a 2 and q = a 0 / a 2 ; Step 3: Write p, q; End Initial_ApproxQuad. Figure 2.1 Extracting the Initial Approximate Quadratic D 2 (x) using Triangular Method

35 The 0 th level of triangular formation is considered to be the coefficients of P n (x). The step 2 in the above algorithm shown in Figure 2.1, computes the relation for extracting initial quadratic in Equation (2.10). This step performs n(n+1)/2 additions only. The procedure is terminated at (n-2) th row to obtain the three elements to form the initial quadratic, thus saves three addition operations. Therefore, the total addition operations performed by this procedure is ((n(n+1)/2)-3); assume addition operation takes unit time. The step 3 calculates the initial coefficients p and q of D 2 (x). 2.4.2 Algorithm for Extracting all Quadratics This algorithm invokes the algorithm 2.1 for extracting initial quadratic factor. The algorithm applies the error correction and convergence technique presented in section 2.3 to refine the initial quadratic to converge to actual D 2 (x) and also determines the deflated polynomial using standard quadratic synthetic division method. Algorithm 2.2 (Error Correction and Convergence of initial D 2 (x) in Triangular Method): This algorithm extracts an actual quadratic factor D 2 (x) = x 2 +px+q from a polynomial P n (x) = a n x n +a n-1 x n-1 + +a 1 x+a 0 of degree n and determines the deflated polynomial Q n-2 (x)=b n x n-2 +b n-1 x n- 3 + + b 3 x +b 2.

36 Algorithm Quad_Poly(P n (x),n) /* The input parameters are the coefficients a n, a n-1,, a 1, a 0 and the degree n of P n (x). */ Step 1: Set -6 ; // Accuracy limit Step 2: // Invoke algorithm 2.2 to extract the initial quadratic D 2 (x) Call Initial_ApproxQuad(P n (x),n); Step 3: // Error correction in the initial quadratic D 2 (x) For k = (n-1) to 0 do Compute b k = a k - pb k-1 - qb k-2 ; EndFor Compute 1 0/n; Compute p new new Step 4: // Convergence using Bisection principle If (sign(p) new) or sign(q) new)) Then Compute p new = ( p new + p ) / 2 ; Compute q new = ( q new + q ) / 2 ; EndIf Step 5: // Stopping criterion If ( ( p new or ( q new Then Set p = p new ; and q = q new ; goto 2; Else Write The Extracted Quadratic Factor is, x 2 + p new x +q new ; Write The coefficients of the deflated polynomial Q n-2 (x) are, b n, b n-1,, b 2; EndIf Step 6: // Update P n (x) after extracting D 2 (x) Set n = n-2; Set P n (x) = Q n-2 (x); End Quad_Poly. Figure 2.2 Error Correction and Convergence of Initial D 2 (x) in Triangular Method

37 In step 3 in the above algorithm shown in Figure 2.2, the error coefficients b 1 and b 0 in R 1 (x) are obtained by synthetic division of P n (x) by D 2 (x). These values are used for refining the approximate coefficients p new = b 1 /n and q new = b 1 /n in D 2 (x). For the next iteration, the updated new p new and q new of D 2 (x) are used for synthetic division. This process takes O(n) computations. Step 4 checks whether the iteration is crossing the actual results. If so, it applies the bisection technique to converge the iteration to the actual results. The absolute errors are measured with the coefficients p and q for two consecutive iterations as p new p and q new q in step 5. When the errors reach the tolerance limit of 10-6, the process of iteration is terminated and the obtained results are rounded up to this accuracy limit. 2.4.3 Generalized Algorithm for Solving Algebraic Polynomial The techniques presented in sections 2.2 and 2.3 can also be applied for ill-conditioned polynomial. This section presents a procedure to handle ill-conditioned polynomial and the procedure is incorporated with the methodologies described in sections 2.2 and 2.3 to develop a generalized algorithm for solving a given of polynomial. 2.4.3.1 Handling Ill-conditioned Polynomial If any coefficient a i (0 n(x) in Equation (2.1) is found negative, then the following procedure is to be applied before starting the step 2 in the algorithm2.2 Quad_Poly. Let S = n i 1 a (2.21) i where S is the sum of the coefficients of P n (x) except a 0 in Equation (2.1).

38 The condition a 0 the ill-conditioning of P n (x). This section handles this condition by inversing the polynomial. Now the Equation (2.1) becomes P n (1/x) = a n (1/x) n+1 + a n-1 (1/x) n-1 +... +a 0 (2.22) The Equation (2.21) can be written as P n (1/x) = a 0 x n + a 1 x n-1 +... + a n-1 x + a n (2.23) Scale the Equation (2.22) by a 0 to convert it into monic polynomial as P n (1/x) = x n + (a 1 /a 0 )x n-1 + + (a n-1 / a 0 )x + (a n / a 0 ) (2.24) The equation (2.24) can be easily determined from equation (2.23) by the following procedure. Algorithm 2.3 (Handling Ill-conditioned polynomial P n (x) in Triangular Method): This algorithm inverses the ill-conditioned polynomial P n (x) and scales it to convert into monic polynomial, shown in Figure 2.3. Algorithm Inverse_Poly(P n (x),n) /* The input parameters are the coefficients a n, a n-1,, a 1, a 0 and the degree n of P n (x). */ Step 1: For i=0 to n do Set b[n-i] = a[i]; EndFor Step 2: For i= 0 to n do Compute a[i] = b[i] / b[n]; EndFor End Inverse_Poly Figure 2.3 Handling Ill-conditioned Polynomial P n (x) in Triangular Method

39 Thus, this section develops a generalized algorithm which extracts all quadratics of any of polynomial of degree n with real coefficients. The algorithm is deduced as Algorithm 2.4 (Generalised Algorithm for Extracting (n/2) quadratics D 2 (x) from P n (x) by Triangular method): This algorithm solves a polynomial P n (x) = a n x n + a n-1 x n-1 + a n-2 x n-2 + + a 1 x + a 0 of degree n by extracting (n/2) quadratic factors x 2 +px+q. Algorithm Solve_Poly(P n (x),n) /* The input parameters are the coefficients a n, a n-1,, a 1, a 0 and the degree n of P n (x). */ Step 1: // Criterion and Handling the ill-condition of P n (x) If a i < 0 (0 Then Compute S = EndIf If a 0 > S Then n i 1 a ; Call Inverse_Poly(P n (x),n); EndIf Step 2: While (n > 2) Call Quad_Poly(P n (x),n); EndWhile End Solve_Poly. i Figure 2.4 Generalised Algorithm for Extracting (n/2) Quadratics D 2 (x) from P n (x) by Triangular Method

40 The step1 in the algorithm shown in Figure 2.4, handles the illconditioning of the polynomial P n (x). If the polynomial is found illconditioned, it is handled in by inversing it. The roots obtained from the ill-conditioned polynomial must be inverted back to get the actual roots. The algorithms 2.1, 2.2, 2.3 and 2.4 presented in this section are simple and straightforward to be implemented using any programming language. 2.5 NUMERICAL ILLUSTRATIONS The numerical procedure presented in this chapter for generating the initial quadratic factor and extracting all quadratics is tested on different class of polynomials in Equation (2.1). The numerical algorithms are implemented in C language and executed in a computing machine with the configuration Intel Core2 Duo CPU, 1.2GHz and 2GB RAM. In this section, three different illustrative test polynomials are taken such as polynomial having complex roots only, polynomial with cluster roots and an ill-conditioned polynomial with roots distributed in all the quadrants of complex plane. The illustrative examples show the performance efficiency of the methodologies present in this chapter. 2.5.1 Illustration 1 Consider the given polynomial to be: P 8 (x) = x 8 +9x 7 +39x 6 +103x 5 +183x 4 +227x 3 +205x 2 +133x+60 (2.25)

41 The degree of the above polynomial is even and all the coefficients are positive integers. All the quadratics are extracted, thus the polynomial is solved using the algorithm Quad_Poly(P n (x),n) as explained in 2.4.2. The results are tabulated in the Table 2.2. The execution time is measured for solving the polynomial Equation (2.25) in terms of milliseconds. Table 2.2 Extraction of Quadratics of the Polynomial in Equation (2.25) using Triangular Method Order of P n (x) Initial Quadratic D 2(x) Deflated Polynomial Q n-2 (x) Extracted Quadratic D 2 (x) Roots of D 2 (x) Exe. Time (ms) 8 x 2 +1.456931x+1.693525 x6 + 6x 5 + 17x 4 + 28x 3 + 31x 2 + 22x + 15 x 2 +3x+4-1.5 ± j1.322878 6 x 2 +1.437037x+1.548148 x 4 +4x 3 +6x 2 +4x+5 x 2 +2x+3-1 ± j1.414214 4 x 2 +1.333333x+1.266667 x 2 +4x+5 x 2 +1 0 ± j1 0.307 2 - - x 2 +4x+5-2 ± j2 2.5.2 Illustration 2 Consider the polynomial P 4 (x) = x 4 +6.2x 3 +13.915x 2 +13.33x+4.62 (2.26) The equation has even degree and positive real coefficients. The polynomial is solved using the algorithm 2.3 Quad_Poly(P n (x),n) and the results are tabulated in Table 2.3. The two quadratic factors and two pairs of cluster roots are obtained in 0.156 milliseconds using the algorithm 2.3. The proposed procedure for solving P 4 (x) in Equation (2.26) is illustrated in Appendix 3.

42 Table 2.3 Extraction of Quadratics of the Polynomial in Equation (2.26) using Triangular Method Order of P n (x) Initial Quadratic D 2 (x) Deflated Polynomial Q n-2 (x) Extracted Quadratic D 2 (x) Roots of D 2 (x) Exe. Time (ms) 4 x 2 +1.733797x+1.654705 x 2 +4.1x+4.2 x 2 +2.1x+1.1-1, -1.1 2 - - x 2 +4.1x+4.2-2, -2.1 0.156 2.5.3 Illustration 3 Consider the polynomial P(x) = x 4 + 4x 3-7x 2-22x + 24 (2.27) The order of the polynomial equation (2.27) is even and it has negative coefficients. It is found that the coefficient a 0 is greater than the sum of other coefficients i.e. a 4 +a 3 +a 2 +a 1. In this case, the algorithm 2.3 Inverse_Poly is applied to solve this above polynomial (2.27). The inverted polynomial is obtained from algorithm 2.3 as P(1/x) = x 4-0.916667x 3-0.291667x 2 +0.166667x+ 0.041667 (2.28) Since the polynomial (2.27) is inverted and the roots of the inverted extracted quadratics are obtained. The roots are again inverted to get the actual roots. This task is accomplished in 0.171milliseconds. And the results are tabulated in the Table 2.4.

43 Table 2.4 Extraction of Quadratics of the Polynomial in Equation (2.27) using Triangular Method Order of P n (x) Initial Quadratic D 2 (x) 4 x 2 + 1.185185x - 0.074074 Deflated Polynomial Q n-2 (x) x 2-1.5x + 0.5 Extracted Quadratic D 2 (x) x 2 + 0.58333x + 0.083333 2 - - x 2-1.5x+0.5 Roots of D 2 (x) Exe. Time (ms) -0.25, -0.333333 Inverted Roots: -4, -3 0.171 1, 0.5 Inverted Roots: 1, 2 2.6 RESULTS AND DISCUSSIONS The observations made from the test illustrations 2.5.1, 2.5.2 and 2.5.3 are discussed here. The execution times measured in illustrations 2.5.1, 2.5.2 and 2.5.3 are comparable with Bairstow method. The initial approximate quadratic is obtained from the original given polynomial by the methodology discussed in section 2.2. Then quadratic synthetic division is carried out and error correction is applied to refine the original guess quadratic as discussed in section 2.3. Thus, the actual quadratic factor and the deflated polynomial are derived. Again the initial approximate quadratic is obtained from the deflated polynomial and the process is continued until all the quadratics is extracted. This guarantees that the method converges on accurate results. The bisection technique deployed during error correction process enhances the convergence rate.

44 In test illustration 2.5.3, it is found that the polynomial has negative coefficients. Then the coefficient value a 0 i.e. 24 is compared with the sum of other coefficients which is -24. In this case, a 0 is not lesser than the sum of remaining coefficients. This shows the illconditioning of the polynomial Equation (2.27). Hence, the polynomial is inverted and the proposed scheme is applied. In order to get the actual roots, the obtained roots are again inverted. 2.7 APPLICATION OF EXTRACTED INITIAL QUADRATIC TO BAIRSTOW METHOD Bairstow (1920) proposed a numerical technique which begins with an initial approximate quadratic to extract the actual quadratics of the polynomial P n (x). Lins (1922) suggested an initial approximant quadratic for Bairstow method. Birtwistle (1967) and Arthur (1972) examined the possibility of improving Bairstow's algorithm for finding the roots of polynomials with real coefficients. However, the Lins- Bairstow method is found divergent or converge to inaccurate results for certain types of polynomials. Hence, the initial approximate quadratic D 2 (x) extracted in section 2.1 can be suitably applied to Bairstow method. This application ensures Bairstow method converges on actual results. The relations in Equations (2.31) and (2.32) follow the Bairstow method to compute the error corrections in the approximate coefficients p and q in D 2 (x). Let the relation to determine c k using b k from Equation (2.4) be

45 c k = b k pc k-1 qc k-2 ;k=1,2,,n-1 and c 0 =1, c -1 = 0 (2.29) Let Det = (c n-2 ) 2 - c n-3 (c n-1 b n-1 ) (2.30) and (2.30) are computed as 2.29) nc n-3 - b n-1 c n-2 ) / Det (2.31) and n-1(c n-1 b n-1 ) b n c n-2 ) / Det (2.32) (2.32) are substituted in Equation (2.17) to improve the approximate values p and q of the initial quadratic factor D 2 (x). In step 3 of algorithm 2.2, the relations (2.29) to (2.32) are computed to find new p and q of D 2 (x) for the next iteration. The Bairstow method with the initial approximant D 2 (x) extracted in section 2.2 is tested for different class of polynomial. Three test polynomials are undertaken in this section such as a polynomial with many missing terms and having only complex roots, an illconditioned polynomial having roots distributed in all the quadrants of complex plane and a polynomial with very small cluster roots. In this section, along with the initial approximant D 2 (x), two other approximate quadratics are considered to analyse the performance of Bairstow method in every test. Let L 2 (x) be a Lins approximate which is formed from P n (x). This initial quadratic is written as L 2 (x) = x 2 + l 1 x+ l 2 where l 1 = (a 1 /a 2 ) and l 2 = (a 0 /a 2 ) ; a 2, a 1 and a 0 are the coefficients in P n (x). Let C 2 (x) = x 2 + c 1 x + c 2 be an approximate quadratic where the coefficients c 1 and c 2

46 are assigned with constant values i.e c 1 =0.5 and c 2 =0.5. The performances of Bairstow method with the initial approximant D 2 (x), Lins approximation L 2 (x) and a constant approximation C 2 (x) are compared in these tests. 2.7.1 Illustration 4 Consider the given polynomial to be: P 12 (x) = x 12 +x 8 +x 6 +10000 (2.33) The degree of the above polynomial is even and all the coefficients are positive. The given polynomial is found ill-conditioned as many of the terms are zero. The roots of P 12 (x) are complex and distributed in both quadrants: -2.0746±0.565j, -1.5306±1.5281j, -0.5617±2.0756j, 2.0746±0.565j, 1.5306±1.5281j and -0.5617±2.0756j. The results of Bairstow method with initial approximant D 2 (x), Lins approximation and a constant approximation are shown in the Table 2.5. Bairstow method finds all the roots of the polynomial (2.33) in 74 iterations using the initial approximant D 2 (x) whereas it takes 157 iterations with the approximation C 2 (x) and it does not converge with Lins approximation. 2.7.2 Illustration 5 Consider the polynomial P(x) = x 5 -x 4-4x 3 +4x 2-5x-75 (2.34) The polynomial Equation (2.34) is ill-conditioned as a 0 > a n +a n-1 + +a 1. The roots are real and complex and distributed in

47 both quadrants of complex plane: 3, 1±2j and -2±1j. The initial approximant D 2 (x) is used to solve the polynomial. The Bairstow solves the polynomial (2.34) in 27 iterations with D 2 (x) whereas it does not converge for other approximations C 2 (x) and L 2 (x). The results are tabulated in Table 2.6. Table 2.5 Application of Triangular Approximation to Bairstow Method in Equation (2.33) and Comparison with Other Approximations Order P n (x) 12 10 8 6 4 2 D 2 (x) C 2 (x) L 2 (x) D 2 (x) C 2 (x) L 2 (x) D 2 (x) C 2 (x) L 2 (x) D 2 (x) C 2 (x) L 2 (x) D 2 (x) C 2 (x) L 2 (x) D 2 (x) C 2 (x) L 2 (x) Initial Quadratic p = 0.885714 q = 24.416667 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = p = 2.016606 q = 3.746716 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = p = 2.070994 q = 3.935424 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = p = 2.741056 q = 4.107526 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = p = 0.351337 q = -0.828390 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = p = -3.061298 q = 4.677916 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = (a 0 /a 2 ) = Extracted Factor D 2 (x) x 2-4.149261x+ 4.623479 x 2-4.149261x+4.623479 Does not converge x 2 +3.061298x+4.677916 x 2 +1.12340x +4.623584 Does not converge x 2 + 4.149261 x+4.623479 x 2 + 4.149261 x+4.623479 Does not converge x 2 +1.123408 x+4.623584 x 2-1.123408 x + 4.623584 Does not converge x 2-1.123408 x + 4.623584 x 2 +3.061298 x +4.677916 Does not converge x 2-3.061298x + 4.677916 x 2-3.061298x + 4.677916 Does not converge Roots of D 2 (x) 2.074631 ±j0.565143 2.074631 ±j0.565143-1.530649 ±j1.528080-0.561704 ±j2.075590-2.074631 ±0.565143j -2.074631 ±0.565143j -0.561704 ±2.075590j 0.561704 ±2.075590j 0.561704 ±2.075590j -1.530649 ±1.528080 1.530649 ±1.528080j 1.530649 ±1.528080j No. of Iterations 35 107 7 8 16 21 8 8 9 13 - -

48 Table 2.6 Application of Triangular Approximation to Bairstow Method in Equation (2.34) and Comparison with other Approximations Order P n (x) Initial Quadratic Extracted Factor D 2 (x) Roots of D 2 (x) No. of Iterations 5 3 p = 0.6 q = 8.2 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = -1.25 (a 0 /a 2 ) = -18.75 p = -1.5 q = 1 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = -3.26 (a 0 /a 2 ) = -38.45 x 2 + 4.000000 x +5.000000 Does not converge Does not converge x 2-2.000000 x + 5.000000 Does not converge Does not converge -2.000000 ±j1.000000 1.000000 ±j2.000000 1 - x -3.000000 3.000000-16 5 2.7.3 Illustration 6 Consider the polynomial P(x) = x 8 +118x 7 +x 6 +2x 5-2x 4-3x 3 +3x 2 +2x+1 (2.35) The order of the polynomial Equation (2.35) is even and it has negative coefficients. It is found that the polynomial is ill-conditioned as

49 the coefficient a 7 is greater than the sum of other coefficients i.e. (a 8 +a 6 +a 5 +a 4 +a 3 +a 2 +a 1 +a 0 ). The polynomial (2.35) has both real and complex roots. These roots are far away distributed in the complex plane: -117.99167, - 0.503121, -0.258820 ± j0.322420, -0.004850 ± j0.542874 and 0.511066 ± j0.270472. Matlab does not show the real part of complex roots as considered to be very small compared to other roots. Bairstow method solves this polynomial with the initial approximant D 2 (x) using lesser iterations compared to other approximations. The results are shown in the Table 2.7. 2.7.4 Results and Discussion The initial approximate quadratic D 2 (x) is obtained by the scheme presented in 2.2 from the given polynomial. Then Bairstow procedure is carried out and error correction is applied to refine the original guess quadratic. Thus, the actual quadratic factor and the deflated polynomial are derived. Again the initial approximate quadratic is obtained from the deflated polynomial and the process is continued until all the quadratics are extracted. The Bairstow method is repeated for other initial guesses such as Lins approximation L 2 (x) and constant approximation C 2 (x). Even though Bairstow method has high convergence rate, in some cases it is observed that it may either diverge or converge on inaccurate results. But, the illustrative examples show that the triangular method proposed in the section2.2 guarantees the performance of Bairstow method to converge on accurate results for any class of polynomial whether it is well conditioned or ill-conditioned.

50 Table 2.7 Application of Triangular Approximation to Bairstow Method in Equation (2.35) and Comparison with other Approximations Order P n (x) 8 6 4 2 Initial Quadratic p = 0.123955 q = -0.026462 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = -0.666667 (a 0 /a 2 ) = -0.333333 p = -0.270620 q = -0.103837 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = -0.001328 (a 0 /a 2 ) = -0.335327 p =0.177765 q =-0.299917 c 1 = 0.5 c 2 = 0.5 (a 1 /a 2 ) = 0.481208 (a 0 /a 2 ) = -0.159110 - - - Extracted Factor D 2 (x) x 2 +0.517640 x +0.170943 x 2 +0.009701 x +0.294736 x 2 +118.4948x + 59.36407 x 2 +118.4948x + 59.36407 x 2 +0.517640 x +0.170943 x 2 +0.517640 x +0.170943 x 2-1.022131 x + 0.334343 x 2 +118.4948x + 59.36407 x 2 +0.009701 x +0.294736 x 2 +0.009701 x +0.294736 x 2-1.022131 x + 0.334343 x 2-1.022131 x + 0.334343 Roots of D 2 (x) -0.258820 ±j0.322420-0.004850 ±j0.542874-0.503121-117.99167-0.503121-117.99167-0.258820 ±j0.322420-0.258820 ±j0.322420 0.511066 ±j0.270472-0.503121-117.99167-0.004850 ±j0.542874-0.004850 ±j0.542874 0.511066 ±j0.270472 0.511066 ±j0.270472 No. of Iterations 7 30 1757 34 7 11 12 28 9 - - - In test illustration 4, initial approximant D 2 (x) accelerates the Bairstow method to converge 53% faster than the approximation C 2 (x), whereas Bairstow method does not converge for Lins approximation L 2 (x). Bairstow method converges only for the initial approximant D 2 (x)

51 and diverges for other approximations C 2 (x) and L 2 (x) in illustration 5. In this case, the initial approximant D 2 (x) proves 100% better than other approximations. In illustration 6, the quadratic D 2 (x) is 18.46% faster than the approximation C 2 (x) and 94% better than the Lins approximation L 2 (x). Thus, the methodology presented in 2.2 can be treated as a global method for generating initial approximations for solving algebraic polynomial of any class. 2.8 CONCLUSION In this chapter, a numerical technique incorporating the methodologies for extracting initial approximant and correcting residue error to obtain the actual quadratics of an algebraic polynomial is presented in the sections 2.2 and 2.3. The appropriate algorithms are developed in the section 2.4. The error correcting process is enhanced, since the initial quadratic approximant is extracted from the given polynomial. The proposed method is reliable in finding both real and complex roots of a given polynomial up to a chosen accuracy. The method is also suitable for ill-conditioned polynomial. For the ill-conditioned polynomial such as polynomial having very large coefficients, negative coefficients and missing terms, it is suggested in the section 2.4.3.1 that the polynomial can be inverted and scaled, and then the present method can be used to extract all the quadratics. The illustrative examples shown in the section 2.5 prove that the method is simple to be implemented using any programming language. As shown in section 2.7 the proposed procedure for initial approximation can be

52 treated as the first step in Bairstow method. The same procedure can be applied to other root-finding numerical procedures. However, the procedure is found slower for certain ill-conditioned polynomials. The reason for the slow convergence is attributed to the fact that the error correction process does not depend upon the relative location of the roots of the polynomial. In chapter 3, a method is proposed in which the extraction of initial approximation and error correction technique follow the characteristic of the roots of the given polynomial. This scheme accelerates the convergence.