# How do you use the second derivative test to find all relative extrema of f(x)=5+3x^2-x^3?

The first derivative is $f ' \left(x\right) = 6 x - 3 {x}^{2} = 3 x \left(2 - x\right)$, which has roots at $x = 0$ and $x = 2$. These are the critical point, and also the possible locations of local extrema.
Since the second derivative is $f ' ' \left(x\right) = 6 - 6 x$, we get $f ' ' \left(0\right) = 6 > 0$ and $f ' ' \left(2\right) = - 6 < 0$. The fact that $f ' ' \left(0\right) > 0$ (and the fact that $f ' '$ is continuous) implies that the graph of $f$ is concave up near $x = 0$, making, by the Second Derivative Test, $x = 0$ the location of a local minimum.
The fact that $f ' ' \left(2\right) < 0$ (and the fact that $f ' '$ is continuous) implies that the graph of $f$ is concave down near $x = 2$, making, by the Second Derivative Test, $x = 2$ the location of a local maximum.
The local minimum value (output) is $f \left(0\right) = 5$ and the local maximum value (output) is $f \left(2\right) = 5 + 12 - 8 = 9$.