Let $f(x)=x^3+6x^2+ax+2,$if $(-3,-1)$ is the largest possible interval for which $f(x)$ is decreasing function

Solution 1:

The first derivative $f'(x) = 3x^2 + 12x + a$

You're told that the largest interval with a negative first derivative is $(-3,-1)$

As polynomial functions are continuous over the entire real line, you can conclude that $f'(-3) =f'(-1) = 0$

Trying the left hand bound gives $3(-3)^2 + 12(-3) + a = 0 \implies a = 9$

Verify that the right hand bound gives the same value (otherwise the problem cannot be solved), $3(-1)^2 + 12(-1) + a = 0 \implies a = 9$.

All that is left is to verify that $f'(x) = 3x^2 + 12x + 9$ is strictly negative over $(-3,-1)$

$f'(x) = 3(x+1)(x+3)$, and a bit of curve sketching will immediately establish that it is negative for $x \in (-3,-1)$ (and non-negative everywhere else).