Cubic Equation Calculator
Welcome to Omni's cubic equation calculator! Whenever you need to determine the roots of a cubic equation or find the equation of a cubic graph, don't hesitate to shamelessly use this cubic equation solver! Our calculator can also plot graphs of cubic polynomials!
Need to learn what a cubic equation is? Looking for the cubic equation formula? Wonder how to solve cubic equations, or rather how to write a cubic equation from a graph? Scroll down to find a concise & precise article explaining what the solution of a cubic equation looks like and how to factorize a cubic equation. We've included a bunch of cubic equation examples as well!
What is a cubic equation?
Recall that a polynomial is an algebraic expression of the form
anxn + an-1xn-1 + …. + a2x2 + a1x + a0,
an, ..., a0 are called coefficients. We assume that the coefficients are real numbers.
Examples of polynomials are:
3x + 5;
x2 + 5x - 2;
2x3 + x2 - x + 3.
The largest number
n such that
an ≠ 0 is called the degree of the polynomial. The degrees of the above examples are:
A polynomial of degree
3 is called a cubic polynomial. And a cubic equation is the equation saying that a cubic polynomial is equal to zero:
a3x3 + a2x2 + a1x + a0 = 0,
or, using the notation from our cubic equation calculator:
ax3 + bx2 + cx + d = 0.
Cubic equations appear in many different areas of maths and science. For instance:
What are the roots of a cubic equation?
A root of a cubic equation is every argument
x that satisfies this cubic equation.
2 is a root of
x3 - 8 = 0
23 - 8 = 8 - 8 = 0.
It follows from the fundamental theorem of algebra that every cubic equation has exactly three complex roots. Some of these roots, however, may be equal. For instance, the equation
x3 = 0
has a root
0 with multiplicity three.
A cubic equation always has at least one real root. The other two roots might be real or complex. In the latter case, they are a pair of conjugate numbers, i.e., their real parts are equal, and their imaginary parts have opposite signs. For instance, the other two roots of
x3 - 8 = 0
-1 + 1.73205i and
-1 - 1.73205i.
In general, finding the roots of cubic equations may be challenging. It's definitely more complicated than in the case of quadratic trinomials, where we have the well-known quadratic formula. Fortunately, there's Omni's cubic equation calculator, which can find the roots of any cubic equation in no time!
How to use this cubic equation calculator?
We've designed this cubic equation calculator to be as intuitive to use as possible! Here's a brief instruction on how to use it most effectively:
Enter the coefficients of the cubic equation you want to solve.
The roots appear beneath the cubic equation calculator. These are the solutions to your cubic equation!
You will also see the discriminant of your cubic equation.
Discriminants encode some important information about the properties of cubic polynomials. See below for details.
At the very bottom of this cubic equation solver, you will also find the graph of your cubic polynomial. You can even adjust the portion of the x-axis covered by the plot!
How to solve a cubic equation by hand?
If you are somehow able to determine one root, then finding the other two poses no problem since your task reduces to solving a quadratic equation, which you can do either by factoring or by using the quadratic formula.
Here's how to perform this reduction. Assume you have found a root
q. Then you need to divide your cubic polynomial by
x - q to arrive at a quadratic polynomial. To perform the division, you may want to use the method of synthetic division.
But how to find the initial root? Well, there are no easy and 100% successful recipes. If your polynomial has rational coefficients, try performing the rational root test. Should the polynomial have a rational root, this method will find it. You may also try plotting the polynomial and guessing its root from the graph. If you don't succeed, use the cubic equation formula, which is not the most user-friendly method in mathematics but always yields the correct result!
What is the cubic equation formula?
The cubic equation formula allows you to compute the roots of a cubic polynomial. It uses the polynomial coefficients, the four basic arithmetic operations (addition, subtraction, multiplication, division), the square root, √, and the cube root, ∛.
Let us consider the equation:
ax³ + bx² + cx + d = 0.
a ≠ 0. Its roots are:
x1 = S + T - b/(3a)
x2 = -(S + T)/2 + (S - T)*i√3/2 - b/(3a)
x3 = -(S + T)/2 - (S - T)*i√3/2 - b/(3a)
S=∛(R + √(Q³ + R²))
T=∛(R - √(Q³ + R²))
Q = (3ac - b²) / (9a²)
R = (9abc - 27a²d - 2b³) / (54a³)
|💡 This method is also known as the Cardano formula as it was published by Gerolamo Cardano in 1545. It is believed that this formula was first derived by Scipione del Ferro.|
Discriminant of a cubic equation
The discriminant of our cubic equation is given by the following formula:
Δ = b²c² - 4ac³ - 4b³d - 27a²d² + 18abcd.
It turns out that the expression
Q³ + R² is closely related to the discriminant.
Indeed, by direct calculation, we obtain
Q³ + R² = -Δ / (108a⁴).
In particular, the sign of
Q³ + R² is opposite to that of the discriminant.
The sign of
Δ provides us with some knowledge about the roots of our polynomial. Namely:
Δ > 0, then the polynomial has three distinct real roots.
Δ < 0, then the polynomial has one real root and two non-real complex conjugate roots.
Δ = 0, then the polynomial has three real roots, and at least two of them are equal.
b² = 3ac, then the polynomial has a triple root:
x1 = x2 = x3 = -b / (3a)
b² ≠ 3ac, then the polynomial has a double root:
x1 = x2 = (9ad - bc) / (2b² - 6ac)
and a simple root:
x3 = (4abc - 9a²d - b³) / (ab² - 3a²c)
Therefore, if you only need to know, for instance, whether a given cubic equation has three real roots, and you don't need the exact values of these roots, just calculate the discriminant and not the whole of the Cardano formula - you're gonna save a lot of time⏰!
Cubic equation - examples
Find the roots of the cubic equation
x³ - 4x² + 4x = 0.
We can factor out
x³ - 4x² + 4x = x(x² - 4x + 4).
This means that
x = 0 is one of the roots!
In order to find the other two roots, we need to factor the trinomial
x² - 4x + 4.
After a moment of thought, we can recognize here the short multiplication formula
(a - b)² = a² - 2ab + b²
a = x and
b = 2. That is, we have
x² - 4x + 4 = (x - 2)².
Therefore, the two roots we've been looking for are both equal to
2. We can also say that
2 is a double root of our equation.
We can now answer the question, "How to factorize the cubic equation
x³ - 4x² + 4x = 0?" Namely, the factorization reads:
x³ - 4x² + 4x = x(x - 2)².
Find the roots of the cubic equation
x³ + 2x² + 3x + 2 = 0.
The rational root test tells us that
-1 is a root of our polynomial. This means that this polynomial is divisible by
(x + 1). We perform the division, using, e.g., synthetic division, and obtain:
(x³ + 2x² + 3x + 2) / (x + 1) = x² + x + 2
It remains to factor the quadratic trinomial
x² + x + 2. We use the quadratic formula to deduce that its roots are (approximately) equal to
-0.5 - 1.323i and
-0.5 + 1.323i.
Find the roots of the cubic equation
x³ - 2x² - 3x + 2 = 0.
This time, the rational root test says that our polynomial has no rational roots. We will finally make use of the Cardano formula! Here it is, in all its glory:
We start by computing:
Q = (3 * 1 * (-3) - (-2)²) / (9* 1²) = -13/9
R = (9 * 1 * (-2) * (-3) - 27 * 1 * 2 - 2 * (-2)³) / (54 * 1³) = 8/27
S ≈ 1.07347 + 0.54047i
T ≈ 1.07347 - 0.54047i.
Finally, the roots of our cubic equation are:
x₁ ≈ 2.81361
x₂ ≈ -1.34292
x₃ ≈ 0.52932.
Observe that, even though
T are complex, all three roots are real!
You can use our cubic equation calculator to generate many more examples and become the master of cubic polynomials 🥇!
How do I write a cubic equation from a graph?
The roots of a cubic equation correspond to the points where the graph of the cubic polynomial crosses the horizontal axis. However, this method is not very precise! You should rather treat these points as guesses and verify them algebraically. If your graph appears to cross the x-axis at
q, try dividing your cubic polynomial by
x- q. If there is no remainder, then
q is indeed a root. Otherwise, it's not.
How do I factorize cubic equations?
To factorize a cubic equation, you need to know its roots. If these roots are
x₁, x₂, x₃, then the factorization reads
a(x - x₁)(x - x₂)(x - x₃), where
a is the leading coefficient of your polynomial. To find the roots, use the cubic equation formula (Cardano formula).
How do I solve a cubic equation by hand?
Solutions to a cubic equation, i.e., the roots of a cubic polynomial, are given by the Cardano formula. If you already know one of the roots, say
q, then factor out the corresponding binomial
x - q and use the quadratic formula.
How do I find a cubic equation when roots are given?
It's straightforward to find a cubic equation when roots are given!
- Assume these roots are
x₁, x₂, x₃.
- Write down the product
(x - x₁)(x - x₂)(x - x₃).
- Perform the standard polynomial multiplication.
- You have just obtained the desired cubic polynomial! Well done! :)
- Tip: you can adjust the resulting polynomial to your needs by multiplying it by any number you wish. The roots will stay the same!
How do I convert a cubic equation into a quadratic equation?
Strictly speaking, you can't convert a cubic equation into a quadratic one. What you can do is divide your cubic polynomial by the binomial
x - q, where
q is a root of the cubic polynomial in question. This will yield a quadratic trinomial.
To perform the division, you can resort to the well-known method of synthetic division.
How do I solve a cubic equation using synthetic division?
To solve a cubic equation using synthetic division:
- Find one of the roots of your equation.
- Let's denote this root by
- Use synthetic division to divide your cubic polynomial by
x - qto obtain a quadratic trinomial.
- Apply the quadratic formula to find the quadratic trinomial's roots.
- These two roots, along with the initial root
q, are the solutions to your cubic equation.