Analytical solutions of Lame equations by Galerkin method