Find $a$ such that $x^3 +3x^2-9x+a = 0$ has only one real root I have the function
$$x^3 +3x^2-9x+a$$
If I take the derivative, I have
$$3x^2+6x-9$$
This is a parabola with a negative part. So my function isn't always increasing, and therefore can have more than one root. I have to find $a$ such that, even when the function decreases, it can't reach the $x$ axis. More precisely, I have to move my function up by a amount of $a$ such that the local minimum of the function is greater than zero. 
How would you guys solve it? I can't think of a better way.
 A: That's probably the most efficient way: Like you say, the derivative of your polynomial $$p(x) := x^3 + 3 x^2 - 9x + a$$ is
$$p'(x) = 3 x^2 + 6x - 9 = 3 (x + 3) (x - 1),$$
and so has roots $x = -3, +1$. Since these are the $x$-coordinates of the local extrema, it's enough to choose $a$ so that the values of $p$ at these points, namely
$$p(-3) = a + 27 \qquad \text{and} \qquad p(1) = a - 5$$
have the same (nonzero) sign. So, any $a \not\in [-27, 5]$ will do.
A: Set the derivative to zero:
$$\begin{align*}
3x^2+6x-9 &= 0\\
3(x+3)(x-1) &= 0
\end{align*}$$
So the local maximum happens at $x=-3$ and the local minimum happens at $x=1$. The respective $y$ values are
$$y_{local\_max} = (-3)^3 + 3\cdot(-3)^2 -9\cdot(-3) + a = 27+a\\
y_{local\_min} = 1^3+3\cdot1^2-9\cdot 1 + a = -5+a$$
And there would be only one root either when the local maximum $y$ is less than zero, or the local minimum $y$ is greater than zero. Solve for the possible $a$'s:
$$\begin{align*}27+a &< 0&&\text{or}&\ -5+a &> 0\end{align*}$$
A: rewriting the equation in the form $$-x^3-3x^2+9x=a$$ we get the local extrema of $-x^3-3x^2+9x$ as
$MIN(-3;-27)$ and $MAX(1;5)$ thus we get if $$a<-27$$ or $$a>5$$ we obtain only one solution of our equation.
