Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to understand how to solve cubic equations using Cardano's formula. To test the method, I expand $(x-3)(x+1)(x+2)=x^3-7x-6$. My hope is that the formula will produce the roots $-1,-2,3$. But the formula seems to make a mess of things: I compute that $\frac{q^2}{4}+\frac{p^3}{27}=\frac{100}{27}$, and so the formula gives me the baffling \begin{equation} \sqrt[3]{3+i \sqrt{\frac{100}{27}}}+\sqrt[3]{3-i \sqrt{\frac{100}{27}}}. \end{equation}

I'd like to know if there is a straightforward way one or all of the roots $-1,-2,3$ from this expression. I've asked several people this question, and the usual punchline is that I've produced a proof that this expression is $-1,-2$ or $3$ (depending on the choice of cube root etc.) That is not my goal.

I found a book of Cardano's writings in the library, but it seems some of his writings have been lost. I'm convinced that he and his cohort had some method for doing this. So, does anyone know how to use the cubic formula for real? Specifically, in such a way as to recognize the output as a particular integer/rational number when it is one?


share|improve this question

4 Answers 4

This is the casus irreducibilis, first discussed in detail by Bombelli. We end up unavoidably needing to travel through the complex numbers to end up with real roots! This is important historically, since it was the first time that one needed to treat complex non-real numbers seriously. We do not need to worry about non-real numbers when solving quadratics, since after all we can say that there are no roots. But that is not the case here, since undeniably there are real roots.

When you are trying to find the cube roots of your complex expression, you can assume that a cube root of your first expression is $a+bi$. Cube this, and you will get some messy equations. But you can (in this case) "spot" a root, and then you are finished. But that is cheating, it is due entirely to the fact that the roots of the original cubic are "nice."

One workaround of sorts is to use the trigonometric solution to the cubic, which is uses the trigonometric identity $\cos 3\theta=4\cos^3\theta-3\cos\theta$. You may want to look at the Wikipedia article on the cubic, which is reasonably thorough.

share|improve this answer
I looked at Wikipedia; it didn't really answer my question. I'm trying to find a way to use Cardano's formula. It seems it is only of theoretical interest? –  Steven Spallone May 16 '12 at 1:28
Indeed, you are right, except we can find an expression for the required cube root by using De Moivre's Theorem. But that takes us again to transcendental functions, just like the trigonometric solution. –  André Nicolas May 16 '12 at 1:55

Cardano's formulas work like that. When a polynomial with real coefficients has three distinct real roots, the formulas give you two of the roots with complex numbers as intermediate steps. In your case, in fact: $$ \sqrt[3]{3+i \sqrt{\frac{100}{27}}} = \frac{3}{2}+i\frac{\sqrt{3}}{6}, \qquad \sqrt[3]{3-i \sqrt{\frac{100}{27}}} = \frac{3}{2}-i\frac{\sqrt{3}}{6}, $$ so their sum is $3$.

share|improve this answer
Okay, so here we are. How do you see "in fact..." without knowing already that -1,-2,3 are roots? To me, these facts seem more difficult to establish! –  Steven Spallone May 16 '12 at 1:35
Cardano's formulas work like that. When a polynomial with real coefficients has three distinct real roots, the formulas give you two of the roots with complex numbers as intermediate steps. In your case, in fact: $$ \sqrt[3]{3+i \sqrt{\frac{100}{27}}} = \frac{3}{2}+i\frac{\sqrt{3}}{6}, \qquad \sqrt[3]{3-i \sqrt{\frac{100}{27}}} = \frac{3}{2}-i\frac{\sqrt{3}}{6}, $$ so their sum is $3$. How on earth do you figure out things like $\sqrt[3]{3+i \sqrt{\frac{100}{27}}} = \frac{3}{2}+i\frac{\sqrt{3}}{6}$? –  user42091 Sep 21 '12 at 16:44

