Cubic and Quatric Equations
Cubic Equation x3 + a1x2 + a2x + a3 = 0
Let Q = (3a2 - a12)/9, R = (9a1a2 - 27a3 - 2a13)/54, S =
, T = 
Solutions:
If a1, a2, a3 are real and if D = Q3 + R2 is the discriminant, then
(i) one root is real and two complex conjugate if D > 0
(ii) all roots are real and at least two are equal if D = 0
(iii) all roots are real and unequal if D < 0.
If D < 0, computation is simplyfied by use of trigonometry.
Solutions if D < 0 :
where cosθ = -R / √ -Q3
x1 + x2 + x3 = -a1, x1x2 + x2x3 + x3x1 = a2, x1x2x3 = - a3
where x1, x2 , x3 are the three roots.
Quatric equation x4 + a1x3 + a2x2 + a3x + a4 = 0.
Let y1 be a real root of the cubic equation
(1) y3 - a2y2 + (a1a3 - 4a4)y + (4a2a4 - a32 - a12a4) = 0.
Solutions: The roots of z2 + 1/2(a1 ± √a12 - 4a2 + 4y1)z + 1/2(y1 ± √y12 - 4a4) = 0.
If all roots of (1) are real, computation is simplified by using that particular real root which produces all real coefficients in the quadratic equation.
where x1,x2,x3,x4 are the four roots.













