Necessary conditions for minimum in relaxed variational problems