# Discriminant

Discriminant[poly,var]

computes the discriminant of the polynomial poly with respect to the variable var.

Discriminant[poly,var,Modulusp]

computes the discriminant modulo .

# Details and Options • The discriminant of a polynomial with leading coefficient one is the product over all pairs of roots , of .
• A Method option can be given, with typical possible values being Automatic, "SylvesterMatrix", "BezoutMatrix", "Subresultants", and "Modular".

# Examples

open allclose all

## Scope(4)

Discriminant of a polynomial with numeric coefficients:

Discriminant of a general cubic:

Discriminant of a general quintic:

Discriminants are squares of differences of roots:

## Options(4)

### Method(1)

This compares timings of the available methods of discriminant computation:

### Modulus(3)

By default the discriminant is computed over the rational numbers:

Compute the discriminant of the same polynomial over the integers modulo 2:

Compute the discriminant of the same polynomial over the integers modulo 3:

## Applications(2)

Decide whether a polynomial has multiple roots:

Find the condition for a cubic to have multiple roots:

## Properties & Relations(3)

The discriminant is zero if and only if the polynomial has multiple roots:

The discriminant can be represented in terms of roots as :

Equation relates Discriminant and Resultant:

## Possible Issues(1)

Using exact coefficients, this indicates no common root:

With approximate coefficients, this does indicate a common root:

in this case, using higher precision resolves the problem: