When to neglect the negative value of a square root?

In the first case, it's because $x^2+\frac1{x^2}>0$. In the second case, that should not have been done. Actually, the statement$$X^4+\left(\frac1X\right)^4=119\implies X^3-\left(\frac1X\right)^3=36$$is false. Even assuming that $X\in\Bbb R$, all that you can deduce is that$$X^3-\left(\frac1X\right)^3=\pm36.$$


For (1), it's due to the non-negativeness of the square of reals. For (2), I can see no reason either.