naginterfaces.library.zeros.quartic_​real

naginterfaces.library.zeros.quartic_real(e, a, b, c, d)[source]

quartic_real determines the roots of a quartic equation with real coefficients.

For full information please refer to the NAG Library document for c02al

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/c02/c02alf.html

Parameters
efloat

, the coefficient of .

afloat

, the coefficient of .

bfloat

, the coefficient of .

cfloat

, the coefficient of .

dfloat

, the constant coefficient.

Returns
zerocomplex, ndarray, shape

contains the th root.

errestfloat, ndarray, shape

contains an approximate error estimate for the th root.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

The companion matrix cannot be formed without overflow.

(errno )

Failure to converge in lapackeig.dhseqr.

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

quartic_real attempts to find the roots of the quartic equation

where , , , and are real coefficients with . The roots are located by finding the eigenvalues of the associated (upper Hessenberg) companion matrix given by

The eigenvalues are obtained by a call to lapackeig.dhseqr. Further details can be found in Further Comments.

To obtain the roots of a cubic equation, cubic_real() can be used.

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore