Cubic Equations in One FormulaDate: 11/27/2001 at 06:37:34 From: Robert Sullivan Subject: Cubic equations in one formula To Dr. Math, I know the formula for solving quadratic equations of the type ax^2 + bx + c = 0, but is there a formula for cubic equations? I've seen supposed cubic formulas, but they take several steps. Is there one giant formula that I can use? Robert Sullivan Date: 11/27/2001 at 08:40:58 From: Doctor Paul Subject: Re: Cubic equations in one formula Hi Robert, I think you'll find what you're looking for in the section of the Dr. Math FAQ called "Cubic and quartic equations": http://mathforum.org/dr.math/faq/faq.cubic.equations.html Let me know if you'd like to talk about this some more, or if you have any other questions. - Doctor Paul, The Math Forum http://mathforum.org/dr.math/ Date: 11/27/2001 at 12:50:54 From: Robert Sullivan Subject: Re: Cubic equations in one formula Thanks for the tip. The only problem is, I looked at the FAQ and it says simplify into an equation. The equation has two variables e and f in it, but the FAQ does not tell you how to find these. What I really wanted was a big formula to solve the equation in one simple step, like you would use for a program. Robert Sullivan Date: 11/27/2001 at 13:27:59 From: Doctor Paul Subject: Re: Cubic equations in one formula The FAQ does tell you how to find e and f. Start with the general form: a*x^3 + b*x^2 + c*x + d = 0 and make the leading coefficient a one by dividing both sides by a This gives: x^3 + (b/a)*x^2 + (c/a)*x + d/a = 0 so e = b/a f = c/a g = d/a Then proceed as instructed in the FAQ by making the appropriate substitution to get rid of the x^2 term (if necessary). This is as close as you're going to get to one big formula. An algorithm that does this in "one simple step" does not exist. The method outlined in the FAQ is how to solve a general cubic equation. I hope this helps. Please write back if you'd like to talk about this some more. - Doctor Paul, The Math Forum http://mathforum.org/dr.math/ Date: 11/27/2001 at 13:50:53 From: Doctor Rob Subject: Re: Cubic equations in one formula Thanks for writing to Ask Dr. Math, Robert. The Quadratic Formula is actually two equations: x1 = (-b+sqrt[b^2-4*a*c])/(2*a), x2 = (-b-sqrt[b^2-4*a*c])/(2*a). For the Cubic Formula, you need three equations. They are seldom written out because of how complicated they are. They involve cube roots ("cbrt" below) of expressions involving square roots ("sqrt" below), and it is necessary to work with complex numbers (hence the "i" below). That said, here is one way of writing the three solutions to a*x^3 + b*x^2 + c*x + d = 0: x1 = -b/(3*a) + cbrt(-2*b^3+9*a*b*c-27*a^2*d+ sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a) + cbrt(-2*b^3+9*a*b*c-27*a^2*d- sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a), x2 = -b/(3*a) + (-1+i*sqrt[3])/2*cbrt(-2*b^3+9*a*b*c-27*a^2*d+ sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a) + (-1-i*sqrt[3])/2*cbrt(-2*b^3+9*a*b*c-27*a^2*d- sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a), x3 = -b/(3*a) + (-1-i*sqrt[3])/2*cbrt(-2*b^3+9*a*b*c-27*a^2*d+ sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a) + (-1+i*sqrt[3])/2*cbrt(-2*b^3+9*a*b*c-27*a^2*d- sqrt[4*(-b^2+3*a*c)^3+(-2*b^3+9*a*b*c-27*a^2*d)^2])/ (3*cbrt[2]*a). If the quantity inside the sqrt[] above is negative, you will be faced with finding the cube roots of two complex numbers (which are complex conjugates of each other). Of course there are three of these. Pick any one of the three for the first number, and pick the complex conjugate of that choice for the second number, and use those values in all three equations above. In this case, all three roots x1, x2, and x3 are real numbers. (Surprise!) If the quantity inside the sqrt[] above is nonnegative, you should use the real cube root of the real numbers in each case. In this case, only x1 is a real number and x2 and x3 are a complex conjugate pair of complex numbers. Notice: the expressions -b^2+3*a*c and -2*b^3+9*a*b*c-27*a^2*d appear more than once in the above equations. Feel free to write again if I can help further. - Doctor Rob, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2015 The Math Forum
http://mathforum.org/dr.math/