Discriminants of the general polynomial of degree $n$
edit · history · discussion · files · long url · algebra polynomial
Polynomials
$n$ 
$\operatorname{disc}(f)$
1:
1
2:
a1^2 - 4*a0*a2
3:
a1^2*a2^2 - 4*a0*a2^3 - 4*a1^3*a3 + 18*a0*a1*a2*a3 - 27*a0^2*a3^2
4:
a1^2*a2^2*a3^2 - 4*a0*a2^3*a3^2 - 4*a1^3*a3^3 + 18*a0*a1*a2*a3^3 - 27*a0^2*a3^4 - 4*a1^2*a2^3*a4 + 16*a0*a2^4*a4 + 18*a1^3*a2*a3*a4 - 80*a0*a1*a2^2*a3*a4 - 6*a0*a1^2*a3^2*a4 + 144*a0^2*a2*a3^2*a4 - 27*a1^4*a4^2 + 144*a0*a1^2*a2*a4^2 - 128*a0^2*a2^2*a4^2 - 192*a0^2*a1*a3*a4^2 + 256*a0^3*a4^3
5:
a1^2*a2^2*a3^2*a4^2 - 4*a0*a2^3*a3^2*a4^2 - 4*a1^3*a3^3*a4^2 + 18*a0*a1*a2*a3^3*a4^2 - 27*a0^2*a3^4*a4^2 - 4*a1^2*a2^3*a4^3 + 16*a0*a2^4*a4^3 + 18*a1^3*a2*a3*a4^3 - 80*a0*a1*a2^2*a3*a4^3 - 6*a0*a1^2*a3^2*a4^3 + 144*a0^2*a2*a3^2*a4^3 - 27*a1^4*a4^4 + 144*a0*a1^2*a2*a4^4 - 128*a0^2*a2^2*a4^4 - 192*a0^2*a1*a3*a4^4 + 256*a0^3*a4^5 - 4*a1^2*a2^2*a3^3*a5 + 16*a0*a2^3*a3^3*a5 + 16*a1^3*a3^4*a5 - 72*a0*a1*a2*a3^4*a5 + 108*a0^2*a3^5*a5 + 18*a1^2*a2^3*a3*a4*a5 - 72*a0*a2^4*a3*a4*a5 - 80*a1^3*a2*a3^2*a4*a5 + 356*a0*a1*a2^2*a3^2*a4*a5 + 24*a0*a1^2*a3^3*a4*a5 - 630*a0^2*a2*a3^3*a4*a5 - 6*a1^3*a2^2*a4^2*a5 + 24*a0*a1*a2^3*a4^2*a5 + 144*a1^4*a3*a4^2*a5 - 746*a0*a1^2*a2*a3*a4^2*a5 + 560*a0^2*a2^2*a3*a4^2*a5 + 1020*a0^2*a1*a3^2*a4^2*a5 - 36*a0*a1^3*a4^3*a5 + 160*a0^2*a1*a2*a4^3*a5 - 1600*a0^3*a3*a4^3*a5 - 27*a1^2*a2^4*a5^2 + 108*a0*a2^5*a5^2 + 144*a1^3*a2^2*a3*a5^2 - 630*a0*a1*a2^3*a3*a5^2 - 128*a1^4*a3^2*a5^2 + 560*a0*a1^2*a2*a3^2*a5^2 + 825*a0^2*a2^2*a3^2*a5^2 - 900*a0^2*a1*a3^3*a5^2 - 192*a1^4*a2*a4*a5^2 + 1020*a0*a1^2*a2^2*a4*a5^2 - 900*a0^2*a2^3*a4*a5^2 + 160*a0*a1^3*a3*a4*a5^2 - 2050*a0^2*a1*a2*a3*a4*a5^2 + 2250*a0^3*a3^2*a4*a5^2 - 50*a0^2*a1^2*a4^2*a5^2 + 2000*a0^3*a2*a4^2*a5^2 + 256*a1^5*a5^3 - 1600*a0*a1^3*a2*a5^3 + 2250*a0^2*a1*a2^2*a5^3 + 2000*a0^2*a1^2*a3*a5^3 - 3750*a0^3*a2*a3*a5^3 - 2500*a0^3*a1*a4*a5^3 + 3125*a0^4*a5^4
Definition
For $n\geq 1$, let $f(x)=\sum_{i=0}^n a_i x^i$ be the general degree-$n$ polynomial with formal coefficients and leading coefficient $a_n$. The entry is the discriminant $\operatorname{disc}(f)$ using Formula (1) as its convention.
Parameters
$n$
—   degree ($n\geq 1$)
Formulas
(1)
$\operatorname{disc}(f)=(-1)^{n(n-1)/2}a_n^{-1} \operatorname{Res}(f,f')$, where the resultant is normalized as in [2] by $\operatorname{Res}(f,g)=a_n^{\deg g} \prod_{f(\alpha)=0}g(\alpha)$.
(2)
Equivalently, if $f(x)=a_n\prod_{j=1}^n(x-\alpha_j)$, then $\operatorname{disc}(f)=a_n^{2n-2}\prod_{1\leq i<j\leq n} (\alpha_i-\alpha_j)^2$.
(3)
$\operatorname{disc}(a_0+a_1x+a_2x^2)=a_1^2-4a_0a_2$.
(4)
$\operatorname{disc}(a_0+a_1x+a_2x^2+a_3x^3) =a_1^2a_2^2-4a_0a_2^3-4a_1^3a_3+18a_0a_1a_2a_3-27a_0^2a_3^2$.
Comments
(5)
The coefficient $a_i$ multiplies $x^i$, so $a_0$ is the constant term and $a_n$ is the leading coefficient.
(6)
For $n=1$, the product over pairs of roots is empty and $\operatorname{disc}(a_0+a_1x)=1$.
(7)
The entry for degree $n$ is written in the variables $a_0,\dots,a_n$.
(8)
Wikipedia's article on the discriminant [1] defines it by the root product of Formula (2), which is the convention used here.
Programs
(P1)
Sage
from sage.all import PolynomialRing, ZZ

n = 5
R = PolynomialRing(ZZ, ["a%s" % i for i in range(n + 1)])
a = R.gens()
S = PolynomialRing(R, "x")
x = S.gen()
f = sum(a[i] * x**i for i in range(n + 1))
sign = 1 if (n * (n - 1) // 2) % 2 == 0 else -1
numerator = sign * f.resultant(f.derivative())
disc, rem = numerator.quo_rem(a[n])
assert rem == 0
disc
Links
Data properties
Entries are of type: integral polynomial
Table is complete: no (it holds every degree $1\leq n\leq 5$; degree $6$ would use seven coefficient variables, more than polynomial search accepts, and the degree $5$ entry is already 1338 characters)
How they were obtained:

The generator computes exact integer coefficients in $\mathbb Z[a_0,\dots,a_n]$ from the resultant identity in Formula (1) and all arithmetic is exact.

more

It checks Formula (2) by substituting the elementary symmetric polynomials of the roots, $a_i=a_n(-1)^{n-i}e_{n-i}(\alpha_1,\dots,\alpha_n)$, for every stored degree, compares the quadratic and cubic rows from Formula (3) and Formula (4) against the stored values, and compares integer specialisations with Sage's exact univariate discriminant over $\mathbb Z[x]$.