Single-Term Walsh Series Direct Method for the Solution of Nonlinear Problems in the Calculus of Variations