Proofwell
Menu

Quartic Equation Solver

Find all four roots of a quartic equation ax⁴ + bx³ + cx² + dx + e = 0, real or complex, including repeated roots. Answers are exact where possible. The working shows the discriminant, rational roots, quadratic factors and Ferrari's method.

Mathematics · AlgebraUpdated Sources cited

Enter the coefficients

Decimals and fractions are accepted (0.5, -3/4) and treated as exact values. Use 0 for a missing term.

Result

Two real roots and one pair of complex conjugates

Roots of the equation
RootExactDecimalMultiplicity
x₁Real−2-2−21
x₂Real1111
x₃Complexiii1
x₄Complex−i-i−i1
Factored form (over the rationals)
(x+2)(x−1)(x2+1)(x + 2)(x - 1)(x^{2} + 1)
Discriminant Δ
−3600-3600
Assumptions behind this result
  • Coefficients are real numbers; decimals are treated as exact values (0.1 means exactly 1/10).
  • Roots are found over the complex numbers. Irrational roots that have no simpler exact form are given as decimals.

Step-by-step solution

Every step is computed from your input
  1. Step 1: Write the equation in standard form

    The leading coefficient a = 1 is not zero, so this is a quartic equation with exactly 4 roots, counted with multiplicity.

    x4+x3−x2+x−2=0x^{4} + x^{3} - x^{2} + x - 2 = 0
  2. Step 2: Compute the discriminant

    The discriminant of a quartic (16 terms in full) tells you what kind of roots to expect. Substituting a = 1, b = 1, c = -1, d = 1, e = -2: Δ < 0, so the quartic has two distinct real roots and a pair of complex conjugate roots.

    Δ=256a3e3−192a2bde2−128a2c2e2+⋯+b2c2d2=−3600Δ = 256a^3e^3 - 192a^2bde^2 - 128a^2c^2e^2 + \dots + b^2c^2d^2 = -3600
  3. Step 3: Test for rational roots

    By the rational root theorem, any rational root p/q of x^4 + x^3 - x^2 + x - 2 has p dividing 2 and q dividing 1. Testing each candidate shows that x = -2 and x = 1 are roots.

    ±pq: −2, −1, 1, 2\pm\frac{p}{q}:\ -2,\ -1,\ 1,\ 2
  4. Step 4: Divide out the factor (x + 2)

    Since x = -2 is a root, (x + 2) is a factor. Polynomial division gives the remaining factor.

    x4+x3−x2+x−2=(x+2)(x3−x2+x−1)x^{4} + x^{3} - x^{2} + x - 2 = (x + 2)\left(x^{3} - x^{2} + x - 1\right)
  5. Step 5: Divide out the factor (x - 1)

    Since x = 1 is a root, (x - 1) is a factor. Polynomial division gives the remaining factor.

    x3−x2+x−1=(x−1)(x2+1)x^{3} - x^{2} + x - 1 = (x - 1)\left(x^{2} + 1\right)
  6. Step 6: Solve x^2 + 1 = 0 with the quadratic formula

    Here the discriminant b² − 4ac = -4 is negative, so the two roots are complex conjugates.

    x=−(0)±−42⋅1=i, −ix = \frac{-(0) \pm \sqrt{-4}}{2 \cdot 1} = i,\ -i
  7. Step 7: Check the roots

    By Vieta's formulas, the roots (counted with multiplicity) must add up to −b/a. They add up to -1, which matches −b/a = -1.

    x1+⋯+x4=−ba=−1x_1 + \dots + x_4 = -\frac{b}{a} = -1

What the calculator does

Enter the five coefficients of a quartic equation and the solver returns:

  • all four roots, counted with multiplicity, whether real or complex;
  • exact values for rational roots and for roots of quadratic factors;
  • the discriminant and an exact count of the real roots;
  • the factored form over the rational numbers;
  • step-by-step working.

How to use it

Write the equation as ax⁴ + bx³ + cx² + dx + e = 0 and enter the five coefficients. Use 0 for any missing term: for x⁴ − 16 = 0, enter a = 1, b = 0, c = 0, d = 0, e = −16. Decimals and fractions are treated as exact values.

The method

1. Look for rational roots

By the rational root theorem, a rational root p/q of an integer-coefficient quartic has p dividing e and q dividing a. Each root found gives a linear factor, and dividing it out leaves a cubic or quadratic.

