ZPLRC
Finds the zeros of a polynomial with real coefficients using Laguerre’s method.
Required Arguments
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)
Optional Arguments
NDEG — Degree of the polynomial. 1  NDEG  100 (Input)
Default: NDEG = size (COEFF,1) - 1.
FORTRAN 90 Interface
Generic: CALL ZPLRC (COEFF, ROOT [])
Specific: The specific interface names are S_ZPLRC and D_ZPLRC.
FORTRAN 77 Interface
Single: CALL ZPLRC (NDEG, COEFF, ROOT)
Double: The double precision name is DZPLRC.
Description
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.
Comments
Informational errors
Type
Code
Description
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.
Example
This example finds the zeros of the third-degree polynomial
p(z) = z3 – 3z2 + 4z –2
where z is a complex variable.
USE ZPLRC_INT
USE WRCRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER NDEG
PARAMETER (NDEG=3)
!
REAL COEFF(NDEG+1)
COMPLEX ZERO(NDEG)
! Set values of COEFF
! COEFF = (-2.0 4.0 -3.0 1.0)
!
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)
!
END
Output
 
The zeros found are
1 2 3
( 1.000, 1.000) ( 1.000,-1.000) ( 1.000, 0.000)
Published date: 03/19/2020
Last modified date: 03/19/2020