Mathematica Cubic Polynomial

48 Views Asked by At

I am interested to find the roots of a cubic polynomial f(r)=r^2 - 2 r + Q^2 - [Alpha] r^3. \Alpha is positive real number hare, Q is real. I am interested in 2 complex roots and third root to be negative. So how could I set the co-efficient of this polynomial, by using mathematica, to get required type of roots. I tried some random values for the co-coefficients but could get only 2 complex, third one is not negative. If my approach is correct, could I get some code to run all possible values of these parameters in a single attempt??

Q^2 - 2 r + r^2 - r^3 [Alpha] /. [Alpha] -> 0.05 /. Q -> 2

4 - 2 r + r^2 - 0.05 r^3

Solve[% == 0, r]

{{r -> 0.986345 - 1.86141 I}, {r -> 0.986345 + 1.86141 I}, {r -> 18.0273}}

Q^2 - 2 r + r^2 - r^3 [Alpha] /. [Alpha] -> 0.05 /. Q -> 4

16 - 2 r + r^2 - 0.05 r^3

Solve[% == 0, r]

{{r -> 0.611327 - 4.08266 I}, {r -> 0.611327 + 4.08266 I}, {r -> 18.7773}}

Q^2 - 2 r + r^2 - r^3 [Alpha] /. [Alpha] -> 0.05 /. Q -> 0.01

0.0001 - 2 r + r^2 - 0.05 r^3

Thanking in advance. B. Majeed.

1

There are 1 best solutions below

0
On

This can't be done. $f(r) = 0$ has the same roots as \begin{equation*} g(r) = r^3 - \frac{1}{\alpha}r^2 + \frac{2}{\alpha}r - \frac{Q^2}{\alpha}. \end{equation*} The product of the roots of $g$ is therefore $\frac{Q^2}{\alpha} > 0$. But if one root $r_1$ is negative and the other two are $a\pm bi$, then the product of the roots is $r_1(a^2+b^2) < 0$.