We will solve (for X) the polynomial of the form:
aX3 + bX2 + cX + d = 0.
First input the rational coefficients for a, b, c, d.
(Click 'Next' when you're finished)
a : b : c : d :
Next
By dividing the coefficients by the value of 'a' we get,
X3 + X2 + X + = 0
Next
We now transform the cubic by making the substitution Y=X+b/3 to put the polynomial in the form of Y3+pY+q = 0. Giving us
Y3 + Y + = 0
Next
We can now calculate the discriminant D = q2/4 + p3/27 or
D =
Next
We can now calculate the real root of Y3+pY+q = 0 by
thus
Y1 =
By undoing the substitution done earlier we get X = Y1 - B/3
X1 =
And imaginary roots are calculated by

where w = (-1 + -31/2)/2
then we have the imaginary roots
Y2 = + i
and
Y3 = + i
and by undoing the original substitution we have
X2 = + i
and
X3 = + i