A cubic equation has exactly 3 roots. There are not 3 real and 3 complex roots! Could it be, that there is a misunderstanding in the interpretation of what MMA gives you? If you use Solve
and apply the restrictions of the solution, you will get real numbers (note that the may have multiplicity >1). Let's make an example:
sol = Solve[(m*ω^2*x^2)/2 + (m*α*x^3)/3 == e &&
m > 0 && ω > 0 && α > 0 && e > 0 &&
e < (m*ω^6)/(6 α^2), x, Reals]
This gives the following result:
{{x -> ConditionalExpression[
Root[-6 e + 3 m ω^2 #1^2 + 2 m α #1^3 &, 1],
e > 0 &&
m > (6 e α^2)/ω^6 && α > 0 && ω >
0]}, {x ->
ConditionalExpression[
Root[-6 e + 3 m ω^2 #1^2 + 2 m α #1^3 &, 2],
e > 0 &&
m > (6 e α^2)/ω^6 && α > 0 && ω >
0]}, {x ->
ConditionalExpression[
Root[-6 e + 3 m ω^2 #1^2 + 2 m α #1^3 &, 3],
e > 0 &&
m > (6 e α^2)/ω^6 && α > 0 && ω >
0]}}
Could it be that you are not happy with Root
objects and call them "complex"? Well, a root object simply means a root of the given polynomial. You may always evaluate roots to approximate machine numbers by using N
.
We now choose some numerical values, taking care of the conditions. E.g.:
sol /. {m -> 7, α -> 1, ω -> 1, e -> 1} // N
*{{x -> -1.2047}, {x -> -0.762103}, {x -> 0.466801}}*)
You see, we get 3 real solutions for x.
Reduce[(m*ω^2*x^2)/2 + (m*α*x^3)/3 == e && m > 0 && ω > 0 && α > 0 && e > 0 && e < (m*ω^6)/(6 α^2), Reals]
$\endgroup$Solve[(m*ω^2*x^2)/2 + (m*α*x^3)/3 == e && m > 0 && ω > 0 && α > 0 && e > 0 && e < (m*ω^6)/(6 α^2), Reals]
$\endgroup$