How to find maxima and minima without derivatives.