Morse theory and a non-linear generalization of the Dirichlet problem