Variational problems, PDEs and applications