It is possible to prove that if $a$ and $b$ are relatively prime integers such that $a$ is not divisile by $3,$ then the cubic $x^{3}+ax+b$ has all its roots integers if and only if $4a^{3}+27b^{2}= -c^{2}$ for some integer $c.$ If $a$ is divisible by $3,$ but $a$ and $b$ are still relatively prime, then the situation is more complicaed, and there are three integer roots if and only if $4a^{3}+27b^{2} = -729c^{2}$ for some integer $c.$ In the first case, there are integers $s$ and $t$ such that $-a = s^{2}+t^{2}-st,$ $b = st(s-t)$, and the roots are $-s,t$ and $s-t$. In the second case, there are integers $s$ and $t$ such that $-a = 3(s^{2}+t^{2}-st)$ and the roots are $s+t, t-2s$ and $s-2t$. The only way I know to prove this myself is using the fact that the Eisenstein integers are a unique factorization domain. The ring of Eisenstein integers is $\mathbb{Z}[\omega]$, where $\omega$ is a complex primitive cube root of unity.

share|improve this answer
Thanks for the info, though I still don't see a straightforward way to manipulate the expression to get the answer. –  Steven Spallone May 16 '12 at 1:33
No, but it is easy to check whether $4a^{3} + 27b^{2}$ has the required form, and if it does, then the roots are easy to find. I am suggesting a way to "bypass" Cardano's formulae, I am not saying that this method makes Cardano's formulae any easier to use. For example, with $x^{3}- 7x-6$, we find that $4a^{3} + 27b^{2} = -400 = -20^{2}$, so we know that the roots are all integers just from the coefficients of the cubic. Then the roots are three factors of $6$ whose sum iz zero. –  Geoff Robinson May 16 '12 at 6:18

Try the following in conjunction with reading the explanation for denesting cube roots of this form in Stack Exchange question 16331. So you do not have to work your way through all the formulas let's use some Sage code to do the following Calculate Cardano's formula for the cubic equation Then denest the resulting solution to Cardano's formula to arrive at the solutions for this Casus Irreducible result. We will walk through each step on the way to getting to a solution. Let's start with the cubic equation in the form ($ax^3+bx^2+cx+d=0$) of $$x^3-12x^2-43x+390 = 0$$ and you do not know its integer roots. We will try to solve it using Cardano's formula with some computer assistance for computation purposes. Put the following Sage code into sage to derive the Cardano solution. Paste the following into Sage online version at Sage. I think you have to sign up for it or download a copy of the program.


Note: After pasting all the Sage code listed herein into Sage make sure that all the code is lined up on the left edge before evaluating otherwise it will not produce good results.

The above formula $u$ is the following $$a\left(y-\frac{b}{3a}\right)^3+ b\left(y-\frac{b}{3a}\right)^2+c\left(y-\frac{b}{3a}\right)+d$$

which you can see on The Cubic Formula. The result should be the following:

$$(y + 4)^3 - 12(y + 4)^2 - 43y + 218$$ This will allow us to “depress” the cubic equation with the following command to be run sequentially after pasting into Sage.


The result should be the following: $$y^3 - 91y + 90$$

From the above "depressed" cubic equation you can plug in $p$ and $q$ as noted in the Sage code below.


$t$ in the above formula is the following which you can check on Cubic Function

$$\sqrt[3]{-\frac{q}{2}+ \sqrt{\frac{q^2}{ 4}+\frac{p^3}{ 27}}} +\sqrt[3]{-\frac{q}{ 2}- \sqrt{\frac{q^2}{ 4}+\frac{p^3}{ 27}}}$$

This will give you the following result.

$$\sqrt[3]{-\frac{836}{3}\sqrt{-\frac{1}{3}} - {45}}+\sqrt[3]{\frac{836}{3}\sqrt{-\frac{1}{3}} - {45}}$$

All you have to do is add the fraction $-\frac{b}{3a}$ which in this case is $\frac{4}{1}$ to get

$$\sqrt[3]{-\frac{836}{3}\sqrt{-\frac{1}{3}} - {45}}+\sqrt[3]{\frac{836}{3}\sqrt{-\frac{1}{3}} - {45}} + 4$$

the result of one of the real roots of the cubic polynomial. As asked in the question how do we get the real roots based on this solution? We need to find the cube roots of each of the nested radicals above. However, once we have one we can find the others rather easily. Let's again use Sage to find the cube roots. Make sure you enter the rational number under the radical sign as $x$ and the irrational or complex number under the radical sign as $y$ below.


