Numerical study of the magnetohydrodynamic spectra in tokamaks using galerkin's method