Solve Quartic Equation

Quartic equation are the highest degree polynomials which can be solved analytically.

In sixteenth century, Italian mathematician Lodovico Ferrari revealed his first solution on quartic equations. After one century, French mathematician Descartes and Swiss mathematician Leonhard Euler introduced their new solutions to solve the quartic equations. Especially, the work done by Euler paved the road for Lagrange's more general solution which resulted in the publishing of his group theory.

This article goes over the process to deduce the roots formula for a quartic equation by Ferrari, Ferrari, Descartes and Euler's solutions. The initial work will be served as fundamental for our next project to develop a quartic equation solver.

Convert to a depressed quartic equation

General form quartic equation


Let x = y-\dfrac{b}{4a}


The first term

ax^4 = a\Big( y-\dfrac{b}{4a}\Big) ^4

=a\Big[ y^4-4y^3\Big( \dfrac{b}{4a}\Big) +6y^2\Big( \dfrac{b}{4a}\Big) ^2-4y\Big( \dfrac{b}{4a}\Big) ^3+\Big( \dfrac{b}{4a}\Big) ^4\Big]


The second term

bx^3 = b\Big( y-\dfrac{b}{4a}\Big) ^3

=b\Big[ y^3-3y^2\Big(\dfrac{b}{4a}\Big) +3y\Big(\dfrac{b}{4a}\Big) ^2-\Big(\dfrac{b}{4a}\Big) ^3\Big]


The third term

cx^2 = c\Big( y-\dfrac{b}{4a}\Big) ^2

=c\Big[ y^2-2y\Big( \dfrac{b}{4a}\Big) +\Big(\dfrac{b}{4a}\Big) ^2\Big]


The fourth term

dx= d(y-\dfrac{b}{4a})


The sum of each term is

\def\arraystretch{2.3} \begin{array}{ccccccc} ax^4&+bx^3&+cx^2&+dx&e& \\ = ay^4&\cancel{-by^3}&+\dfrac{3b^2}{8a}y^2&-\dfrac{b^3}{16a^2}y&\dfrac{b^4}{256a^3}& \\ &+\cancel{by^3}&-\dfrac{3b^2}{4a}y^2&+\dfrac{3b^3}{16a^2}y&-\dfrac{b^4}{64a^3} & \\ &&+cy^2&-\dfrac{bc}{2a}y&+\dfrac{b^2c}{16a^2} & \\ &&&+dy&-\dfrac{bd}{4a}& \\ &&&&+e& \\ \end{array}


ay^4+(\dfrac{3b^2}{8a}-\dfrac{3b^2}{4a}+c)y^2+(-\dfrac{b^3}{16a^2}+\dfrac{3b^3}{16a^2}-\dfrac{bc}{2a}+d)y+(\dfrac{b^4}{256a^3}-\dfrac{b^4}{64a^3}+\dfrac{b^2c}{16a^2}-\dfrac{bd}{4a}+e )=0

Divide each term by the coefficient of the leading term a and simplify

y^4+\dfrac{8ac-3b^2}{8a^2}y^2 +\dfrac{b^3-4abc+8a^2d}{8a^3}y+\dfrac{-3b^4+16ab^2c-64a^2bd+256a^3e}{256a^4}=0

Let p, q, r be the coeffcients of quadratic, linear and constant terms. The equation is simplified as


in which,

p = \dfrac{8ac-3b^2}{8a^2}

q = \dfrac{b^3-4abc+8a^2d}{8a^3}

r = \dfrac{-3b^4+16ab^2c-64a^2bd+256a^3e}{256a^4}

The quartic equation without cubic form is also called as depressed quartic equation, which is the starting point leading to general formula for the roots of a quartic equation.

Ferrari's solution

Ferrari's solution could be taken as extension of the solution for a biquadratic equation. But the depressed quartic equation has additional linear term compared with the biquadratic equation. How did Ferrari circumvent the limitation?

First, add \dfrac{p^2}{4} on both sides of the depressed equation (2) . Complete the square, and then

\Big( y^2+\dfrac{p}{2} \Big) ^2 = -qy-r+\dfrac{p^2}{4}

