Omni Calculator logo

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+an1xn1+...+a2x2+a1x+a0\scriptsize a_n x^n + a_{n-1} x^{n-1} + ... + a_2 x^2 + a_1 x + a_0

where an,...,a0a_n,..., a_0 are called coefficients. We assume that the coefficients are real numbers.

Examples of polynomials are:

  • 3x+53x + 5;
  • x2+5x2x^2 + 5x - 2;
  • 2x3+x2x+32x^3 + x^2 - x + 3.

The largest number nn such that an0a_n \not = 0 is called the degree of the polynomial. The degrees of the above examples are: 1,21, 2 and 33, respectively.

A polynomial of degree 33 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,\scriptsize a_3 x^3 + a_2 x^2 + a_1 x + a_0 = 0,

or, using the notation from our cubic equation calculator:

ax3+bx2+cx+d=0.\scriptsize ax^3 + bx^2 + cx + d = 0.

Cubic equations appear in many different areas of maths and science. For instance:

  • The characteristic polynomials of a 3×3 matrix are the roots of a cubic polynomial.

  • Cubic regression is a statistical model that uses a cubic polynomial to describe relationships in data sets.

What are the roots of a cubic equation?

A root of a cubic equation is every argument xx that satisfies this cubic equation.
For instance, 22 is a root of

x38=0x^3 - 8 = 0

because

238=88=02^3 - 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=0x^3 = 0

has a root 00 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

x38=0x^3 - 8 = 0

are 1+1.73205i-1 + 1.73205i and 11.73205i-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:

  1. Enter the coefficients of the cubic equation you want to solve.

  2. The roots appear beneath the cubic equation calculator. These are the solutions to your cubic equation!

  3. 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.

  4. 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 (as in the factoring trinomials calculator) ​or by using the quadratic formula.

Here's how to perform this reduction. Assume you have found a root qq. Then you need to divide your cubic polynomial by xqx - q to arrive at a quadratic polynomial. To perform the division, you may want to use the method described in the synthetic division calculator.

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 (or use the rational zeros calculator to do it for you). 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:

ax3+bx2+cx+d=0\scriptsize ax^3 + bx^2 + cx + d = 0

where an0a_n \not = 0. Its roots are:

x1=S+Tb3a\scriptsize x_1 = S + T - \frac{b}{3a}
x2=S+T2+(ST)i32b3a\scriptsize x_2 = -\frac{S+T}{2} + (S-T)i\frac{\sqrt{3}}{2} - \frac{b}{3a}
x3=S+T2(ST)i32b3a\scriptsize x_3 = -\frac{S+T}{2} - (S-T)i\frac{\sqrt{3}}{2} - \frac{b}{3a}

where:

S=R+Q3+R23\scriptsize S = \sqrt[3]{R + \sqrt{Q^3 + R^2}}
T=RQ3+R23\scriptsize T = \sqrt[3]{R - \sqrt{Q^3 + R^2}}

and:

Q=3acb29a2\scriptsize Q = \frac{3ac - b^2}{9a^2}
R=9abc27a2d2b354a3\scriptsize R = \frac{9abc - 27a^2 d - 2b^3}{54a^3}

💡 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:

Δ=b2c24ac34b3d27a2d2+18abcd.\scriptsize \Delta = b^2 c^2 - 4ac^3 - 4b^3 d - 27a^2 d^2 + 18abcd.

💡 Did you know that Δ can tell us a lot about a polynomial and its solutions even before we actually find them? If not, check the discriminant calculator to learn more about it!

It turns out that the expression Q3+R2Q^3 + R^2 is closely related to the discriminant.
Indeed, by direct calculation, we obtain

Q3+R2=Δ108a4\scriptsize Q^3 + R^2 = \frac{-\Delta}{108a^4}

In particular, the sign of Q3+R2Q^3 + R^2 is opposite to that of the discriminant.

