## You are here

Homecubic formula

## Primary tabs

# cubic formula

The three roots $r_{1},r_{2},r_{3}$ of a cubic polynomial equation $x^{3}+ax^{2}+bx+c=0$ are given by

$\displaystyle r_{1}$ | $\displaystyle=$ | $\displaystyle-\frac{a}{3}+\left(\frac{-2a^{3}+9ab-27c+\sqrt{(2a^{3}-9ab+27c)^{% 2}+4(-a^{2}+3b)^{3}}}{54}\right)^{{1/3}}$ | ||

$\displaystyle{}+\left(\frac{-2a^{3}+9ab-27c-\sqrt{(2a^{3}-9ab+27c)^{2}+4(-a^{2% }+3b)^{3}}}{54}\right)^{{1/3}}$ | ||||

$\displaystyle r_{2}$ | $\displaystyle=$ | $\displaystyle-\frac{a}{3}-\frac{1+i\sqrt{3}}{2}\left(\frac{-2a^{3}+9ab-27c+% \sqrt{(2a^{3}-9ab+27c)^{2}+4(-a^{2}+3b)^{3}}}{54}\right)^{{1/3}}$ | ||

$\displaystyle{}+\frac{-1+i\sqrt{3}}{2}\left(\frac{-2a^{3}+9ab-27c-\sqrt{(2a^{3% }-9ab+27c)^{2}+4(-a^{2}+3b)^{3}}}{54}\right)^{{1/3}}$ | ||||

$\displaystyle r_{3}$ | $\displaystyle=$ | $\displaystyle-\frac{a}{3}+\frac{-1+i\sqrt{3}}{2}\left(\frac{-2a^{3}+9ab-27c+% \sqrt{(2a^{3}-9ab+27c)^{2}+4(-a^{2}+3b)^{3}}}{54}\right)^{{1/3}}$ | ||

$\displaystyle{}-\frac{1+i\sqrt{3}}{2}\left(\frac{-2a^{3}+9ab-27c-\sqrt{(2a^{3}% -9ab+27c)^{2}+4(-a^{2}+3b)^{3}}}{54}\right)^{{1/3}}$ |

Related:

QuarticFormula, GaloisTheoreticDerivationOfTheQuarticFormula, FerrariCardanoDerivationOfTheQuarticFormula, FundamentalTheoremOfGaloisTheory

Synonym:

cubic equation

Type of Math Object:

Theorem

Major Section:

Reference

Groups audience:

## Mathematics Subject Classification

12D10*no label found*

- Forums
- Planetary Bugs
- HS/Secondary
- University/Tertiary
- Graduate/Advanced
- Industry/Practice
- Research Topics
- LaTeX help
- Math Comptetitions
- Math History
- Math Humor
- PlanetMath Comments
- PlanetMath System Updates and News
- PlanetMath help
- PlanetMath.ORG
- Strategic Communications Development
- The Math Pub
- Testing messages (ignore)

- Other useful stuff
- Corrections

## Comments

## undefined roots of a cubic?

Hello, PlanetMath.

I am a high school math teacher and designed a special project for my students that used the formula I found on your website for solutions to cubic equations. I also wrote a program to check their answers for a variety of coefficients, a, b, and c.

One student was assigned coefficients -3, 3, and 1. When she did her calculations, she ended up with an expression that involved dividing by 0, implying that the answer was undefined. I checked her calculations on my calculator program and discovered same. We looked at the graph of the cubic equation and found that it should have 1 real and 2 complex solutions. I also found that -3, 3, with any other value for the last constant would give a denom of 0.

My question is this: is there some restriction on the constants in the use of the formula that one should be aware of when using it? The page that has the formula mentions none.

Since this is a problem that has been solved completely, it would seem that the formula should produce answers for any values of the three constants.

Thank You.

## Re: undefined roots of a cubic?

You are right of course about the dividing by 0. The formula results in a term of 0/0 whenever b = a^2/3. If you are looking for restrictions on the constants then the previous sentence gives you the list of restrictions.

The 0/0 term is not "really" there of course -- it can be simplified out of the formula, in much the same way that ((x+h)^2-x^2)/h simplifies to 2x in calculus when h->0. In this case the formula is much more complicated than ((x+h)^2-x^2)/h and it is not immediately obvious (not even to me) how to go about the simplification.

If you look in the "Galois theoretic derivation of the cubic formula" which is attached to this entry, you will find there an alternative formula which never encounters division by 0. I will shortly undertake to replace the formulas on this page with the formulas from that page, because clearly it is preferable to have formulas that avoid division by 0.

In case you are wondering where I got the formulas, I simply copied and pasted the mathematica output of Solve[x^3 + a*x^2 + b*x + c == 0,x]. The formulas are not really intended for human use; in fact, I had expected their presence out in the open to discourage people from using them owing to their sheer bulk.

I suspect that the quartic formula page suffers from similar problems, but in that case the formulas really are much too unwieldy to consider fixing.

## Re: undefined roots of a cubic?

I do not know which "formula" for solving the cubic equation you have,

but the one first found by Scipione del Ferro (beginning of 16. century), popularized by Girolamo Cardano, and subsequently known as Cardano's, is valid for any cubic equation

z^3+az^2+cz+d=0.

Introduction of a new variable via z=y-a/3 converts the equation into the "canonic" form

y^3+py+q=0.

By a most ingenious argumnet Del Ferro found that its solutions are given by the formula

y=t^{1/3}+s^{1/3}

where the two terms on the right side are any of three (among nine) pairs of third roots of

t=-q/2+[(q/2)^2+(p/3)^3]^{1/2},

s=-q/2-[(q/2)^2-(p/3)^2]^{1/2},

whose product is equal to -p/3.

For a fine historical account, and del Ferro's procedure, see, e.g.,

J. Dieudonne's "Pour l'honneur de l'espirit humain", Hachette, Paris (1987).