The application of variational methods to atomic scattering problems - IV. The excitation of the 21S and 23S states of helium by electron impact