Apply differentiation to gradients and turning points (stationary points). Discriminate between maxima and minima by any method.