Variational problems on closed manifolds