# How to solve a quartic equation

Begin with a general quartic equation $x^4+bx^3+cx^2+dx+e=0,\quad\quad\quad(*)$

depress it using the substitution $x = y - \frac{b}{4},$

creates a new quartic equation (without the $y^3$ term) in $y:$ $y^4+qy^2+ry+s=0\quad\quad\quad(**)$

where $\begin{cases}q=c-\frac{3b^2}{8}\\r=d-\frac{bc}{2}+\frac{b^3}{8}\\s=e-\frac{bd}{4}+\frac{b^2c}{16}-\frac{3b^4}{256}\end{cases}$

When $r=0,$ i.e., $d-\frac{bc}{2}+\frac{b^3}{8}=0,$ the quartic equation in $y$ becomes a quadratic equation in $y^2:$ $(y^2)^2+qy^2+s=0.$

It follows that $y^2 = \frac{-q\pm \sqrt{q^2-4s}}{2} \implies y=\pm\sqrt{\frac{-q\pm\sqrt{q^2-4s}}{2}}\implies x=y-\frac{b}{2}.$

For example, to solve quartic equation $x^4+2x^3-3x^2-4x+4=0$, depress it using the substitution $x = y-\frac{1}{2},$ we obtain $y^4-\frac{9}{2}y^2+\frac{81}{16}=0.$

This is a quadratic equation in $y^2:$ $(y^2)^2-\frac{9}{2}y^2+\frac{81}{16}=0.$

Therefore, $y^2 = \frac{\frac{9}{2} \pm \sqrt{(\frac{9}{2})^2-4\cdot 1\cdot \frac{81}{16}}}{2}=\frac{9}{4}\implies y = \pm\sqrt{\frac{9}{4}} = \pm\frac{3}{2}.$

Consequently, $x_1 = \frac{3}{2}-\frac{1}{2} = 1, x_2=-\frac{3}{2}-\frac{1}{2} = -2.$

In general, we solve the depressed quartic equation as follows:

Substituting $u+v+w$ for $y$ in the left side of (**) yields $y^4+qy^2+ry+s$

By $\begin {cases} y^2 = (u+v+w)^2=u^2+v^2+w^2+2(uv+uw+vw),\\ y^4 = (y^2)^2 = \left((u^2+v^2+w^2)+2(uv+uw+vw)\right)^2 \\= (u^2+v^2+w^2)^2+4(u^2+v^2+w^2)(uv+uw+vw) + 4(uv+uw+vw)^2 \\= (u^2+v^2+w^2)^2+2(u^2+v^2+w^2)\cdot 2(uv+uw+vw) + 4(uv+uw+vw)^2\end {cases}$ $= \underbrace{(u^2+v^2+w^2)^2 + 4(u^2+v^2+w^2)(uv+uw+vw)+4(uv+uw+vw)^2}_{y^4}+ q\underbrace{(u^2+v^2+w^2+2(uv+uw+vw))}_{y^2}+ r\underbrace{(u+v+w)}_{y}+s$ $= (u^2+v^2+w^2)^2+4(u^2+v^2+w^2)(uv+uw+vw)+4(uv+uw+vw)^2 + +q(u^2+v^2+w^2)+2q(uv+vw+uw) + r(u+v+w)+s$ $= (u^2+v^2+w^2) +q(u^2+v^2+w^2) + 4(u^2+v^2+w^2)(uv+uw+vw) + 2q(uv+uw+vw) +4(uv+uw+vw)^2 + r(u+v+w)+s$ $= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2 + 2u^2vw + 2v^2uw +2w^2uv) + q(u^2+v^2+w^2)+r(u+v+w)+s$ $= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8u^2vw + 8v^2uw +8w^2uv) + q(u^2+v^2+w^2)+r(u+v+w)+s$ $= u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8u^2vw + 8v^2uw +8w^2uv + r(u+v+w)+s$ $=(u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(2(u^2+v^2+w^2) + q) +4(u^2v^2+u^2w^2+v^2w^2) + 8uvw(u + v + w) + r(u+v+w)+s$ $= (u^2+v^2+w^2) + q(u^2+v^2+w^2) + 2(uv+uw+vw)(\underline{2(u^2+v^2+w^2) + q}) +4(u^2v^2+u^2w^2+v^2w^2) + (\underline{8uvw+r})(u + v + w) +s$

If $\begin{cases} 2(u^2+v^2+w^2) + q=0 \\ 8uvw + r=0\end{cases}\quad\quad\quad(1)$ $=(u^2+v^2+w^2)^2+q(u^2+v^2+w^2) + 4(u^2v^2+u^2w^2+v^2w^2)+s$

Since $(1) \implies \begin{cases} u^2+v^2+w^2 = -\frac{q}{2}\\ uvw = -\frac{r}{8}\end{cases}\quad\quad\quad(2)$ $= (-\frac{q}{2})^2 + q \cdot (-\frac{q}{2}) + 4(u^2v^2+u^2w^2+v^2w^2)+s$ $= \frac{q^2}{4} - \frac{q^2}{2} + 4(u^2v^2+u^2w^2+v^2w^2)+s$ $= -\frac{q^2}{4} + s + 4(u^2v^2+u^2w^2+v^2w^2)$ $= -\frac{q^2-4s}{4} + 4(\underline{u^2v^2+u^2w^2+v^2w^2})$

If $u^2v^2 + u^2w^2+v^2w^2 = \frac{q^2-4s}{16}\quad\quad\quad(3)$ $= 0.$

It means that $u+v+w$ is a solution of $(**)$ if $\begin{cases} u^2+v^2+w^2=-\frac{q}{2} \\ u^2v^2+u^2v^2+v^2w^2=\frac{q^2-4s}{16}\\ uvw=-\frac{r}{8}\end{cases}\quad\quad\quad(4-1, 4-2, 4-3)$

Moreover, squaring (4-3) gives $\begin{cases} u^2+v^2+w^2=-\frac{q}{2} \\ u^2v^2+u^2v^2+v^2w^2=\frac{q^2-4s}{16}\\ u^2v^2w^2=\frac{r^2}{64}\end{cases}\quad\quad\quad(5-1, 5-2, 5-3)$

By Vieta’s theorem, $u^2, v^2, w^2$ satisfying (5-1, 5-2, 5-3) are the three solutions of cubic equation $z^3+\frac{q}{2}z^2+\frac{q^2-4s}{16}z-\frac{r^2}{64}= 0.$

(See “How to solve a cubic equation“)

Suppose the three solutions are $z_1, z_2, z_3,$ we have $u^2=z_1 \implies u = \pm\sqrt{z_1}, v^2 = z_2 \implies v = \pm\sqrt{z_2}, w^2=z_3 \implies w=\pm \sqrt{z_3}.$

Clearly, there are eight combinations of $u,v,w:$ $\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$ $\begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$

Among them, only four are valid due to constraint (4-3) placed on the product $u\cdot v\cdot w.$

From (5-3), we see $uvw = \sqrt{z_1}\sqrt{z_2}\sqrt{z_3}= \pm\frac{r}{8}.$

If $\sqrt{z1}\sqrt{z_2}\sqrt{z_3} = +\frac{r}{8},$ the valid ones are: $\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$ since $uvw=\sqrt{z_1}\cdot \sqrt{z_2}\cdot -\sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$ $\begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$ since $uvw=\sqrt{z_1}\cdot -\sqrt{z_2}\cdot \sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$ $\begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$ since $uvw=-\sqrt{z_1}\cdot \sqrt{z_2}\cdot \sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$ $\begin{cases} u=-\sqrt{z_1} \\ v=-\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases}$ since $uvw=-\sqrt{z_1}\cdot -\sqrt{z_2}\cdot -\sqrt{z_3}=-\sqrt{z_1}\sqrt{z_2}\sqrt{z_3} = -\frac{r}{8}$

