Just as the first derivative can be used to find the extrema (maximum and minumum) values of a function near a critical point, the second derivative can be used to find the shape (concavity) of a function. The second derivative is the rate of change of the slope, and if the second derivative changes sign from negative to positive, the function's slope is increasing upward. In that case, the function is said to be concave upward on that interval. If the second derivative changes sign and is negative, the function is said to be concave downward on that interval.
Here we use the second derivative to determine the concavity of the function: $f\left(x\right)={x}^{3}-9{x}^{2}-12x+4$
Second derivative and tests for concavity