How To Find Local Maxima And Local Minima In Gradient