The roots of cubic and quartic polynomials #
This file proves Theorem 37 and 46 from the 100 Theorems List.
We give the solutions to the cubic equation a * x^3 + b * x^2 + c * x + d = 0
over a field K
that has characteristic neither 2 nor 3, that has a third primitive root of
unity, and in which certain other quantities admit square and cube roots. This is based on the
Cardano's Formula.
We also give solutions to the quartic equation a * x^4 + b * x^3 + c * x^2 + d * x + e = 0
over
a field K
that is not characteristic 2, and in which certain quantities admit square roots, in
terms of a quantity that is a root of a particular cubic equation.
Main statements #
cubic_eq_zero_iff
: gives the roots of the cubic equation where the discriminantp = 3 * a * c - b^2
is nonzero.cubic_eq_zero_iff_of_p_eq_zero
: gives the roots of the cubic equation where the discriminant equals zero.quartic_eq_zero_iff
: gives the roots of the quartic equation where the quantityb^3 - 4 * a * b * c + 8 * a^2 * d
is nonzero, in terms of a rootu
to a cubic resolvent.quartic_eq_zero_iff_of_q_eq_zero
: gives the roots of the quartic equation where the quantityb^3 - 4 * a * b * c + 8 * a^2 * d
equals zero.
Proof outline #
Proofs of the cubic and quartic formulas are similar in outline.
For a cubic:
- Given cubic $ax^3 + bx^2 + cx + d = 0$, we show it is equivalent to some "depressed cubic"
$y^3 + 3py - 2q = 0$ where $y = x + b / (3a)$, $p = (3ac - b^2) / (9a^2)$, and
$q = (9abc - 2b^3 - 27a^2d) / (54a^3)$ (
h₁
incubic_eq_zero_iff
). - When $p$ is zero, this is easily solved (
cubic_eq_zero_iff_of_p_eq_zero
). - Otherwise one can directly derive a factorization of the depressed cubic, in terms of some
primitive cube root of unity $\omega^3 = 1$ (
cubic_depressed_eq_zero_iff
).
Similarly, for a quartic:
- Given quartic $ax^4 + bx^3 + cx^2 + dx + e = 0$, it is equivalent to some "depressed quartic"
$y^4 + py^2 + qy + r = 0$ where $y = x + b / (4a)$, $p = (8ac - 3b^2) / (8a^2))$,
$q = b^3 - 4abc + 8a^2d) / (8a^3))$, and $r = (16ab^2c + 256a^3e - 3b^4 - 64a^2bd) / (256a^4)$
(
h₁
inquartic_eq_zero_iff
). - When $q$ is zero, this is easily solved as a quadratic in $y^2$
(
quartic_eq_zero_iff_of_q_eq_zero
). - Otherwise one can directly derive a factorization of the depressed quartic into two quadratics,
in terms of some root of the cubic resolvent $u^3 - pu^2 - 4ru + 4pr - q^2 = 0$
(
quartic_depressed_eq_zero_iff
).
References #
The cubic formula was originally ported from Isabelle/HOL. The original file was written by Amine Chaieb.
The proof of the quartic formula is similar in structure to the cubic, and uses the formulation in Zwillinger, CRC Standard Mathematical Tables and Formulae.
Tags #
polynomial, cubic, quartic, root
The roots of a monic cubic whose quadratic term is zero and whose linear term is nonzero.
The Solution of Cubic. The roots of a cubic polynomial whose discriminant is nonzero.
The solution of the cubic equation when p equals zero.
Roots of a quartic whose cubic term is zero and linear term is nonzero,
In terms of some u
that satisfies a particular cubic resolvent.
The Solution of Quartic.
The roots of a quartic polynomial when q
is nonzero. See Zwillinger.
Here, u
needs to satisfy the cubic resolvent. An explicit expression of u
is possible using
the cubic formula, but would be too long.
The roots of a quartic polynomial when q
equals zero.