From f′(x)=0 we get x=−2
and at x=0,f′(x) becomes undefined,
and f(x) is not differentiable at x=−1
So, here we get three critical points i.e. x=−2,−1,0
But there is no sign change for f′(x) at x=−2.
So, at x=−2,f(x) has neither minimum nor maximum
Since, f′(x) changes sign from negative to positive as x crosses 0 from left to right, therefore x=0 is a point of local minima.
From the above graph clearly, x=−1 is a point of local maxima because f(x→−1−)<f(−1)>f(x→−1+)