Quartic Equation

In this note, a similar technique with Ferrari’s solution is introduced to solve a quartic equation x4+ax3+bx2+cx+d=0\begin{aligned} x^4 + ax^3 + bx^2 + cx + d = 0 \end{aligned}

The above equation is converted to the depressed quartic equation y4+py2+qy+r=0\begin{aligned} y^4 + py^2 + qy + r = 0 \end{aligned}

Once the solution yy is found, xx can be naturally obtained from x=ya/4x = y - a/4. So, replacing xx by ya/4y - a/4 in the original equation to find pp, qq, and rr, (ya4)4+a(ya4)3+b(ya4)2+c(ya4)+d=(y4ay3+3a28y2a316y+a4256)+a(y33a4y2+3a216ya364)+b(y2a2y+a216)+c(ya4)+d=  y4+(b3a28)y2+(a38ab2+c)y+(3a4256+a2b16ac4+d)=0p=b3a28q=a38ab2+cr=3a4256+a2b16ac4+d\begin{aligned} &\left( y - \frac{a}{4} \right)^4 + a \left( y - \frac{a}{4} \right)^3 + b \left( y - \frac{a}{4} \right)^2 + c \left( y - \frac{a}{4} \right) + d\\\\ = &\left( y^4 - ay^3 + \frac{3a^2}{8} y^2 - \frac{a^3}{16} y + \frac{a^4}{256} \right) + a \left( y^3 - \frac{3a}{4} y^2 + \frac{3a^2}{16} y - \frac{a^3}{64} \right) \\\\ &+ b \left( y^2 - \frac{a}{2} y + \frac{a^2}{16} \right) + c \left( y - \frac{a}{4} \right) + d \\\\ = &\; y^4 + \left( b - \frac{3a^2}{8} \right) y^2 + \left( \frac{a^3}{8} - \frac{ab}{2} + c \right) y + \left( -\frac{3a^4}{256} + \frac{a^2 b}{16} - \frac{ac}{4} + d \right) = 0 \\\\ \Longrightarrow &\quad p = b - \frac{3a^2}{8} \qquad q = \frac{a^3}{8} - \frac{ab}{2} + c \qquad r = -\frac{3a^4}{256} + \frac{a^2 b}{16} - \frac{ac}{4} + d \end{aligned}

Now, the depressed quartic equation can be rearranged y4=(y2)2=py2qyr\begin{aligned} y^4 = (y^2)^2 = - py^2 - qy - r \end{aligned}

Introducing a variable zz, add 2zy2+z22zy^2 + z^2 to both sides. y4+2zy2+z2=py2qyr+2zy2+z2(y2+z)2=(2zp)y2qy+z2r\begin{aligned} y^4 + 2zy^2 + z^2 &= - py^2 - qy - r + 2zy^2 + z^2 \\\\ (y^2 + z)^2 &= (2z - p) y^2 - qy + z^2 - r \end{aligned}

As zz may be arbitrarily chosen, this can be carefully set in order to complete the square on the right-hand side. That is, the discriminant on the quardratic equation on the right-hand side should be zero for doing this. (q)24(2zp)(z2r)=0\begin{aligned} (-q)^2 - 4(2z - p)(z^2 - r) = 0 \end{aligned}

This discriminant generates another cubic equation, which can be solved following this note. q2(8z34pz28rz+4rp)=0z3p2z2rz+rp2q28=0\begin{aligned} q^2 - (8z^3 - 4pz^2 - 8rz + 4rp) = 0 \Longrightarrow z^3 - \frac{p}{2} z^2 - rz + \frac{rp}{2} - \frac{q^2}{8} = 0 \end{aligned}

After finding z and picking any, the reformed equation can be rewritten as (y2+z)2=(2zpyq22zp)2\begin{aligned} (y^2 + z)^2 = \left( \sqrt{2z - p} y - \frac{q}{2\sqrt{2z - p}} \right)^2 \end{aligned}

or (y2+z)2=(2zpy±z2r)2\begin{aligned} (y^2 + z)^2 = \left( \sqrt{2z - p} y \pm \sqrt{z^2 - r} \right)^2 \end{aligned}

