Skip to content

Polynomial Discriminant Calculator

Calculate the discriminant of polynomials from the second to the fifth degree.

Polynomial Discriminant Calculator

At first glance, the polynomial discriminant may seem like a rather dry subject, but it actually answers a very practical question: Are the roots of this polynomial genuinely distinct, or do some of them coincide?

This calculator finds the discriminant of quadratic, cubic, quartic, and quintic polynomials. It is straightforward to use: select the degree of the polynomial, enter the coefficients in the correct order, and the tool returns the discriminant. The part that requires the most care is not the calculation itself, but reading and entering the coefficients correctly.

What Is the Discriminant Used For?

The discriminant is a number that provides information about the roots of a polynomial. The safest and most general interpretation is as follows:

\[
\Delta = 0
\]

means that the polynomial has a repeated root. In other words, at least two roots have the same value.

\[
\Delta \ne 0
\]

means that the roots do not coincide.

The discriminant is more familiar in quadratic equations. The expression \(b^2-4ac\), commonly remembered from high school, is also a discriminant. For quadratics, its sign can also be interpreted: a positive value means two real roots, zero means a repeated root, and a negative value means there are no real roots. However, such a brief interpretation is not always sufficient for cubic, quartic, and quintic polynomials. For higher-degree polynomials, it is generally more reliable to use the discriminant first to answer the question, “Does the polynomial have a repeated root?”

How Should the Coefficients Be Entered?

Select the degree that matches the polynomial, then fill in the coefficient fields displayed by the tool.

For a quadratic polynomial, the form is:

\[
P(x)=a_2x^2+a_1x+a_0
\]

Here, \(a_2\) is the number in front of the \(x^2\) term. \(a_1\) is the coefficient of the \(x\) term, and \(a_0\) is the constant term.

For a cubic polynomial, one more term is added:

\[
P(x)=a_3x^3+a_2x^2+a_1x+a_0
\]

The same pattern continues for quartic and quintic polynomials:

\[
P(x)=a_4x^4+a_3x^3+a_2x^2+a_1x+a_0
\]

\[
P(x)=a_5x^5+a_4x^4+a_3x^3+a_2x^2+a_1x+a_0
\]

Most coefficient-entry errors occur when a term is missing. For example, consider the following polynomial:

\[
x^4-5x^2+4
\]

There are no \(x^3\) or \(x\) terms. This does not mean that those terms should simply be ignored; their coefficients are \(0\). The values must therefore be entered as follows:

\[
a_4=1,\quad a_3=0,\quad a_2=-5,\quad a_1=0,\quad a_0=4
\]

Leaving a field blank is not the same as entering zero. This distinction is especially important when using calculators.

The General Idea: What Happens When Roots Approach Each Other?

The idea behind the discriminant is based on the differences between the roots. The general concept can be expressed with the following formula:

\[
\Delta=a_n^{2n-2}\prod_{i<j}(r_i-r_j)^2
\]

Here, \(a_n\) is the leading coefficient, meaning the number in front of the highest-degree term. The symbols \(r_i\) and \(r_j\) represent the roots of the polynomial.

The key part of this formula is:

\[
(r_i-r_j)^2
\]

If two roots are equal, the difference between them is \(0\). If even one factor in the product is \(0\), the entire product becomes \(0\). This is why the discriminant detects repeated roots.

You do not need to know the roots to use this formula in practice. The calculator obtains the same result directly from the coefficients. However, the formula provides a useful shortcut for understanding what the discriminant measures.

Calculation for a Quadratic Polynomial

For quadratic polynomials, the discriminant formula is short and familiar:

\[
P(x)=a_2x^2+a_1x+a_0
\]

\[
\Delta=a_1^2-4a_2a_0
\]

For example:

\[
P(x)=x^2-5x+6
\]

The coefficients of this polynomial are:

\[
a_2=1,\quad a_1=-5,\quad a_0=6
\]

Substituting these values gives:

\[
\Delta=(-5)^2-4\cdot1\cdot6
\]

\[
\Delta=25-24=1
\]

The result is \(1\). Because the discriminant is not zero, the polynomial has no repeated roots. Since this is a quadratic polynomial, we can also interpret \(\Delta>0\): the polynomial has two distinct real roots.

