# Graeffe’s Method For Calculating All The Real Roots of a Polynomial

by admin in Math, Statistics, and Optimization , MATLAB Family , Roots of Equation on June 14, 2019**Graeffe’s method** or **Dandelin–Lobachesky–Graeffe method** is an algorithm for finding all of the roots of a polynomial. It was developed independently by Germinal Pierre Dandelin in 1826 and Lobachevsky in 1834. In 1837 Karl Heinrich Gräffe also discovered the principal idea of the method.^{[1]} The method separates the roots of a polynomial by squaring them repeatedly. This squaring of the roots is done implicitly, that is, only working on the coefficients of the polynomial. Finally, Viète’s formulas are used in order to approximate the roots.

### Example On Using This Code:

**Input**

f [email protected](x) x^3 - 2*x - 5; % polynomial we interest to solve co = [1 0 -2 -5]; % polynomial coefficients err = 0.1; % tolerance gcount = 5; % Iteration number ROOTS = GraeffeFunc(co,gcount); % Calling GraeffeFunc

**Output**

[2.094553557477412 1.515329510248320 1.575329673684891] ROOTS = [2.0946 1.5153 1.5753] X = 2.0946 IS Real Root with tollerance f(x) = 2.317e-05 X = 1.5153 IS in place of Imaginary Root X = 1.5753 IS in place of Imaginary Root

### Contents

- Dandelin–Graeffe iteration
- Classical Graeffe’s method
- Tangential Graeffe method
- Renormalization
- References

### Dandelin–Graeffe Iteration

Let *p*(*x*) be a polynomial of degree n

Then

Let *q*(*x*) be the polynomial which has the squares **x_(1)^2,… ,x_(n)^2** as its roots,

Then we can write:

*q*(*x*) can now be computed by algebraic operations on the coefficients of the polynomial *p*(*x*) alone. Let:

then the coefficients are related by

Graeffe observed that if one separates *p*(*x*) into its odd and even parts:

then one obtains a simplified algebraic expression for *q*(*x*):

This expression involves the squaring of two polynomials of only half the degree, and is therefore used in most implementations of the method. Iterating this procedure several times separates the roots with respect to their magnitudes. Repeating *k* times gives a polynomial of degree n:

with roots

If the magnitudes of the roots of the original polynomial were separated by some factor **rho > 1**, that is, **|x_(k)| >= rho |x_(k+1)|**, then the roots of the *k*-th iterate are separated by a fast growing factor

.

### Classical Graeffe’s Method

Next the Vieta relations are used

If the roots **x_(1),… ,x_(n) **are sufficiently separated, say by a factor **rho > 1, ****|x_(m)| >= rho |x_(m+1)|**, then the iterated powers **y_(1), y_(2),…,y_(n) **of the roots are separated by the factor **rho^(2^(k))**, which quickly becomes very big. The coefficients of the iterated polynomial can then be approximated by their leading term,

and so on, implying

Finally, logarithms are used in order to find the absolute values of the roots of the original polynomial. These magnitudes alone are already useful to generate meaningful starting points for other root-finding methods.

To also obtain the angle of these roots, a multitude of methods has been proposed, the most simple one being to successively compute the square root of a (possibly complex) root of **q^(m)(y)**, *m* ranging from *k* to 1, and testing which of the two sign variants is a root of **q^(m-1)(x)**. Before continuing to the roots of **q^(m-2)(x)**, it might be necessary to numerically improve the accuracy of the root approximations for **q^(m-1)(x)**, for instance by Newton’s method.

Graeffe’s method works best for polynomials with simple real roots, though it can be adapted for polynomials with complex roots and coefficients, and roots with higher multiplicity. For instance, it has been observed^{[2]} that for a root **x_(L+1) = x_(L + 2) = … = x_(L + d)** with multiplicity *d*, the fractions

tend to

for **i = 0,1,… ,d**. This allows to estimate the multiplicity structure of the set of roots. From a numerical point of view, this method is problematic since the coefficients of the iterated polynomials span very quickly many orders of magnitude, which implies serious numerical errors. One second, but minor concern is that many different polynomials lead to the same Graeffe iterates.

### Tangential Graeffe Method

This method replaces the numbers by truncated power series of degree 1, also known as dual numbers. Symbolically, this is achieved by introducing an “algebraic infinitesimal” **epsilon **with the defining property **epsilon^(2) = 0**. Then the polynomial **p(x+epsilon) = p(x) + epsilon.p'(x)** has roots **x_(m) – epsilon**, with powers

Thus the value of **x_(m)** is easily obtained as fraction

This kind of computation with infinitesimals is easy to implement analogous to the computation with complex numbers. If one assumes complex coordinates or an initial shift by some randomly chosen complex number, then all roots of the polynomial will be distinct and consequently recoverable with the iteration.

### Renormalization

Every polynomial can be scaled in domain and range such that in the resulting polynomial the first and the last coefficient have size one. If the size of the inner coefficients is bounded by *M*, then the size of the inner coefficients after one stage of the Graeffe iteration is bounded by **n.M^(2)**. After *k* stages one gets the bound **n^(2^(k) -1) . M^(2^(k))** for the inner coefficients.

To overcome the limit posed by the growth of the powers, Malajovich–Zubelli propose to represent coefficients and intermediate results in the *k*th stage of the algorithm by a scaled polar form

where **alpha = c / |c|** is a complex number of unit length and **r = -2^(-k) \ log |c|** is a positive real. Splitting off the power **2^k** in the exponent reduces the absolute value of *c* to the corresponding dyadic root. Since this preserves the magnitude of the (representation of the) initial coefficients, this process was named renormalization. Multiplication of two numbers of this type is straightforward, whereas addition is performed following the factorization

, where **c1** is chosen as the larger of both numbers, that is,** r1 < r2**. Thus

and

with

The coefficients **a0, a1,… ,an** of the final stage *k* of the Graeffe iteration, for some reasonably large value of *k*, are represented by pairs **(alpha _(m), r_(m))**, **m = 0,… ,n**. By identifying the corners of the convex envelope of the point set **{(m,r_(m)): m = 0,… ,n}** one can determine the multiplicities of the roots of the polynomial. Combining this renormalization with the tangent iteration one can extract directly from the coefficients at the corners of the envelope the roots of the original polynomial.

### References

- Householder, Alston Scott (1959). “Dandelin, Lobačevskiǐ, or Graeffe”.
*The American Mathematical Monthly*.**66**: 464–466. doi:10.2307/2310626. JSTOR 2310626. - Best, G.C. (1949). “Notes on the Graeffe Method of Root Squaring”.
*The American Mathematical Monthly*.**56**(2): 91–94. doi:10.2307/2306166. JSTOR 2306166.

- Weisstein, Eric W. “Graeffe’s Method”.
*MathWorld*. - Malajovich, Gregorio; Zubelli, Jorge P. (2001). “Tangent Graeffe iteration”.
*Numerische Mathematik*.**89**(4): 749–782. CiteSeerX 10.1.1.44.3611. doi:10.1007/s002110100278.

Share Now!