Pseudo-spectral methods in one-dimensional magnetostriction