The sign of Δ\Delta provides us with some knowledge about the roots of our polynomial. Namely:

  • If Δ>0\Delta > 0, then the polynomial has three distinct real roots.

  • If Δ<0\Delta< 0, then the polynomial has one real root and two non-real complex conjugate roots.

  • If Δ=0\Delta = 0, then the polynomial has three real roots, and at least two of them are equal.

    • If b2=3acb^2 = 3ac, then the polynomial has a triple root:

      x1=x2=x3=b3ax_1 = x_2 = x_3 = \frac{-b}{3a}

    • If b23acb^2 \not = 3ac, then the polynomial has a double root:

      x1=x2=9adbc2b26acx_1 = x_2 = \frac{9ad - bc}{2b^2 - 6ac}

      and a simple root:
      x3=4abc9a2db3ab23a2cx_3 = \frac{4abc - 9a^2 d - b^3}{ab^2 - 3a^2 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

Example 1

Find the roots of the cubic equation x34x2+4x=0x^3 - 4x^2 + 4x = 0.

Solution:

We can factor out xx:

x34x2+4x=x(x24x+4)x^3 - 4x^2 + 4x = x(x^2 - 4x + 4).

This means that x=0x = 0 is one of the roots!

In order to find the other two roots, we need to factor the trinomial

x24x+4x^2 - 4x + 4

After a moment of thought, we can recognize here the short multiplication formula

(ab)2=a22ab+b2(a-b)^2 = a^2 - 2ab + b^2

with a=xa = x and b=2b = 2. That is, we have

x24x+4=(x2)2x^2 - 4x + 4 = (x-2)^2

Therefore, the two roots we've been looking for are both equal to 22. We can also say that 22 is a double root of our equation.

We can now answer the question, "How to factorize the cubic equation x34x2+4x=0x^3 - 4x^2 + 4x = 0 ?" Namely, the factorization reads:

x34x2+4x=x(x2)2x^3 - 4x^2 + 4x = x(x-2)^2.

Example 2

Find the roots of the cubic equation x3+2x2+3x+2=0x^3 + 2x^2 + 3x + 2= 0.

Solution:

The rational root test tells us that 1-1 is a root of our polynomial. This means that this polynomial is divisible by (x+1)(x + 1). We perform the division, using, e.g., synthetic division, and obtain:

x3+2x2+3x+2x+1=x2+x+2\frac{x^3 + 2x^2 + 3x + 2}{x+1}= x^2 + x + 2.

It remains to factor the quadratic trinomial x2+x+2x^2 + x + 2. We use the quadratic formula to deduce that its roots are (approximately) equal to 0.51.323i-0.5 - 1.323i and 0.5+1.323i-0.5 + 1.323i.

Example 3

Find the roots of the cubic equation x32x23x+2=0x^3 - 2x^2 - 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=31(3)(2)2912=139Q = \frac{3 \cdot 1 \cdot (-3) - (-2)^2}{9 \cdot 1^2} = -\frac{13}{9}

R=91(2)(3)27122(2)35413=827R = \frac{9 \cdot 1 \cdot (-2) \cdot (-3) - 27 \cdot 1 \cdot 2 - 2 \cdot (-2)^3}{54 \cdot 1^3} = \frac{8}{27}

and then:

S1.07347+0.54047iS \approx 1.07347 + 0.54047i

T1.073470.54047iT \approx 1.07347 - 0.54047i.

Finally, the roots of our cubic equation are:

x12.81361x_1 \approx 2.81361

x21.34292x_2 \approx -1.34292

x30.52932x_3 \approx 0.52932

Observe that, even though SS and TT 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 🥇!

FAQ

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!

  1. Assume these roots are x₁, x₂, x₃.

  2. Write down the product (x - x₁)(x - x₂)(x - x₃).

  3. Perform the standard polynomial multiplication.

  4. You have just obtained the desired cubic polynomial! Well done! :)

  5. 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:

  1. Find one of the roots of your equation.

  2. Let's denote this root by q.

  3. Use synthetic division to divide your cubic polynomial by x - q to obtain a quadratic trinomial.

  4. Apply the quadratic formula to find the quadratic trinomial's roots.

  5. These two roots, along with the initial root q, are the solutions to your cubic equation.

Anna Szczepanek, PhD
ax3 + bx2 + cx + d = 0
a
b
c
d
Check out 40 similar algebra calculators 🔡
Absolute value equationAbsolute value inequalitiesAdding and subtracting polynomials… 37 more
People also viewed…

Black hole collision

The Black Hole Collision Calculator lets you see the effects of a black hole collision, as well as revealing some of the mysteries of black holes, come on in and enjoy!

Check similarity in right triangles

This calculator to check similarity in right triangles allows you to find if two right triangles are similar or not.

Millionaire

This millionaire calculator will help you determine how long it will take for you to reach a 7-figure saving or any financial goal you have. You can use this calculator even if you are just starting to save or even if you already have savings.

Triangle scale factor

Use this triangle scale factor calculator to find the scale factor between two similar triangles.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service