Ferrari's Method

Theorem
A polynomial equation of the form $a x^4 + b x^3 + c x^2 + d x + e = 0$ with $a \ne 0$ is called a quartic equation, or just quartic.

It has solutions $\displaystyle x = \frac {-p \pm \sqrt {p^2 - 4 q}} 4$ where:
 * $\displaystyle p = \frac b a \pm \sqrt {\frac {b^2} {a^2} - \frac {4 c} a + 4 y_1}$;
 * $\displaystyle q = y_1 \mp \sqrt {y_1^2 - \frac {4 e} a}$,

where $y_1$ is a real solution to the cubic:
 * $\displaystyle y^3 - \frac c a y^2 + \left({\frac {b d} {a^2} - \frac {4 e} a}\right) y + \left({\frac {4 c e} {a^2} - \frac {b^2 e} {a^3} - \frac {d^2} {a^2}}\right) = 0$

Ferrari's method is a technique for solving this quartic.

Proof
First we render the quartic into monic form:
 * $\displaystyle x^4 + \frac b a x^3 + \frac c a x^2 + \frac d a x + \frac e a = 0$

Completing the square in $x^2$:
 * $\displaystyle \left({x^2 + \frac b {2a} x}\right)^2 + \left({\frac c a - \frac {b^2} {4 a^2}}\right) x^2 + \frac d a x + \frac e a = 0$

Then we introduce a new variable $y$:
 * $\displaystyle \left({x^2 + \frac b {2a} x + \frac y 2}\right)^2 + \left({\frac c a - \frac {b^2} {4 a^2} - y}\right) x^2 + \left({\frac d a - \frac b {2a} y}\right) x + \left({\frac e a - \frac {y^2} {4}}\right) = 0$

This equation is valid for any $y$, so let us pick a value of $y$ so as to make:
 * $\displaystyle \left({\frac c a - \frac {b^2} {4 a^2} - y}\right) x^2 + \left({\frac d a - \frac b {2a} y}\right) x + \left({\frac e a - \frac {y^2} 4}\right)$

have a zero discriminant. That is:
 * $\displaystyle \left({\frac d a - \frac b {2a} y}\right)^2 = 4 \left({\frac c a - \frac {b^2} {4 a^2} - y}\right) \left({\frac e a - \frac {y^2} 4}\right)$

After some algebra, this can be expressed as a cubic in $y$:
 * $\displaystyle y^3 - \frac c a y^2 + \left({\frac {b d} {a^2} - \frac {4 e} a}\right) y + \left({\frac {4 c e} {a^2} - \frac {b^2 e} {a^3} - \frac {d^2} {a^2}}\right) = 0$

Using (for example) Cardano's Formula, we can find a real solution of this: call it $y_1$.

Now a Quadratic Equation $p x^2 + q x + r$ can be expressed as:
 * $\displaystyle p \left({\left({x + \frac {q} {2p}}\right)^2 - \frac {q^2 - 4 p r} {4 p^2}}\right)$

If that quadratic has a zero discriminant, i.e. $q^2 = 4 p r$, then this reduces to:
 * $\displaystyle p \left({\left({x + \frac q {2p}}\right)^2}\right)$

... which in turn becomes
 * $\displaystyle p \left({\left({x + \pm \sqrt{\frac r p}}\right)^2}\right)$

as $\displaystyle q^2 = 4 p r \implies \frac {q^2} {4 p^2} = \frac r p$.

So, as
 * $\displaystyle \left({\frac c a - \frac {b^2} {4 a^2} - y_1}\right) x^2 + \left({\frac d a - \frac b {2a} y_1}\right) x + \left({\frac e a - \frac {y_1^2} 4}\right)$

has a zero discriminant (we picked $y_1$ to make that happen), we can write it as:
 * $\displaystyle \left({\frac c a - \frac {b^2} {4 a^2} - y_1}\right)\left({x \pm \frac {\sqrt{\left({\frac e a - \frac {y_1^2} 4}\right)}} {\sqrt{\left({\frac c a - \frac {b^2} {4 a^2} - y_1}\right)}}}\right)^2$

Now we return to the equation:
 * $\displaystyle \left({x^2 + \frac b {2a} x + \frac {y_1} 2}\right)^2 + \left({\frac c a - \frac {b^2} {4 a^2} - y_1}\right) x^2 + \left({\frac d a - \frac b {2a} y_1}\right) x + \left({\frac {e} {a} - \frac {y_1^2} 4}\right) = 0$

which can now be written:
 * $\displaystyle \left({x^2 + \frac b {2a} x + \frac {y_1} 2}\right)^2 = \left({\frac {b^2} {4 a^2} - \frac c a + y_1}\right) \left({x \mp \frac {\sqrt{\left({\frac {y_1^2} 4 - \frac e a}\right)}} {\sqrt{\left({\frac {b^2} {4 a^2} - \frac c a + y_1}\right)}}}\right)^2$

Taking square roots of both sides:
 * $\displaystyle x^2 + \frac b {2a} x + \frac {y_1} 2 = \pm x \sqrt {\left({\frac {b^2} {4 a^2} - \frac c a + y_1}\right)} \mp \sqrt{\frac {y_1^2} 4 - \frac e a}$

Arranging into canonical quadratic form:
 * $\displaystyle x^2 + \left({\frac b {2a} \pm \frac 1 2 \sqrt {\frac {b^2} {a^2} - \frac {4 c} a + 4 y_1}}\right) x + \frac 1 2 \left({y_1 \mp \sqrt{y_1^2 - \frac {4 e} a}}\right) = 0$

This quadratic in $x$ can then be solved in the conventional manner.

Hence the result.