Necessary Condition via Second Variation