Polynomial Discriminant

Author

Eric W. Weisstein
October 4, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Algebra/PolynomialDiscriminant.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PolynomialDiscriminant.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

Advanced example from help browser entry for Resultant

Polynomial[l_List, x_] := Fold[x #1 + #2 &, 0, l]
Discriminant[p_?PolynomialQ,x_] :=
    With[{n = Exponent[p,x]}, 
      Cancel[
        ((-1)^(n(n-1)/2)Resultant[p,D[p,x],x])/
          Coefficient[p,x,n]
      ]
    ]

Examples

n=2

Discriminant[Polynomial[a/@Range[2,0,-1],z],z]/.a[n_]:>Subscript[a,n]//TraditionalForm

n=3

Discriminant[Polynomial[a/@Range[3,0,-1],z],z]/.a[n_]:>Subscript[a,n]//TraditionalForm

n=4

Discriminant[Polynomial[a/@Range[4,0,-1],z],z]/.a[n_]:>Subscript[a,n]//TraditionalForm

Example with Negative Discriminant

Discriminant[(x-1)(x-2)(x-I)(x-2I),x]

Degenerate Roots

Discriminant[(x-1)^2,x]