Pseudospectral calculation of the wave function of helium and the negative hydrogen ion