But the RHS is a linear expression. To make it a perfect square, Ferrari introduced a variable m, such that LHS is \Big( y^2+\dfrac{p}{2}+m \Big) ^2 . In order to hold the equation, the left hand side needs to add additional terms 2y^2m+pm+m^2.

\Big( y^2+\dfrac{p}{2}+m \Big) ^2 = 2y^2m+pm+m^2-qy-r+\dfrac{p^2}{4}

Now the right hand side is a quadratic expression, which makes it possible to factor it to a perfect square, depending on the value of m. Ferrari figured out the RHS was a perfect square if the discriminant of the quadratic equation was 0. Hence, the value of m was determined. That is

\Delta=(-q)^2-4(2m)\Big( m^2+pm-r+\dfrac{p^2}{4}\Big) =0

Simplifying gives a cubic equation in terms of m.


Solving the cubic equation could determine the value of m. Since the discriminant is equal to 0, the right hand side of equation (4) could be factored to a perfect square. Then, we get

\Big( y^2+\dfrac{p}{2}+m \Big) ^2 = \Big( \sqrt{2m}y-\dfrac{q}{2\sqrt{2m} } \Big) ^2

Move the term of RHS to LHS so that we can apply the identity of difference of squares. Then the equation (6) is rewritten as

\Big( y^2+\sqrt{2m}y -\dfrac{q}{2\sqrt{2m} }+\dfrac{p}{2}+m \Big) \Big( y^2-\sqrt{2m}y+\dfrac{q}{2\sqrt{2m} } +\dfrac{p}{2}+m \Big) =0

Now we obtain 2 quadratic equations. Solving the first quadratic equation gives,

y_1=\dfrac{-\sqrt{2m}+ \sqrt{2} \sqrt{-m-p+\dfrac{q}{\sqrt{2m} } } }{2}

y_2=\dfrac{-\sqrt{2m}- \sqrt{2} \sqrt{-m-p+\dfrac{q}{\sqrt{2m} } } }{2}

Solving the second quadratic equation gives the following two roots

y_3=\dfrac{\sqrt{2m}+ \sqrt{2} \sqrt{-m-p-\dfrac{q}{\sqrt{2m} } } }{2}

y_4=\dfrac{\sqrt{2m}+ \sqrt{2} \sqrt{-m-p-\dfrac{q}{\sqrt{2m} } } }{2}

Descartes' solution

French mathematician Descartes introduced his solution in 1637. First, he arbitrarily defined two factors of the depressed quartic equation (2) so that the following equation was established.


Then, expand the right hand side


Comparing the coefficients of both sides gives the relationship between coefficients of original equation p,q,r and s, t, u, v. Since the cubic term is zero, s+u=0, s = -u. Then,


To eliminate t and v, move u to the LHS for (8) and (9).

p+u^2 = t+v

Subtraction after squaring of (11) and (12)

(p+u^2)^2-(\dfrac{q}{u} )^2 = (t+v)^2-(t-v)^2

Expand and simplify.

p^2+2pu^2+u^4-\dfrac{q^2}{u^2} = 4tv

Substitute (10). Then the right hand side is equal to 4r.

Let n = u^2. The equation (13) could be further simplified to a cubic equation.


This cubic equation is called resolvent of the quartic equation. Solving the cubic equation gives the value of m. Taking square root of m determines the value of u. Subsequently, s, t, v.

t=\dfrac{1}{2} (p+u^2 +\dfrac{q}{u})
v = \dfrac{1}{2}(p+u^2 -\dfrac{q}{u} )

Then the roots of the depressed quartic equation will be determined by the following quadratic equations


In the step of taking square root of m to determine the value of u, there could be two results for u with positive and negative signs. Evaluating the two equation shows we only need to consider one since changing the sign of u only results rotating between the two quadratic equations.

Euler's solution

One common in Ferrari's solution and Descartes' solution is both involves solution of a cubic equation, which is deduced in the middle of the process. Euler's solution starts to construct the cubic equation that leads to solution of the fourth degree equation at the beginning. Let's see how it was done.

Suppose one of the roots of the depressed quartic equation (2) has the form of

y = \sqrt{r_1}+\sqrt{r_2}+\sqrt{r_3}

in which r_1, r_2 and r_3 are three roots of a cubic equation


Using vieta's formula, the following relationship is established immediately.

