Quartic Formula Calculator
This quartic formula calculator solves any equation of degree 4. It shows the depressed quartic and Ferrari's resolvent cubic, gives all four roots, real and complex, and checks every root by substitution.
Solution
- 2 real solutions
- x = 1 - √2, x = 1 + √2
- Complex pair With real coefficients, complex roots come in conjugate pairs a ± bi, so ± stands for two roots.
- x = -1/2 ± (√3/2)i
- x = 1 - √2 Exact, from the quadratic formula on a factor with rational coefficients.
- -0.4142135624 as a decimal
- x = 1 + √2 Exact, from the quadratic formula on a factor with rational coefficients.
- 2.414213562 as a decimal
- x = -1/2 ± (√3/2)i Exact, from the quadratic formula on a factor with rational coefficients.
- -0.5 ± 0.8660254038i as decimals
- The rest of the answer
- x^4 - x^3 - 2x^2 - 3x - 1 has no rational roots but splits into two quadratics with rational coefficients, so all its roots are exact.
- The equation
- x^4 - x^3 - 2x^2 - 3x - 1 = 0
- Everything to one side
- x^4 - x^3 - 2x^2 - 3x - 1 = 0
- Rational root theorem
- None of the 2 candidates p/q is a root, so no rational root
- Depressed quartic, x = y + 1/4
- y^4 - (19/8)y^2 - (33/8)y - 483/256 = 0
- Ferrari's resolvent cubic
- 8m^3 - 19m^2 + (211/8)m - 1089/64 = 0
- A root of the resolvent
- m = 9/8, and 2m = 9/4 = (3/2)^2, a perfect square, so the depressed quartic is a difference of two squares with rational coefficients
- Factored over the rationals
- (x^2 - 2x - 1)(x^2 + x + 1)
- Linear and quadratic equations are solved exactly. Higher degrees start with the rational root theorem, which finds every rational root. What is left is solved exactly where a formula applies and numerically where none does, complex roots included, and every root is checked by substitution.
- Polynomials in one variable. Trigonometry, logarithms, roots of expressions and calculus are outside what this does, and it names them rather than failing obscurely.
How the Algebra Calculator works
A quartic equation is a polynomial equation of degree 4, ax^4 + bx^3 + cx^2 + dx + e = 0. It has exactly four roots once complex roots and repeats are counted, and because the coefficients are real, any complex roots come in conjugate pairs. So a quartic has four real roots, two real roots and one complex pair, or two complex pairs.
Step 1: rational roots. Before any formula, the rational root theorem lists every fraction p/q that could be a root: p divides the constant term and q divides the leading coefficient. For x^4 - x^3 - 2x^2 - 3x - 1 the candidates are just 1 and -1, and neither works, so this quartic has no rational root. When one does work, it is divided out and what is left is a cubic.
Step 2: the depressed quartic. Dividing by a and substituting x = y - b/(4a) removes the cubic term. Here b/(4a) is -1/4, so x = y + 1/4, and the equation becomes y^4 - (19/8)y^2 - (33/8)y - 483/256 = 0, which has the form y^4 + Py^2 + Qy + R = 0.
Step 3: Ferrari's resolvent cubic. Ferrari's idea was to add a term m to both sides so the left becomes a perfect square, (y^2 + P/2 + m)^2, and choose m so the right is a perfect square too. That happens when m solves the resolvent cubic 8m^3 + 8Pm^2 + (2P^2 - 8R)m - Q^2 = 0, here 8m^3 - 19m^2 + (211/8)m - 1089/64 = 0. It has the root m = 9/8, and 2m = 9/4 is the square of 3/2.
Step 4: two quadratics. With that m the depressed quartic is a difference of two squares, (y^2 - 1/16)^2 - ((3/2)y + 11/8)^2, which factors into two quadratics. Shifting back to x gives x^4 - x^3 - 2x^2 - 3x - 1 = (x^2 - 2x - 1)(x^2 + x + 1). The calculator multiplies the two factors back together in exact fractions to confirm the split.
Step 5: the quadratic formula on each. x^2 - 2x - 1 = 0 gives x = 1 - √2 and x = 1 + √2, about -0.4142135624 and 2.414213562. x^2 + x + 1 = 0 has discriminant -3, so it gives the complex pair x = -1/2 ± (√3/2)i.
When the quartic does not split so neatly. The resolvent always has a root, but often not a rational one, and then the quartic formula writes each root as nested cube roots and square roots that run across several lines. Evaluated in decimals, that formula also loses digits to cancellation. So when a quartic does not factor over the rationals, the calculator finds the four roots numerically with the Aberth-Ehrlich method and then checks each one. A real root is checked by evaluating the polynomial in exact arithmetic just below and just above it: a sign change proves a root lies between. A complex root is checked by substituting it back. A quartic with no x^3 or x term, such as x^4 - 10x^2 + 1 = 0, is a quadratic in x^2 and comes out exactly as x = ±√(5 ± 2√6).
Why stop at four? Formulas in radicals exist for degrees 2, 3 and 4. Abel and Galois showed that no such formula exists for degree 5 or higher, so past quartics the roots are found numerically. This calculator solves those too, with the same checks.
Algebra Calculator FAQ
What is the quartic formula?
It is the general solution of ax^4 + bx^3 + cx^2 + dx + e = 0 in radicals, found by Lodovico Ferrari around 1540. Written out in full it runs to several lines of nested cube roots and square roots. In practice it is used as a method: depress the quartic, solve the resolvent cubic for m, split into two quadratics, then apply the quadratic formula to each.
How many roots does a quartic equation have?
Exactly four, counting complex roots and repeated roots. With real coefficients the complex ones come in conjugate pairs, so there are four real roots, two real roots and a complex pair, or two complex pairs. x^4 - x^3 - 2x^2 - 3x - 1 = 0 has two real roots, 1 ± √2, and the pair -1/2 ± (√3/2)i.
What is a depressed quartic?
A quartic with no cubic term, y^4 + Py^2 + Qy + R. Any quartic becomes one by dividing by the leading coefficient and substituting x = y - b/(4a). It is the first step of Ferrari's method, and it does not change the roots apart from shifting them by b/(4a).
Are the decimal roots exact?
No, and the calculator says so with ≈. A root shown as a decimal is given to 10 significant figures. Each real one is confirmed by an exact sign change on either side of it, and each complex one by substitution. Where the quartic factors over the rationals, or is a quadratic in x^2, the roots come out in exact radicals instead.
Can it solve a quartic with rational roots?
Yes, and those come first. (x - 1)(x - 2)(x - 3)(x - 4) = 0, expanded to x^4 - 10x^3 + 35x^2 - 50x + 24 = 0, gives 1, 2, 3 and 4 exactly by the rational root theorem, each checked by substituting it back in fractions.
More from the Algebra Calculator
Related calculators
- Fraction Calculator
- Factor Calculator
- Quadratic Formula Calculator
- System of Equations Calculator
- Log Calculator
- Distance Formula Calculator
- Slope Calculator
- Order of Operations Calculator
- Matrix Calculator
- Derivative Calculator
- Integral Calculator
- Pascal's Triangle
- Absolute Value Calculator
- Arithmetic Sequence Calculator