A Boundary Value Problem Associated with the Calculus of Variations