# 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:

Introduced in 2007
(6.0)
{"ft_lang_label":"__label__en","ft_lang_prob":0.76081234,"math_prob":0.86139405,"size":1497,"snap":"2020-24-2020-29","text_gpt3_token_len":317,"char_repetition_ratio":0.1922304,"word_repetition_ratio":0.06363636,"special_character_ratio":0.19505678,"punctuation_ratio":0.12,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9820946,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14],"im_url_duplicate_count":[null,4,null,4,null,4,null,4,null,4,null,4,null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-07-09T09:52:45Z\",\"WARC-Record-ID\":\"<urn:uuid:39360a7b-11bf-4878-be16-f7e3cc500ebf>\",\"Content-Length\":\"92376\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:89bce84f-0f5a-4670-85f8-2eb59e394771>\",\"WARC-Concurrent-To\":\"<urn:uuid:637c41fa-5c71-4034-a5bc-310c65276584>\",\"WARC-IP-Address\":\"140.177.205.163\",\"WARC-Target-URI\":\"https://reference.wolfram.com/language/ref/Discriminant.html\",\"WARC-Payload-Digest\":\"sha1:WFJ3SP36BQ6L664KOPTA5WHAL6XDHQ5B\",\"WARC-Block-Digest\":\"sha1:TTYH6VLSR3MP56M3R52RULA2UV2OMVTB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-29/CC-MAIN-2020-29_segments_1593655899209.48_warc_CC-MAIN-20200709065456-20200709095456-00352.warc.gz\"}"}