A non-periodic Fourier method for solution of the classical wave equation