$x^4 + 4x^3 - 2x^2 - 12x + k$ has 4 real roots. Find the condition on k. The question is: $f(x) = x^4 + 4x^3 - 2x^2 - 12x + k$ has 4 real roots. What values can k take? Please drop a hint!

If this degree four polynomial has four real roots, then there is a local minimum between the first two and between the last two roots, and a local maximum between the second and hird root.
The location of the extrema does not change with $k$, only their $y$-values.
Thus we are looking for $k$ such that the two local minima have negative $y$-values and the local maximum has positive $y$-value.
Locate the local extrema as roots of the derivative
$$ 4x^3+12x^2-4x-12 = 4\cdot (x+3)(x+1)(x-1),$$
i.e. the minima are at $x=-3$ and $x=1$, the maximum is at $x=-1$.
The respective $y$-values are $y(-3)=-9+k$, $y(-1)=7+k$, and $y(1)=-9+k$. We conclude that the desired condition is
$$ -7<k<9.$$
(Here I assume that multiple roots are not allowed; otherwise the condition is $-7\le k\le 9$).
