Necessary Condition for an Extremum