# Cubic and Quartic Equations

**Cubic Equation** x^{3} + a_{1}x^{2} + a_{2}x + a_{3} = 0

Let *Q* = (3a_{2} - a_{1}^{2})/9, *R* = (9a_{1}a_{2} - 27a_{3} - 2a_{1}^{3})/54, *S* = , *T* =

**Solutions:**

If a_{1}, a_{2}, a_{3} are real and if *D* = Q^{3} + R^{2} 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*/ √ -

*Q*

^{3}

x_{1} + x_{2} + x_{3} = -a_{1}, x_{1}x_{2} + x_{2}x_{3} + x_{3}x_{1} = a_{2}, x_{1}x_{2}x_{3} = - a_{3}

where x_{1}, x_{2} , x_{3} are the three roots.

**Quartic equation** x^{4} + a_{1}x^{3} + a_{2}x^{2} + a_{3}x + a_{4} = 0.

Let y_{1} be a real root of the cubic equation

(1) y^{3} - a_{2}y^{2} + (a_{1}a_{3} - 4a_{4})y + (4a_{2}a_{4} - a_{3}^{2} - a_{1}^{2}a_{4}) = 0.

**Solutions:** The roots of z^{2} + 1/2(a_{1} ± √a_{1}^{2} - 4a_{2} + 4y_{1})z + 1/2(y_{1} ± √y_{1}^{2} - 4a_{4}) = 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 x_{1},x_{2},x_{3},x_{4} are the four roots.