The Cubic Formula x = (-2*b+((-1+sqrt(-3))/2)^n*cbrt(4*(-2*b^3+9*a*b*c-27*a^2*d+sqrt((-2*b^3+9*a*b*c-27*a^2*d)^2-4*(b^2-3*a*c)^3)))+((-1-sqrt(-3))/2)^n*cbrt(4*(-2*b^3+9*a*b*c-27*a^2*d-sqrt((-2*b^3+9*a*b*c-27*a^2*d)^2-4*(b^2-3*a*c)^3))))/(6*a) The cubic formula gives the solutions of a*x^3+b*x^2+c*x+d=0 for real numbers a, b, c, d with a!=0. Directions: Take n=0,1,2. Use real cube roots if possible, and principal roots otherwise.