Solving a Quartic Equation

Ferrari's method first translates a quartic to

$$ y^4+py^2+qy+r=0. $$

It then chooses a resolvent parameter $u$ so that the polynomial factors into two quadratics. The condition on $u$ is the cubic

$$ u(p+u)^2-4ru-q^2=0. $$

Three structural cases

A biquadratic ($q=0$) needs only two quadratic solves. A general depressed quartic uses the resolvent cubic. Finally, $x=y-b/4$ removes the cubic term from a monic quartic; a non-monic polynomial is normalized first.

declare symbol x, y, u: MathValue

def solveBiquadratic
  (p : MathValue)
  (q : MathValue)
  : (MathValue, MathValue, MathValue, MathValue) :=
  let (s1, s2) := qF' 1 p q
      (r1, r2) := qF' 1 0 (- s1)
      (r3, r4) := qF' 1 0 (- s2)
   in (r1, r2, r3, r4)

Biquadratic shortcut

For $x^4-5x^2+4=0$, the substitution $t=x^2$ yields $(t-1)(t-4)=0$. Solving first for $t$ and then taking the two square roots of each value gives all four roots.

solveBiquadratic (-5) 4
$(2, -2, 1, -1)$

Ferrari's general branch

Consider the already-depressed polynomial

$$ y^4-15y^2-10y+24 =(y+3)(y+2)(y-1)(y-4). $$

Here $(p,q,r)=(-15,-10,24)$, so this is genuinely outside the biquadratic case. Its resolvent has the convenient root $u=1$.

def p : MathValue := -15
def q : MathValue := -10
def r : MathValue := 24
def chosenU : MathValue := 1

def resolvent (u : MathValue) : MathValue :=
  u * (p + u)^2 - 4 * r * u - q^2

def factorPlus : MathValue :=
  y^2 + (p + chosenU) / 2
    + sqrt chosenU * (y - q / (2 * chosenU))

def factorMinus : MathValue :=
  y^2 + (p + chosenU) / 2
    - sqrt chosenU * (y - q / (2 * chosenU))
resolvent chosenU
$0$
(factorPlus, factorMinus)
$(y^{2} + y - 2, y^{2} - y - 12)$
(qF factorPlus y, qF factorMinus y)
$((1, -2), (4, -3))$

Why the factorization works

Once a root $u$ of the resolvent is chosen, the depressed quartic is split into

$$ y^2+\frac{p+u}{2} \pm\sqrt{u}\left(y-\frac{q}{2u}\right)=0. $$

The two calls to the quadratic solver return all four roots.

Takeaway

The two executable paths mirror Ferrari's proof: the biquadratic case reduces immediately to quadratic equations, while the nonzero-linear case uses one resolvent root to expose two quadratic factors. Egison keeps the exact factorization and all four roots symbolic.

Links

Back to the Table of Contents