Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: Problems with real cubic roots / nthroot etc...
Posted:
Dec 13, 2012 12:04 AM


W dniu 20121212 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.
Read whole article, especial this method: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method
"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,[22] 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:)
bartekltg



