A student of Cardano, who published a technique for solving the general cubic equation, Lodovico Ferrari was the primary architect of the following solution to the general quartic (i.e., fourth degree) equation.

$$x^4 + ax^3 + bx^2 + cx + d = 0$$ As we have done in the past, we begin by depressing the second term in the polynomial on the left.Consequently, we let $f(x) = x^4 + ax^3 + bx^2 + cx + d$, and then expand $g(x) = f(x+h)$, choosing $h$ so that the coefficient on the cubic term becomes zero. Skipping the details of this now familiar manipulation, we realize that any solution to $g(x)=0$ can then be turned into a solution of $f(x)=0$ by simply adding the chosen value of $h$. As such, once we accomplish the depression, we turn our attention to solving $g(x) = 0$, an equation which takes the following form: $$x^4 + px^2 + qx + r = 0$$ We have reduced the number of occurrences of $x$ from $4$ to $3$, but still have a long way to go. Recalling that "completing the square" was useful in reducing the number of occurrences of the unknown in solving a quadratic equation, let us see if we can employ it here as well.

Suppose the first two terms were the first two terms of a perfect square of the form $(x^2 + k)^2$. Expanding this we have $x^4 + 2kx^2 + k^2$, so equating $px^2$ to $2kx^2$, we see $k = \frac{p}{2}$, meaning we desire to see $\frac{p^2}{4}$ as the third term. Adding to the left side this desired value (and its negative, so that the form of the left side changes but its value for any given $x$ doesn't), we have:$\require{color}$ $$\left(x^4 + px^2 \color{green}{{} + \frac{p^2}{4}}\right) + qx + r \color{red}{{} - \frac{p^2}{4}} \color{black}{{} = 0}$$ Writing the left as a perfect square (by design), then yields $$\left(x^2 + \frac{p}{2}\right)^2 + qx + r - \frac{p^2}{4} = 0$$ We now have the number of occurrences of $x$ down to two, but we need yet another trick to reduce it further.

Notice, the first half of the left side is a perfect square -- if only the second half was as well, we might be able to make some progress using the zero-product property. After all, we know $a^2 - b^2 = (a+b)(a-b)$. Indeed, even being able to write the left side in the form $a^2 - m b^2$ for some constant $m$ would be useful as we could then factor $a^2 - m b^2$ into $(a+\sqrt{m} \cdot b)(a-\sqrt{m} \cdot b)$.

However, we don't have either of these forms yet. Here's the big trick: Suppose we increase the expression being squared on the left by some $\alpha$. Note by increasing what we are squaring instead of the square itself, we keep that first expression a perfect square. We would then of course, need to compensate for our insertion of $\alpha$ doing something to the right side as well. Still, that might give us the flexibility to then choose a particular value of $\alpha$ to make something nice happen (like getting that second squared expression on the left)!

Consider the difference in the expansions of $(x^2 + \frac{p}{2})^2$ versus $(x^2 + \frac{p}{2} + \alpha)^2$: $$\left(x^2 + \frac{p}{2}\right)^2 = x^4 + px^2 + \frac{p^2}{4}$$ while $$\left(x^2 + \frac{p}{2} \color{green} {} + \alpha \color{black} \right)^2 {} = x^4 + px^2 + \frac{p^2}{4} \color{green}{} + 2x^2 \alpha + p \alpha + \alpha^2$$ One can see that inserting $\alpha$ as we have will require compensating for that insertion by adding three additional terms (shown in red above) either on the right side of our equation, or subtracting these three terms on the left side of the equation. We opt to do the latter to preserve the zero on the right -- which we will need if we still plan to employ the zero-product property.

This gives us the equation $$\left(x^2 + \frac{p}{2} \color{green}{} + \alpha \color{black} \right)^2 + qx + r - \frac{p^2}{4} \color{red} {} - 2x^2 \alpha - p \alpha - \alpha^2 \color{black} = 0$$ With $\alpha$ now "injected" for flexibility (remember, like our choice of $h$ to depress the original cubic term, we are free to make $\alpha$ any value we wish), we seek to see the terms outside the $(x^2 + \frac{p}{2} + \alpha)^2$ above collect together to give us either a second binomial squared (or minimally a multiple of one) subtracted from the first.

With this in mind, let us collect these terms into a more recognizable quadratic form (i.e., the bracketed expression below) subtracted from the first squared trinomial:
$$\left(x^2 + \frac{p}{2} + \alpha \right)^2 - \left[ \color{black} 2\alpha \cdot \color{purple} x^2 \color{black} {} - q \cdot \color{purple} x \color{black} + \left(\alpha^2 + p \alpha + \frac{p^2}{4} - r\right) \right] = 0$$
Now that a quadratic $Ax^2 + Bx + C$ is a perfect square (and thus has only one root) precisely when its discriminant $B^2 - 4AC$ is zero. (*Recall, the discriminant is the value under the radical in the quadratic formula.*)

In the bracketed quadratic above, we have $\color{Magenta} A = 2\alpha$, $\color{MidnightBlue} B = -q$, and $\color{maroon} C = \alpha^2 + p\alpha + \frac{p^2}{4} - r$. As such, if we hope this quadratic is a perfect square, we'll need
$$\color{MidnightBlue} B\color{black}^2 - 4 \color{Magenta} A \color{maroon} C \color{black} = \color{MidnightBlue} (-q)\color{black}^2 - 4 \cdot \color{Magenta}2\alpha \color{black} \cdot \color{maroon} \left(\alpha^2 + p \alpha + \frac{p^2}{4} - r\right) \color{black} = 0$$
We'd like to find the $\alpha$ that makes this happen -- but notice that after a slight rearrangement of terms, this equation is *cubic* in terms of $\alpha$!
$$ - 8 \color{purple}\alpha^3\color{black} - 8p \color{purple}\alpha^2\color{black} - 2p^2 \color{purple}\alpha\color{black} + (q^2 - r)$$
Of course, we know how to solve cubics now, so suppose solving the above (with the technique of your choice) yields $\alpha = \alpha_1$ as one of its roots.

Returning to the bracketed quadratic, notice this now takes the form $Ax^2 + Bx + C = 0$ where
$$A = 2\alpha_1, \quad B = -q, \quad \textrm{ and } \quad C = \alpha_1^2 + p \alpha_1 + \frac{p^2}{4} - r$$
With the discriminant equal to zero (by design), we see the sole root of this quadratic is
$$-\frac{B}{2A} = \frac{q}{4\alpha_1}$$
This means that replacing $\alpha$ with our found $\alpha_1$, we can replace the bracketed quadratic previously discussed to see the following equation:
$$\left(x^2 + \frac{p}{2} + \alpha_1 \right)^2 - 2 \alpha_1 \left(x - \frac{q}{4\alpha_1} \right)^2 = 0$$
Whew! That was a lot of work, but we finally got our equation into an easily factorable form, so we can use the zero-product property:
$$\left( \left( x^2 + \frac{p}{2} + \alpha_1 \right) + \sqrt{2\alpha_1} \left( x + \frac{q}{4\alpha_1}\right) \right) \cdot \left( \left( x^2 + \frac{p}{2} + \alpha_1 \right) - \sqrt{2\alpha_1} \left( x + \frac{q}{4\alpha_1}\right) \right)$$
While the coefficients involve are a bit complicated, notice that each factor is quadratic in $x$, which we can make a bit more obvious by writing the equation in the below form. (*Yes!*)
$$\left( \color{purple}x^2\color{black} + \sqrt{2\alpha_1} \cdot \color{purple}x\color{black} + \left( \frac{p}{2} + \alpha_1 + \frac{q\sqrt{2\alpha_1}}{4\alpha_1}\right)\right) \left( \color{purple}x^2\color{black} + \sqrt{2\alpha_1} \cdot \color{purple}x\color{black} + \left( \frac{p}{2} + \alpha_1 + \frac{q\sqrt{2\alpha_1}}{4\alpha_1}\right)\right) = 0$$
From here the rest is easy -- simply set each factor equal to zero and solve the resulting quadratics with the method of your choice (the quadratic formula is probably looking pretty good right now). 😜