Note that there no exists real solutions if 2zp<02z - p < 0 or z2r<0z^2 - r < 0. Since these two equations are equal, (2zpyq22zp)2=(2zpy±z2r)22q=±22zpz2r\begin{aligned} &\left( \sqrt{2z - p} y - \frac{q}{2\sqrt{2z - p}} \right)^2 = \left( \sqrt{2z - p} y \pm \sqrt{z^2 - r} \right)^2 \\\\ &\Longrightarrow -2q = \pm 2 \sqrt{2z - p} \sqrt{z^2 - r} \end{aligned}

Therefore, this fact makes two separate cases. {  2q=22zpz2r(q<0)  2q=22zpz2r(q0)\begin{aligned} \begin{cases} \; -2q = 2 \sqrt{2z - p} \sqrt{z^2 - r} \quad &(q < 0) \\\\ \; -2q = -2 \sqrt{2z - p} \sqrt{z^2 - r} \quad &(q \ge 0) \end{cases} \end{aligned}

Keeping this separation in mind, from the identity m2n2=(m+n)(mn)m^2 - n^2 = (m + n)(m - n), {  (y22zpy+zz2r)(y2+2zpy+z+z2r)(q<0)  (y22zpy+z+z2r)(y2+2zpy+zz2r)(q0)\begin{aligned} \begin{cases} \; \left( y^2 - \sqrt{2z - p} y + z - \sqrt{z^2 - r} \right) \left( y^2 + \sqrt{2z - p} y + z + \sqrt{z^2 - r} \right) \quad &(q < 0) \\\\ \; \left( y^2 - \sqrt{2z - p} y + z + \sqrt{z^2 - r} \right) \left( y^2 + \sqrt{2z - p} y + z - \sqrt{z^2 - r} \right) \quad &(q \ge 0) \end{cases} \end{aligned}

Accordingly, by the quadratic formula, {  y=12(±12zp±22zp±14z2r)(q<0)  y=12(±12zp±2(2z+p±14z2r))(q0)\begin{aligned} \begin{cases} \; y = \cfrac{1}{2} \left( \pm_1 \sqrt{2z - p} \pm_2 \sqrt{-2z - p \pm_1 4\sqrt{z^2 - r}} \right) \quad &(q < 0) \\\\ \; y = \cfrac{1}{2} \left( \pm_1 \sqrt{2z - p} \pm_2 \sqrt{-\left( 2z + p \pm_1 4\sqrt{z^2 - r} \right)} \right) \quad &(q \ge 0) \end{cases} \end{aligned}

The two occurrences of ±1\pm_1 must denote the same sign, while ±2\pm_2 is independent. More specifically, if q<0q < 0, x=12(2zp+2zp+4z2r)a4,x=12(2zp2zp+4z2r)a4,x=12(2zp+2zp4z2r)a4,x=12(2zp2zp4z2r)a4\begin{aligned} x &= \frac{1}{2} \left( \sqrt{2z - p} + \sqrt{-2z - p + 4\sqrt{z^2 - r}} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( \sqrt{2z - p} - \sqrt{-2z - p + 4\sqrt{z^2 - r}} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( - \sqrt{2z - p} + \sqrt{-2z - p - 4\sqrt{z^2 - r}} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( - \sqrt{2z - p} - \sqrt{-2z - p - 4\sqrt{z^2 - r}} \right) - \frac{a}{4} \end{aligned}

If q0q \ge 0, x=12(2zp+(2z+p+4z2r))a4,x=12(2zp(2z+p+4z2r))a4,x=12(2zp+(2z+p4z2r))a4,x=12(2zp(2z+p4z2r))a4\begin{aligned} x &= \frac{1}{2} \left( \sqrt{2z - p} + \sqrt{-\left(2z + p + 4\sqrt{z^2 - r}\right)} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( \sqrt{2z - p} - \sqrt{-\left(2z + p + 4\sqrt{z^2 - r}\right)} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( - \sqrt{2z - p} + \sqrt{-\left(2z + p - 4\sqrt{z^2 - r}\right)} \right) - \frac{a}{4}, \\\\ x &= \frac{1}{2} \left( - \sqrt{2z - p} - \sqrt{-\left(2z + p - 4\sqrt{z^2 - r}\right)} \right) - \frac{a}{4} \end{aligned}

Reference

[1] Andrew S. Glassner (Ed.). 1990. Graphics gems. Academic Press Professional, Inc., USA.


© 2024. All rights reserved.