Finds the zeros of a polynomial with real coefficients using Laguerre's method.
COEFF — Vector of
length NDEG + 1 containing
the coefficients of the polynomial in increasing order by degree.
(Input)
The polynomial is
COEFF(NDEG + 1) * Z**NDEG + COEFF(NDEG) * Z**(NDEG - 1) + … + COEFF(1).
ROOT — Complex vector of length NDEG containing the zeros of the polynomial. (Output)
NDEG — Degree of
the polynomial. 1 ≤ NDEG ≤ 100
(Input)
Default: NDEG = size (COEFF,1) – 1.
Generic: CALL ZPLRC (COEFF, ROOT [,…])
Specific: The specific interface names are S_ZPLRC and D_ZPLRC.
Single: CALL ZPLRC (NDEG, COEFF, ROOT)
Double: The double precision name is DZPLRC.
Routine ZPLRC computes the n zeros of the polynomial
p(z) = anzn + an-1 zn-1 + … + a1z + a0
where the coefficients ai for i = 0, 1, …, n are real and n is the degree of the polynomial.
The routine ZPLRC is a modification of B.T. Smith's routine ZERPOL (Smith 1967) that uses Laguerre's method. Laguerre's method is cubically convergent for isolated zeros and linearly convergent for multiple zeros. The maximum length of the step between successive iterates is restricted so that each new iterate lies inside a region about the previous iterate known to contain a zero of the polynomial. An iterate is accepted as a zero when the polynomial value at that iterate is smaller than a computed bound for the rounding error in the polynomial value at that iterate. The original polynomial is deflated after each real zero or pair of complex zeros is found. Subsequent zeros are found using the deflated polynomial.
3 1 The first several coefficients of the polynomial are equal to zero. Several of the last roots will be set to machine infinity to compensate for this problem.
3 2 Fewer than NDEG zeros were found. The ROOT vector will contain the value for machine infinity in the locations that do not contain zeros.
This example finds the zeros of the third-degree polynomial
where z is a complex variable.
DATA COEFF/-2.0, 4.0, -3.0, 1.0/
CALL ZPLRC (COEFF, ZERO, NDEG)
CALL WRCRN ('The zeros found are', ZERO, 1, NDEG, 1)
The zeros found
are
1
2
3
( 1.000, 1.000) ( 1.000,-1.000) ( 1.000, 0.000)
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |