TITLE: Help with Cardano's Formula
QUESTION [11 upvotes]: 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? 
Thanks!

REPLY [9 votes]: I know it has been a lot of time since you asked the question, but it is reasonable to assume that no one has answered you. Ok, here we go. When trying to reduce radicals in general, you try to find values for a, b $\in \mathbb{Q}$ such that $$\sqrt[n]{A \pm B\sqrt[m]{C}} = a \pm b\sqrt[m]{C}.$$Notice that $\sqrt[m]{C}$ stays the same. What we are going to change the original expression to such form: $$\sqrt[3]{3 \pm i \sqrt{\frac{100}{27}}} = \sqrt[3]{3 \pm \frac{10}{3}\frac{i}{\sqrt{3}}} = \sqrt[3]{3 \pm \frac{10}{9}(i\sqrt{3})}$$ We will now try to find values for a, b $\in \mathbb{Q}$ such that $$\sqrt[3]{3 \pm \frac{10}{9}(i\sqrt{3})} = a \pm b(i\sqrt{3}).$$Cubing both sides:$$3 \pm \frac{10}{9}(i\sqrt{3}) = (a^3 - 9ab^2) \pm (3a^2b - 3b^3)(i\sqrt{3})$$ Since a and b are rational numbers, then the previous equation is only true if:$$\begin{cases}a^3 - 9ab^2 = 3\\3a^2b - 3b^3 = \frac{10}{9}\end{cases}\Rightarrow\begin{cases}a^3 - 9ab^2 = 3\\27a^2b - 27b^3 = 10\end{cases}$$To solve that system of equations we are going to multiply one equation by the other:$$(3)(27a^2b - 27b^3) = (10)(a^3 - 9ab^2)\\81a^2b - 81b^3 = 10a^3 - 90 ab^2\\10a^3 - 81a^2b - 90ab^2 + 81b^3 = 0$$Dividing both sides by $b^3$:$$10(\frac ab)^3 - 81(\frac ab)^2 - 90(\frac ab) + 81 = 0$$We are now going to define x = a/b. Now, since a and b are rational numbers, x is also rational. Using the rational root theorem, we can find the solutions for our cubic equation:$$10x^3 - 81x^2 - 90x + 81 = 0\\x = -{3 \over 2} \lor x = {3 \over 5} \lor x = 9$$If x = -3/2, then a = -1 and b = 2/3.
If x = 3/5, then a = -1/2 and b = -5/6.
If x = 9, then a = 3/2 and b = 1/6. 
Therefore:$$\sqrt[3]{3 \pm i \sqrt{\frac{100}{27}}} = -1 \pm i\frac{2\sqrt{3}}{3}\\\sqrt[3]{3 \pm i \sqrt{\frac{100}{27}}} = -\frac{1}{2} \mp i\frac{5\sqrt{3}}{6}\\\sqrt[3]{3 \pm i \sqrt{\frac{100}{27}}} = \frac{3}{2} \pm i\frac{\sqrt{3}}{6}$$And there you have it. I learned this method here, by the way, after comming across the same problem you did.