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?
 A: Whether a cubic equation $x^3+bx^2+cx+d = 0$ has imaginary roots depends on its discriminant, which is defined as
$$\Delta = 18bcd-4b^3d+b^2c^2 - 4c^3-27d^2$$
There are a pair of imaginary roots only if $\Delta < 0$; otherwise, the roots are all real. 
In the case of $n=3$, the discriminant is positive, hence all real roots.
A: 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.$$
A: A cubic $ax^3+bx^2+cx+d$ always has three roots (by the FTA), and at least one real, because it runs from $-\infty$ to $\infty$ or conversely.
For three real roots to be possible, you must have two extrema (so that the curve has three opportunities to cross the axis). This is possible when the derivative
$$3ax^2+2bx+c=0$$ has two real roots, i.e. $b^2-3ac>0$.
A second condition is necessary: the value at the maximum must be positive, and that at the minimum must be negative.
Compare the three cases below:

