According to Hans Freudenthal (in the "Dictionary of Scientific Biography", vol 11), Bernhard Riemann was the first mathematician who solved this variational problem based on a method which he called Dirichlet's principle.