$z$ in the code above is $$-64a^9+(48x)a^6+((15x^2)-3(3y)^2)a^3+x^3=0$$ where $x$ and $y$ equal the integer $-45$ and the complex number $-\frac{836}{9}i\sqrt3$, respectively. The derivation of this formula was shown in the answer to Stack Exchange Question 16331. The resulting equation is a cubic equation with $a^3$ as the variable. The equation can be put in monic polynomial form by dividing all the terms by $-64$. The resulting polynomial is

$$a^9 + \frac{135}{4}a^6 - \frac{729,271}{64}a^3 + \frac{91,125}{64}$$

Paste the following Sage code into Sage

    realpoly.<a> = PolynomialRing(RR)
    factor(a^9 + 135/4*a^6 - 729271/64*a^3 + 91125/64)

$$(a - 4.50000000000000) * (a - 0.500000000000000) * (a + 5.00000000000000) * (a^2 - 5.00000000000000*a + 25.0000000000000) * (a^2 + 0.500000000000000*a + 0.250000000000000) * (a^2 + 4.50000000000000*a + 20.2500000000000)$$

Alternatively use the Sage code as follows

    ratpoly.<a> = PolynomialRing(QQ)
    factor(a^9 + 135/4*a^6 - 729271/64*a^3 + 91125/64)

For the result

(a - 9/2) * (a - 1/2) * (a + 5) * (a^2 - 5*a + 25) * (a^2 + 1/2*a + 1/4) * (a^2 + 9/2*a + 81/4)

We can now take any one of the, in this case, rational roots above ($a_1 =\frac{9}{2}, a_2 = \frac{1}{2}, a_3 = -5$) to denest the cubic equation in Cardano's formula solution with the equation

$$ a^3+3ab^2=-45$$ the Sage code which is listed below and using $a_1 = \frac{9}{2}$ and repeating with the other two rational roots.


This gives the result $$\frac{11}{2}\sqrt{-\frac{1}{3}}$$ or $$\frac{11i\sqrt{3}}{6}$$ Since the two cube roots are based on the following two binomial formulas $(a + b)^3$ and $(a – b)^3$ you can verify the following

$$a^3 +3ab^2 = -45$$ $$- 3a^2b-b^3 = -\frac{836}{9}i\sqrt{3}$$ $$3a^2b+b^3 = \frac{836}{9}i\sqrt{3}$$

You can paste the following Sage code to Sage and evaluate to verify

    a= (9/2)

The result should be $$ \frac{836}{9}i\sqrt{3}$$ or change the formula in s to $-3a^2b-b^3$ to get $$ -\frac{836}{9}i\sqrt{3}$$

So using the $a$ we found and the $b$ we found we can derive the cube roots as $a + b$. Do the same thing with the other two rational roots $\frac{1}{2}$ and $-5$. The real roots are thus computed as follows using the Cardano method after adding $-\frac{b}{3a} = 4$ from the coefficients $a$ and $b$ in the original cubic equation in the first paragraph.

$$\left(\frac{9}{2} + \frac{11i\sqrt{3}}{6}\right) + \left(\frac{9}{2} - \frac{11i\sqrt{3}}{6}\right) +4 = 13$$

$$\left(\frac{1}{2} + \frac{19i\sqrt{3}}{6}\right) + \left(\frac{1}{2} - \frac{19i\sqrt{3}}{6}\right) +4 = 5$$

$$\left(-5 + \frac{4i\sqrt{3}}{3}\right) + \left(-5 - \frac{4i\sqrt{3}}{3}\right) +4 = -6$$

So we have discovered through all this computation what the polynomial we started with factors to $(x -13)(x-5)(x + 6)$ by finding the cube roots of the components of the results of Cardano's formula. This may not be as satisfying as you want because you could ask the same question on the second cubic polynomial we developed.

If it turns out you have a situation where only have one rational or real root to the polynomial use the same method and then multiply the result by each of the two complex roots of unity $$\left(-\frac{1}{2} + i\frac{\sqrt{3}}{2}\right)$$ and $$\left(-\frac{1}{2} - i\frac{\sqrt{3}}{2}\right)$$ You can try this method on the Cardano cubic nested radicals in your original question and it should work out correctly.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.