Variational and Differential Problems with Constraints