Quadratic Equation : ax^2 +bx +c=0
1. x=\cfrac{-b\pm\sqrt{b^2-4ac}}{2a}
If a,b,c are real and if D=b^2-4ac is the discriminant, then the roots are
(i) real and unequal if D>0
(ii) real and equal if D=0
(iii) complex conjugate if D<0
2. If x_1,x_2 are roots , then x_1+x_2=-b/a and x_1x_2=c/a
Cubic Equation : x^3+a_1x^2 +a_2x+a_3=0
Let Q =\cfrac{3a_2-a_1^2}{9} , R=\cfrac{9a_1a_2 -27a_3 -2a_1^3}{54},
S=\sqrt[3]{R+\sqrt{Q^3+R^3}} , T=\sqrt[3]{R -\sqrt{Q^3+R^3}}
1. Solutions : \begin{cases} x_1 = S+T-\cfrac{1}{3}a_1 \\ x_2 = -\cfrac{1}{2}(S+T) -\cfrac{1}{3}a_1 +\cfrac{1}{2}i\sqrt{3}(S-T) \\ x_3 =-\cfrac{1}{2}(S+T)-\cfrac{1}{3}a_1 -\cfrac{1}{3}i\sqrt{3}(S-T) \end{cases}
If a_1,a_2,a_3 are real and if D=Q^3+R^2 is the discriminant, then
(i) one root 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 simplified by use of trigonometry .
2. Solutions if D<0 : \begin{cases}x_1 = 2\sqrt{-Q}\cos(\cfrac{1}{3}\theta)-\cfrac{1}{3}a_1 \\ x_2 =2\sqrt{-Q}\cos(\cfrac{1}{3}\theta +120^\circ)-\cfrac{1}{3}a_1 \\ x_3=2\sqrt{-Q}\cos(\cfrac{1}{3}\theta +240^\circ)-\cfrac{1}{3}a_1 \end{cases} where \cos \theta =R/\sqrt{-Q^3}
3. x_1+x_2+x_3 =-a_1 ,x_1x_2 +x_2x_3+x_3x_1 =a_2, x_1x_2x_3 =-a_3
where x_1,x_2,x_3 are the three roots .
Quartic Equation : x^4+a_1x^3+a_2x^2+a_3x+a_4=0
Let y_1 be a root of the cubic equation
1. y^3-a_2y^2 +(a_1a_3-4a_4)y+(4a_2a_4-a_3^2-a_1^2a_4)=0
2. Solutions : The 4 roots of z^2+\cfrac{1}{2}\{a_1\pm\sqrt{a_1^2 -4a_2+4y_1}\}z+\cfrac{1}{2}\{y_1\mp\sqrt{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 2
3. \begin{cases}x_1+x_2+x_3+x_4=-a_1 \\ x_1x_2 +x_2x_3 +x_3x_4 +x_4x_1 +x_1x_3 +x_2x_4 =a_2 \\ x_1x_2x_3 +x_2x_3x_4 +x_1x_2x_4 +x_1x_3x_4 =-a_3 \\ x_1x_2x_3x_4=a_4 \end{cases}
where x_1,x_2,x_3,x_4 are the four roots .