Otherwise $\sqrt{z_1}\sqrt{z_2}\sqrt{z_3}=-\frac{r}{8}$, we have $\begin{cases} u=\sqrt{z_1} \\ v= \sqrt{z_2} \\w=\sqrt{z_3} \end{cases} \begin{cases} u=\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= \sqrt{z_2} \\w=-\sqrt{z_3} \end{cases} \begin{cases} u=-\sqrt{z_1} \\ v= -\sqrt{z_2} \\w=\sqrt{z_3} \end{cases}$

Consequently, a solution to the general quartic equation (*) is $x = u+v+w - \frac{b}{4}.$

There are four such solutions.

Exercise-1 Show that (5-3) $\implies uvw = \sqrt{z_1}\sqrt{z_2}\sqrt{z_3}= \pm\frac{r}{8}.$

# Through the Mind’s Eye

Let’s derive Cardano’s formula for the depressed cubic equation $x^3+px=q.$

Imaging a large cube with length $u.$ It is comprised of six blocks. Each block has its label on the top.

The large cube’s volume, $u^3$ is the sum of six smaller pieces: $v^3+v^2(u-v) + v(u-v)u + v(u-v)u+(u-v)^2(u-v)+(u-v)^2v= u^3$

That is, $(u-v)^3+\underline{2uv(u-v)}+\underline{v^2(u-v)}+\underline{(u-v)^2v}=u^3-v^3.$

Factoring $u-v$ from the underlined terms above gives $(u-v)^3+(2uv + v^2 + (u-v)v)(u-v)=u^3-v^3$

or simply, $(u-v)^3+\underbrace{3uv}_{p}(u-v)=\underbrace{u^3-v^3}_{q}.\quad\quad\quad(1)$

From the cube and (1), we see that for $u>v>0,$ if $3uv = p$ and $u^3-v^3=q,$ then $u-v,$ a positive quantity, is a solution of $x^3 + px =q.$

However, (1) is an algebraic identity regardless of the cube that led us to it. i.e.,

(1) is true for all $u, v \in R.$

Hence, $\forall u,v \in R, (3uv = q, u^3-v^3=p) \implies u-v,$ not necessary a positive quantity, is a solution of depressed cubic $x^3+px=q.$

It follows that to find a solution of $x^3+px=q,$ we solve $\begin{cases} 3uv=p \\ u^3-v^3=q \end{cases}$

for $u, v,$ after which the Cardano formula emerges: $x=u-v=\sqrt{\frac{q}{2}+\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \sqrt{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}.\quad\quad\quad(\star)$

Exercise-1 Show that $u-v=\sqrt{\frac{q}{2}+\sqrt{\frac{q^2}{4} + \frac{p^3}{27}}} - \sqrt{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}$

after solving $\begin{cases} 3uv=p \\ u^3-v^3=q\end{cases}$

for $u, v.$