r_1+r_2+r_3 = f
r_1r_2+r_1r_3+r_2r_3 = g
r_1r_2r_3 = h

The next is to express the coefficients of the cubic equation, f, g, h in terms of the coefficients of the depressed quartic equation p, q, r.

First, take square of equation (21)

y^2 = r_1+r_2+r_3+2\sqrt{r_1r_2}+2\sqrt{r_1r_3}+2\sqrt{r_2r_3}

Substitute (23), and leave the terms with radical on the right hand side.

y^2-f = 2\sqrt{r_1r_2}+2\sqrt{r_1r_3}+2\sqrt{r_2r_3}

Squaring the equation again.

y^4-2fy^2+f^2=4r_1r_2+4r_1r_3+4r_2r_3+8\sqrt{r^2_1r_2r_3} +8\sqrt{r_1r^2_2r_3}+8\sqrt{r_1r_2r^2_3}

Apply the equation (24), then the above equation is simplified to

y^4-2fy^2+f^2=4g+8\sqrt{r^2_1r_2r_3} +8\sqrt{r_1r^2_2r_3}+8\sqrt{r_1r_2r^2_3}

Take out the common divisor \sqrt{r_1r_2r_3}

y^4-2fy^2+f^2=4g+8\sqrt{r_1r_2r_3}(\sqrt{r_1}+\sqrt{r_2}+\sqrt{r_3} )

Substituting equation (21) and (25) results in a quartic equation


which is equivalent to the depressed quartic equation since they have the same root. Comparing the fourth degree equation (28) with the original depressed equation (2) gives

\begin{cases} p=-2f \\ q = -8\sqrt{h} \\r = f^2-4g \end{cases}

Solving for f,h,g gives

\begin{cases} f=-\dfrac{p}{2}\\ h=\dfrac{q^2}{64} \\g = \dfrac{p^2}{16}-\dfrac{r}{4} \end{cases}

Then the cubic equation (22) is determined as

z^3+\dfrac{p}{2}z^2+( \dfrac{p^2}{16}-\dfrac{r}{4} )z-\dfrac{q^2}{64}=0

As defined in (21), the three roots of the cubic equation gives one root for the quartic equation. But if we consider square root will give either positive or negative sign, the formula (21) actually implies four roots. Moreover, take square root for equation (25) and substitute \sqrt{h} with -\dfrac{q}{8}

\sqrt{r_1r_2r_3} =\sqrt{h} =-\dfrac{q}{8}

The sign of product of \sqrt{r_1},\sqrt{r_2},\sqrt{r_3} is determined by the sign of q. If q<0, the products of three roots of the cubic equation is positive. Hence, the four roots for the quartic equation.

y_1 = \sqrt{r_1}-\sqrt{r_2}-\sqrt{r_3}

y_2 = \sqrt{r_1}+\sqrt{r_2}+\sqrt{r_3}

y_3 = -\sqrt{r_1}-\sqrt{r_2}+\sqrt{r_3}

y_4 = -\sqrt{r_1}+\sqrt{r_2}-\sqrt{r_3}

If q>0, the products of three roots of the cubic equation is negative. Hence, the four roots for the quartic equation.

y_1 = \sqrt{r_1}-\sqrt{r_2}+\sqrt{r_3}

y_2 = \sqrt{r_1}+\sqrt{r_2}-\sqrt{r_3}

y_3 = -\sqrt{r_1}-\sqrt{r_2}-\sqrt{r_3}

y_4 = -\sqrt{r_1}+\sqrt{r_2}+\sqrt{r_3}


Now we have deduced the root formulas in the forms by three different methods, Ferrari, Descartes and Euler's solutions. All of the methods involves solution of a cubic equation, equation (5), (14), (31).

Another interesting observation. If we put them together, let n=2m, n=4z, so it's possible to derive the roots of one cubic equation from that of others.



z^3+\dfrac{p}{2}z^2+( \dfrac{p^2}{16}-\dfrac{r}{4} )z-\dfrac{q^2}{64}=0

The last step is converting to the roots for a general quartic equation if it is not a depressed form.

x = y-\dfrac{b}{4a}

Collected in the board: Quartic Equations

Steven Zheng Steven Zheng posted 1 month ago

Scroll to Top