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!