I'm looking for the roots of the sextic equation in $x$
$$
x^6 - (3 m) x^5 + 5 m^2 x^4 - (5 m^3) x^3 + 3 m^4 x^2 - m^5 x + L = 0.
$$
I know that at most two of the roots of this are real when $m$ and $L$ are positive integers. Also mathematica finds a closed form for all the roots (surprisingly). They are



```
x = 1/2 (m - sqrt(2 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3) + (4 2^(1/3) m^4)/(3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3) - 5 m^2)/sqrt(3))

x = 1/2 (sqrt(2 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3) + (4 2^(1/3) m^4)/(3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3) - 5 m^2)/sqrt(3) + m)

x = 1/2 (m - sqrt(m^2 - 4 (((1 - i sqrt(3)) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3))/(6 2^(1/3)) + ((1 + i sqrt(3)) m^4)/(3 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3)) + (2 m^2)/3)))

x = 1/2 (m + sqrt(m^2 - 4 (((1 - i sqrt(3)) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3))/(6 2^(1/3)) + ((1 + i sqrt(3)) m^4)/(3 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3)) + (2 m^2)/3)))

x = 1/2 (m - sqrt(m^2 - 4 (((1 + i sqrt(3)) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3))/(6 2^(1/3)) + ((1 - i sqrt(3)) m^4)/(3 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3)) + (2 m^2)/3)))

```

and



```
x = 1/2 (m + sqrt(m^2 - 4 (((1 + i sqrt(3)) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3))/(6 2^(1/3)) + ((1 - i sqrt(3)) m^4)/(3 2^(2/3) (3 sqrt(3) sqrt(27 L^2 - 4 L m^6) - 27 L + 2 m^6)^(1/3)) + (2 m^2)/3)))$. 

```

What I need to know is, which two of these roots are the ones that are candidates to be real, when $m$ and $L$ are positive integers? Also, how does one determine this (without substituting values)?


Pardon the messy values, it's more worth it to just feed it into mathematica.



Roots of this sextic
If $m=0$, then your sextic is $x^6+L$. For this to have a real root, you need $L\leq 0$, in which case those real roots are the real sixth roots of $-L$.


We may now assume $m\neq 0$. After dividing your sextic by $m^6$, and taking $y:=x/m$ and $K:=L/m^6$, you have a new (simpler) sextic $f(y):=y^6-3y^5+5y^4-5y^3+3y^2-y+K$ with only one parameter. This new sextic has real roots exactly when the old one did (just scaled by $m$).


The derivative of $f$ has only a single real root, at $y=1/2$. Thus, the minimum of $f$ occurs at $f(1/2)=-\frac{9}{64}+K$. In order for there to be a real root, you need $K\leq \frac{9}{64}$. If you run



```
Manipulate[Plot[y^6 - 3 y^5 + 5 y^4 - 5 y^3 + 3 y^2 - y + K == 0, {y, 0, 1}], {K, 0, 9/64}]

```

in Mathematica, you can visually see how the two roots behave, as $K$ varies.


Because the minimum is at $y=1/2$, we make the linear shift $z:=y-1/2$. Then, the sextic transforms to $$z^6+\frac{5}{4}z^4+\frac{3}{16}z^2+\left(K-\frac{9}{64}\right).$$


Notice that this is really a cubic in $z^2$, with a negative constant term. Multiplying through by $64$, to remove the denominator, replacing $4z^2$ with $w$, and $64K-9$ with $J$, we are really just looking for the (unique) nonnegative real root of
$$
w^3+5w^2+3w+J
$$
when $J\leq 0$.


Thus, it is not surprising after all that Mathematica found solutions to the original sextic, since cubics are always solvable using radicals.


Running the code



```
Solve[w^3 + 5 w^2 + 3 w + J == 0, w]

```

you get three expressions involving radicals. When $J=0$, only one of these expressions is nonnegative (and is equal to $0$). That expression is the one that will ultimately give you your nonnegative real root, because that expression is continuous as a function in $J\leq 0$.


Now that you have your solution for $w$ in terms of $J$, you can transform everything back to your original system (if you like).


