This question was asked in Ex 6.5,6
Calculation on local maxima and minima 
Sharon Mallick's image