An efficient numerical spectral method for solving the Schrodinger equation