Differential Equations and the Calculus of Variations