Indeed, factoring the polynomial gives:

\[
x^2-5x+6=(x-2)(x-3)
\]

The roots are \(2\) and \(3\). Because they are different, a nonzero discriminant is the expected result.

Example of a Repeated Root

Now consider a simple example in which the discriminant is zero:

\[
P(x)=x^2-4x+4
\]

The coefficients are:

\[
a_2=1,\quad a_1=-4,\quad a_0=4
\]

The discriminant is:

\[
\Delta=(-4)^2-4\cdot1\cdot4
\]

\[
\Delta=16-16=0
\]

This polynomial can also be written as:

\[
x^2-4x+4=(x-2)^2
\]

The root is therefore \(2\), but it occurs twice. A discriminant of zero indicates exactly this situation.

The Formula Is Slightly Longer for a Cubic

A cubic polynomial has the following form:

\[
P(x)=a_3x^3+a_2x^2+a_1x+a_0
\]

The discriminant formula is now more extensive:

\[
\Delta=a_1^2a_2^2-4a_0a_2^3-4a_3a_1^3-27a_0^2a_3^2+18a_0a_1a_2a_3
\]

It is normal for the formula to look lengthy at this point. The most important thing is to substitute each coefficient in the correct place.

Consider the following polynomial:

\[
P(x)=x^3-6x^2+11x-6
\]

Here:

\[
a_3=1,\quad a_2=-6,\quad a_1=11,\quad a_0=-6
\]

Substituting these values into the formula gives:

\[
\Delta=11^2(-6)^2-4(-6)(-6)^3-4(1)(11)^3-27(-6)^2(1)^2+18(-6)(11)(-6)(1)
\]

This is a long expression, so it is not particularly easy to follow mentally in a single step. Evaluating it term by term:

\[
11^2(-6)^2=4356
\]

\[
-4(-6)(-6)^3=-5184
\]

\[
-4(1)(11)^3=-5324
\]

\[
-27(-6)^2(1)^2=-972
\]

\[
18(-6)(11)(-6)(1)=7128
\]

Adding the terms gives:

\[
\Delta=4356-5184-5324-972+7128=4
\]

The discriminant is \(4\). The roots of this polynomial are \(1\), \(2\), and \(3\). Since the roots are distinct, the result is nonzero.

Why Use a Calculator Instead of Writing Out the Quartic Formula?

For quartic polynomials, the explicit discriminant formula written in terms of the coefficients is very long. Although it is possible to display the entire formula on the page, doing so would not make it easier for most users to understand. It is therefore clearer to use the idea of differences between the roots.

A quartic polynomial has the form:

\[
P(x)=a_4x^4+a_3x^3+a_2x^2+a_1x+a_0
\]

In terms of its roots, the discriminant can be expressed as:

\[
\Delta=a_4^6\prod_{i<j}(r_i-r_j)^2
\]

Consider the following example:

\[
P(x)=x^4-5x^2+4
\]

The coefficients are:

\[
a_4=1,\quad a_3=0,\quad a_2=-5,\quad a_1=0,\quad a_0=4
\]

This polynomial can be factored as:

\[
x^4-5x^2+4=(x^2-1)(x^2-4)
\]

\[
P(x)=(x-1)(x+1)(x-2)(x+2)
\]

Its roots are \(1\), \(-1\), \(2\), and \(-2\).

None of the roots have the same value, so the discriminant is expected to be nonzero. Multiplying the squared differences between the roots gives:

\[
\Delta=4\cdot1\cdot9\cdot9\cdot1\cdot16=5184
\]

The discriminant in this example is \(5184\).

The important point is that a large discriminant for a quartic polynomial does not, by itself, mean that the result is “better” or “more significant.” The main information is whether the discriminant is zero.

How to Interpret a Quintic Polynomial

A quintic polynomial is written as:

\[
P(x)=a_5x^5+a_4x^4+a_3x^3+a_2x^2+a_1x+a_0
\]

At this degree, the discriminant formula written in terms of the coefficients becomes even longer. Calculating it by hand is both tedious and prone to error. This is one of the situations in which the calculator is particularly useful.

The general idea based on differences between the roots remains the same:

