C208: Roots of a Quartic Equation

Author(s): K.S. Kölbig Library: MATHLIB
Submitter: Submitted: 15.01.1988
Language: Fortran Revised: 01.12.1994

Subroutine subprograms RRTEQ4 and DRTEQ4 compute the four roots of

displaymath93

for real coefficients a,b,c,d.

On computers other than CDC or Cray, only the double-precision version DRTEQ4 is available. On CDC and Cray computers, only the single-precision version RRTEQ4 is available.

Structure:

SUBROUTINE subprograms
User Entry Names: RRTEQ4, DRTEQ4
Obsolete User Entry Names: RTEQ4 tex2html_wrap_inline97 RRTEQ4
External References: RRTEQ3, DRTEQ3

Usage:

For tex2html_wrap_inline99 (type REAL), tex2html_wrap_inline101 (type DOUBLE PRECISION),

    CALL tRTEQ4(A,B,C,D,Z,DC,MT)
A,B,C,D
(type according to t) Coefficients a,b,c,d in (*).
Z
(COMPLEX for tex2html_wrap_inline107 , COMPLEX*16 for tex2html_wrap_inline109 ) One-dimensional array of length tex2html_wrap_inline111 . On exit, Z contains the roots of (*).
DC
(type according to t) On exit, DC is set to the value of the discriminant of the cubic resolvent of (*).
MT
(INTEGER) On exit, MT specifies the type of the roots:
tex2html_wrap_inline117 Four real roots in tex2html_wrap_inline119 ;
tex2html_wrap_inline121 Two pairs of complex conjugate roots, one pair in Z(1),Z(2), the other in Z(3),Z(4);
tex2html_wrap_inline123 Two real roots in Z(1),Z(2), and one pair of complex conjugate roots in Z(3),Z(4).

Method:

The equation is solved by the classical procedure, i.e., by solving its cubic resolvent and by combining the square roots of these solutions appropriately.

Accuracy:

Depends on the coefficients a,b,c,d. The values of tex2html_wrap_inline127 and of DC may be inaccurate if |DC| is very small. MT may be uncertain in such cases.
tex2html_wrap_inline129


Michel Goossens Tue Jun 4 20:48:39 METDST 1996