

or,
where:
The quadratic term in equation A-2 can be eliminated as follows:
let,
Now,
The solution to equation A-7 depends upon the sign of the discriminant:
D may be zero, greater than zero, or less than zero. The solution to equation A-7 for each of these three cases is now shown.
Case 1: For D > 0, equation A-7 has one real root and two imaginary roots. The real root is given by:
where,
The two imaginary roots are given by,
Case 2: For D = 0, there are three real roots and at least two are equal.
Since both A and B can be positive as well as negative, D can become zero
either by A and B simultaneously becoming zero, or by
and
canceling each other. When A and B are
both zero, then there are three equal roots. This is an inflection point
and is the case when predicting the critical point with a cubic equation
of state. The three real roots are given by:
Case 3: For D < 0, there are three, distinct, real roots which are given by the following trigonometric functions:
where, i = 1, 2, or 3, k = 0, 1, or 2, and,
In equation A-17, is in degrees. The
minus sign applies when B > 0, and the plus sign applies when B < 0.
For all three cases, the corresponding three roots of equation A-2 are given by A-4 which is re-written as:
Note, while usually very convenient, there are cases when this analytical
solution will not work, or worse, predict incorrect roots. In such cases,
an iterative solution must be used. This analytical solution was taken
largely from Patel's 1980 Ph.D. thesis (Patel, 1980) and is presented here
for the convenience of the future researcher. For a more complete treatment,
this and other cubic equation analytical solutions are presented in the
book Theory of Equations by J.V. Uspensky (Uspensky, 1948).