\[
\Delta=a_5^8\prod_{i<j}(r_i-r_j)^2
\]

For example:

\[
P(x)=x^5-1
\]

The coefficients of this polynomial are:

\[
a_5=1,\quad a_4=0,\quad a_3=0,\quad a_2=0,\quad a_1=0,\quad a_0=-1
\]

The calculated discriminant is:

\[
\Delta=3125
\]

The result is nonzero, so the polynomial has no repeated roots. However, this does not mean that all of its roots are real. For quintic polynomials, conclusions about the roots should not be drawn too quickly from the sign or magnitude of the discriminant.

What Should You Consider When Reading the Result?

When interpreting the discriminant, the first question to ask is:

\[
\Delta=0 \text{ mı?}
\]

If the answer is yes, the polynomial has a repeated root. If the answer is no, the roots do not coincide.

For quadratic polynomials, the sign can also be interpreted. A positive discriminant indicates two distinct real roots, zero indicates a repeated real root, and a negative discriminant indicates that there are no real roots.

For higher-degree polynomials, the situation is more nuanced. In particular, for cubic, quartic, and quintic polynomials, the discriminant should not be interpreted simply as “positive is good, negative is bad.” Such shortcuts are sometimes useful in mathematics, but they can also be misleading.

Common Mistakes

Mixing up the order of the coefficients is one of the easiest mistakes to make in these calculations. Fields such as \(a_4\), \(a_3\), and \(a_2\) can easily be confused when they are filled in quickly.

Leaving a missing term blank is another common problem. If a polynomial has no \(x^3\) term, the field must not be ignored; its coefficient is \(0\).

The leading coefficient should also be checked. If degree five is selected, \(a_5\) must not be zero. Likewise, \(a_4\) must not be zero for a quartic polynomial, and \(a_3\) must not be zero for a cubic polynomial. Otherwise, the selected degree does not reflect the polynomial's actual degree.

Small rounding differences may occur with decimal coefficients. Discriminant formulas for higher-degree polynomials contain many products and powers, so even small differences in the coefficients can be magnified in the final result.

Where Is It Useful?

The discriminant is primarily used to determine whether any roots coincide. It provides a quick indication of a polynomial's structure when solving it, examining its graph, or before applying a numerical method.

For quadratic polynomials, it is used directly to interpret the number and type of roots. For higher-degree polynomials, it is particularly useful for identifying repeated roots. This provides a practical check in algebra problems, graph analysis, and certain numerical calculations.

How we tested it

This calculator was verified using known polynomial examples. For example, the expected discriminant is \(1\) for \(x^2-5x+6\), \(4\) for \(x^3-6x^2+11x-6\), \(5184\) for \(x^4-5x^2+4\), and \(3125\) for \(x^5-1\). With the coefficients entered in the correct positions, the tool produces the expected discriminant values for these examples.

Frequently Asked Questions

Does the discriminant give the roots individually?
No. The discriminant does not list the roots. It mainly indicates whether any roots coincide. To find the roots, you must also solve for them or factor the polynomial.
What does it mean if the discriminant is not zero?
The polynomial has no repeated roots. Its roots are distinct. However, this does not mean that all roots are real.
Why do I need to enter zero for missing terms?
Because the calculation follows the order of the coefficients. If a term is missing, its coefficient is \(0\). Leaving the field blank does not always mean the same thing mathematically.
Does a negative discriminant always mean there are no real roots?
No. This interpretation applies to quadratic polynomials. For higher-degree polynomials, a negative discriminant should not be interpreted in the same way.
What happens if the leading coefficient is zero?
The degree of the polynomial decreases. For example, if \(a_5=0\), the polynomial is not fifth-degree. In that case, select the correct degree.
Why is the result so large?
For higher-degree polynomials, the discriminant formula contains many products and powers. Therefore, the result can be large even when the coefficients look small. A large result has no special meaning by itself; it is more useful to check first whether it is zero.

References and Sources

The calculations on this page are based on the following standard and scientific references.

  1. Discriminant

    en.wikipedia.org
  2. Discriminant

    Encyclopedia of Mathematics.

    encyclopediaofmath.org
Last update:
Information is based on standard reference values. Verification recommended for critical projects.