Local Min And Max Derivative