W dniu 2012-12-12 20:24, D R G pisze: > All of these solutions appear to have a square root term sqrt(G^2o^2 - Go^4) > which always turns out to be negative; trying to take the cubic root with > nthrootin matlab later on produces an error about the inputs needing to be real
If root is real, partial results is complex, but root will be real, imaginary part will cancel to zero. In 'elementary' calculation you can't avoid this, however there is hope.
"When a cubic equation has three real roots, the formulas expressing these roots in terms of radicals involve complex numbers. It has been proved that when none of the three real roots is rational?the casus irreducibilis? one cannot express the roots in terms of real radicals. Nevertheless, purely real expressions of the solutions may be obtained using hypergeometric functions, or more elementarily in terms of trigonometric functions, specifically in terms of the cosine and arccosine functions."
Translate your equation to canonical form and use trigonometric method.
> I am currently using graphical methods to find but it's not > very elegant.
In matlab we have roots function. it's not elegant too:)