# How may I solve this Cubic Equation?

How can I solve this cubic equation?

$$H^{3} − 3\left[(1 + A\cos(T) )^{2} + \frac{2r \cdot A \sin(T)}{B}\right]H + 2(1 + A \cos(T))^{3} = 0$$

Solution in terms of H.

Edited in order to give more insight to my problem: It was an equation which comes as a part of a derivation in Computational Fluid Dynamics. My motivation is to get H in terms of A, B, r and T. And plot a graph between H and r keeping A and B and T as constants.

Thanks!

A general doubt: If a cubic equation consists of a imaginary root, then is it compulsory that the number of imaginary roots should always be 2?

-
I am not sure about the tag and the formatting. Can anyone please help me correct the question? Thanks! @Chandru1: Thanks for the editing! –  bala maverick Mar 4 '11 at 14:39
Cubic equations have an explicit formula for the roots (like the quadratic formula). Techniques for solving them are discussed here:en.wikipedia.org/wiki/Cubic_function There may be easier ways, but you are assured of getting an answer. –  Brian Mar 4 '11 at 15:00
Are the values $A$, $B$, and $r$ positive? If not, where do they live? –  JavaMan Mar 4 '11 at 18:10
Where did you get this equation from? What is your motivation? –  Abel Mar 4 '11 at 20:50
My answer here contains an explicit formula for the solutions to a general monic (leading coefficient 1) cubic that works on most contemporary computing devices/software without any extra worrying about definitions of principal roots. –  Isaac Mar 5 '11 at 21:09
1. Write it as $H^3 + qH + p = 0$;
@bala maverick: Yes. In general, for a polynomial with real coefficients, any complex roots come in conjugate pairs, so if $x + iy$ is a root for real $x$ and $y$ then $x - iy$ is a root. And since a cubic only has three roots (including multiple roots) there is either a conjugate pair of roots with imaginary parts or no roots with imaginary parts. –  Henry Mar 8 '11 at 11:40