Calculus of variations and nonlinear partial differential equations