<s>[INST] Can someone please explain why the roots are real as well as imaginary? I have this polynomial $x^3+x^2(3-4n)+x(4n^2-6n)-2n^2+6n-4=0$
If I put $n=3$, I get it as $x^3-9x^2+18x-4$
On computing the roots of $x^3+x^2(3-4n)+x(4n^2-6n)-2n^2+6n-4=0$ for any $n$ using Wolfram Alpha I am getting imaginary roots, here.
But if I put $n=3$ I get roots as real, see here.
Can someone please explain why the roots are real as well as imaginary?
 [/INST] Let $x_1$, $x_2$ and $x_3$ be roots of our polynomial.
Easy to see that if all roots are reals so $$(x_1-x_2)^2(x_1-x_3)^2(x_2-x_3)^2\geq0,$$ while if there are two complex roots, so 
$$(x_1-x_2)^2(x_1-x_3)^2(x_2-x_3)^2<0.$$ 
Now, let $x_1+x_2+x_3=3u,$ $x_1x_2+x_1x_3+x_2x_3=3v^2,$ where $v^2$ can be negative and $x_1x_2x_3=w^3.$
Thus, $$u=\frac{4n-3}{3},$$
$$v^2=\frac{4n^2-6n}{3},$$ $$w^3=2n^2-6n+4$$ and
$$(x_1-x_2)^2(x_1-x_3)^2(x_2-x_3)^2=27(3u^2v^4-4v^6-4u^3w^3+6uv^2w^3-w^6)=$$
$$=4n(16n^4-75n^3+140n^2-126n+54).$$
Now, we can understand for which value of $n$ we'll get all real roots.
I got that for any $n\geq0$ our equation has three real roots and for any $n<0$ our equation has an unique real root. 
It follows from:
$$16n^4-75n^3+140n^2-126n+54=$$
$$=\left(4n^2-\frac{75}{8}n+6\right)^2+\frac{1}{64}(263n^2-864n+1152)>0.$$
</s>