2. Look for quadratic factors

A quartic without rational roots may still split into two quadratics with rational coefficients. The solver finds such factors by grouping the roots in pairs and confirms each one by exact polynomial division.

3. Ferrari’s method

Otherwise, dividing by a and substituting x = y − b/(4a) gives the depressed quartic

y4+py2+qy+r=0y^4 + py^2 + qy + r = 0

If q = 0, this is a quadratic in y². If not, Ferrari’s idea is to add a parameter m so that both sides become perfect squares. That works when m is a root of the resolvent cubic

8m3+8pm2+(2p2−8r)m−q2=08m^3 + 8pm^2 + (2p^2 - 8r)m - q^2 = 0

With s = √(2m), the quartic then factors into two quadratics:

(y2−sy+p2+m+q2s)(y2+sy+p2+m−q2s)=0\left(y^2 - sy + \tfrac{p}{2} + m + \tfrac{q}{2s}\right)\left(y^2 + sy + \tfrac{p}{2} + m - \tfrac{q}{2s}\right) = 0

The discriminant

Value of Δ Roots
Δ > 0 four distinct roots, either all real or all non-real
Δ = 0 at least one repeated root
Δ < 0 two distinct real roots and a pair of complex conjugates

Worked example

Solve x⁴ − 5x² + 4 = 0.

  1. Spot the structure. There are no odd powers, so substitute z = x² to get z² − 5z + 4 = 0.
  2. Solve the quadratic. (z − 1)(z − 4) = 0, so z = 1 or z = 4.
  3. Take square roots. x² = 1 gives x = ±1; x² = 4 gives x = ±2.

The roots are -2, -1, 1, 2, and the discriminant is 5184, which is positive, consistent with four distinct real roots.

Common mistakes

  • Taking only the positive square root. In a biquadratic, each positive value of x² gives two roots, ±√z.
  • Forgetting complex roots. A negative value of z = x² still gives two roots, ±i√|z|.
  • Assuming Δ > 0 means four real roots. It can also mean no real roots at all.
  • Dividing by x without recording x = 0. If e = 0, x = 0 is a root; record it before dividing.

Practical applications

  • Geometry. Intersections of two conic sections, such as an ellipse and a circle, lead to quartic equations.
  • Computer graphics. Ray tracing a torus requires solving a quartic for each ray.
  • Mechanics. Some beam deflection and orbit problems lead to quartics.
  • Linear algebra. The eigenvalues of a 4×4 matrix are roots of its characteristic quartic.

Assumptions and limitations

Coefficients must be real numbers. Rational roots and roots of quadratic factors are given exactly. Other roots are computed numerically to about 15 significant digits. The Ferrari working is computed independently and checked against these roots; if the two ever disagree, the solver shows the numerical result without the Ferrari steps rather than display working that does not match.

Frequently asked questions

How many roots does a quartic equation have?

Exactly four, counted with multiplicity, over the complex numbers. With real coefficients, the non-real roots come in conjugate pairs, so a quartic has four, two or zero real roots, counted with multiplicity.

What is a biquadratic equation?

A quartic with only even powers, ax⁴ + cx² + e = 0. Substituting z = x² turns it into a quadratic in z. Solve that, then take both square roots of each value of z.

Why can a quartic factor even when it has no rational roots?

It can split into two quadratics with rational coefficients. x⁴ + 4 has no real roots at all, yet x⁴ + 4 = (x² − 2x + 2)(x² + 2x + 2). The solver checks for this before using Ferrari's method.

Is there a formula for fifth-degree equations?

Not in general. The Abel–Ruffini theorem shows that no formula built from the coefficients using arithmetic and radicals solves every quintic. Quartics are the highest degree with such a formula.

Why does a positive discriminant not tell me whether the roots are real?

For a quartic, Δ > 0 means the roots are distinct and either all real or all non-real. The solver resolves this exactly by counting sign changes in the polynomial's Sturm sequence.

References

  1. Cardano, G. (1545). Ars Magna. Includes Lodovico Ferrari's solution of the quartic.
  2. Weisstein, E. W. Quartic Equation. MathWorld, Wolfram Research.
  3. Aberth, O. (1973). Iteration methods for finding all zeros of a polynomial simultaneously. Mathematics of Computation, 27(122), 339–344.