Quartic Equation
solver.
Find all four roots of a degree 4 polynomial, real or complex, exact where possible.
- Real roots, with repeats
- 4
- Discriminant Δ
- 57600
- Largest leftover
- Under 10⁻⁹
The curve crosses the x-axis at x = −2, −1, 2, 3.
The curve and its real roots
Drag the point up or down to change eThe curve meets the x-axis at −2, −1, 2, 3 and turns at x = −1.56, 0.5, 2.56. Dragging the point slides the whole curve up or down by changing e.
All the roots on the complex plane
- −2
- −1
- 2
- 3
Every root is real, so every point sits on the flat axis.
Each root
| Root | Value | Type |
|---|---|---|
| Root 1Real | −2 | Real |
| Root 2Real | −1 | Real |
| Root 3Real | 2 | Real |
| Root 4Real | 3 | Real |
What if e changes
| e | Real roots | Where it crosses |
|---|---|---|
| −18 | 2 | −2.68, 3.68 |
| −8 | 2 | −2.52, 3.52 |
| 2 | 4 | −2.33, −0.21, 1.21, 3.33 |
| 12(yours) | 4 | −2, −1, 2, 3 |
| 22 | 0 | None |
| 32 | 0 | None |
| 42 | 0 | None |
Steps of 10. The number of real roots changes between e = −8 and e = 2, where the curve slides past a turning point.
Working
- 1Read off the numbersa = 1, b = −2, c = −7, d = 8, e = 12
- 2Rational root test: try ± (a factor of e) over (a factor of a)It finds x = −2, −1, 2, 3
- 3Factor over the real numbers(x + 2)(x + 1)(x − 2)(x − 3) = 0
- 4Check: put each root back, and add and multiply all the rootsAt x = −2, the left side is about 0At x = −1, the left side is about 0At x = 2, the left side is about 0At x = 3, the left side is about 0Sum 2 = −ba = 2Product 12 = ea = 12
How it's worked out
A quartic is a polynomial whose highest power is x to the fourth. Over the complex numbers it always has four roots if you count repeats, so it can be written as a times four factors.
A general formula exists, but it runs through a cubic and is far too long to use by hand. So the tool works the way a careful student would. First it tests the shortcuts, then it falls back on numbers.
- Rational roots. With whole-number coefficients, any fraction root is p over q, where p divides e and q divides a. Each one found is divided out, and the polynomial left is one degree lower.
- Two quadratics. If no fraction root exists, the tool tries to split the quartic into two whole-number quadratics. The quadratic formula then gives each pair, as square roots or as a complex pair.
- Biquadratic. With no x cubed or x term, the swap u = x² turns it into a quadratic in u. Each u gives two roots, plus and minus its square root.
- Numbers. If none of these works, the roots are found numerically and polished. Then the answer is shown in decimals only.
The last step of the working is a check. Each root goes back into the polynomial and should leave about 0. The four roots should also add up to b over a with its sign flipped, and multiply to e over a.
Worked examples
Priya factors her homework quartic
Here a is 1, so every fraction root would be a whole number that divides 12. Trying them finds four: −2, −1, 2, 3. That uses up all four roots, so the factored form is (x + 2)(x + 1)(x − 2)(x − 3).
The check agrees. The roots add to 2, which is minus b over a, and multiply to 12, which is e over a. The graph crosses the x-axis four times, with low points at a height of −4 and a high point at 14.0625.
Those heights tell Priya what would change the answer. Raise the constant from 12 to 16 and the low points just touch the axis, leaving 2 double roots. Raise it to 17 and 0 real roots are left. Drop it to −3.0625 and only 2 survive.
A biquadratic with no fraction roots
No whole number divides 2 and works, and it does not split into whole-number quadratics. But it has no x cubed or x term, so put u = x². That gives u² − 4u + 2 = 0, with a discriminant of 8.
Both values of u are positive, so all 4 roots are real. In decimals they are −1.8478, −0.7654, 0.7654, 1.8478.
Two real roots and a complex pair
This one splits into 2 whole-number quadratics. The factor x² − 2 gives the real roots plus and minus the square root of 2, about 1.4142. The factor x² + 1 never reaches 0 for a real x, so it gives the complex pair i and −i.
So the graph crosses the axis only twice, and the discriminant is −2,592. A negative discriminant always means exactly two real roots, as long as no root repeats.
Reading your result
Real roots come in 4, 2 or 0. A polynomial with real coefficients has complex roots in conjugate pairs, a + bi with a − bi. So a quartic cannot have one or three real roots once repeats are counted.
Touching and crossing. At a root that repeats an even number of times, the graph touches the x-axis and turns back. At an odd one it crosses. The equation x⁴ − 4x² + 4 has 2 double roots, so its graph only touches the axis.
The discriminant is a to the sixth times the product of every squared difference of two roots (MathWorld). It is 0 when a root repeats. With distinct roots, a negative value means two real roots. A positive value means four or none: x⁴ + 1 has a positive discriminant of 256 and 0 real roots.
Turning points. A degree 4 curve has at most three turning points. They decide the pattern: if the low points sit above the axis, there are no real roots.
Common mistakes
- Dropping a zero coefficient. For x⁴ − 5x² + 4, b and d are 0. Leaving them out of the boxes shifts every number into the wrong power.
- Stopping at whole numbers. The rational root test includes fractions. For 2x⁴ − 3x³ − 3x² + 2x, one root is 1 over 2, and it shows up as the factor 2x − 1.
- Taking only the positive square root. In a biquadratic each u gives two roots, plus and minus its square root, and a negative u gives an imaginary pair.
- Trusting a repeated irrational root to many digits. The double roots of (x² − 2)² can only be pinned down to about seven or eight digits, so the last digits shown are less sure than for a single root.