Finding out range of values of $a$ for which $f(x)$ is decreasing The question is to find out the values of $a$ for which the function $f(x)=(a+2)x^3-3ax^2+9ax-1$ decreases for all real values of $x.$
What i have tried:
I know that for a function to be decreasing, $f'(x) < 0$, So,$$f'(x)=3(a+2)x^2-6ax+9a <0$$But what to do after this because its an inequality with two variables ? 
 A: First, the derivative must be a downwards parabola, so $\;a+2<0\;$ , and second: it must have at most one single root, so
$$\Delta:=(6a)^2-108a(a+2)\le0$$
Solve now the above two inequalities
A: You want $f'(x) < 0$ for all $x$. In order for this to happen, you need


*

*$f'(x) \to -\infty $ as $x \to \pm \infty$. This happens when $a+2 < 0$ 

*The critical point of $f'(x)$ has to be non-positive and a maximum (so the entirety of $f'(x)$ is smaller than some negative value).


In order to work out the second condition, you can take the derivative of $f'(x)$, which is $f''(x) = 6(a+2)x-6a$. You can see that $f''(x) = 0$ when $x = \dfrac{a}{a+2}$


*

*The maximum occurs when the second derivative of $f'(x)$ is negative, or $f'''(x) = 6(a+2) < 0$. This brings us back to the first bullet point.

*You also need $f'\left(\dfrac{a}{a+2}\right) = \dfrac{-3a^2}{a+2} + 9a \le 0$. You're free to solve this single-variable equality on your own. The answer is $x \le -3$ or $x \ge 0$.



An easier way is to observe that $f'(x)$ is a parabola. For $f'(x)$ to be nonpositive, we want the parabola to lie entire below or just touching the $x$-axis. This happens hen it has a double root or no real roots, or when the determinant is nonpositive 
$$ \Delta = (6a)^2 - 4\cdot3(a+2)\cdot 9a \le 0 $$
