Solution of the wave agitation problem through a variational solution of the Helmoltz equation