Griffiths problems 2.8 & 2.9: Determining a wavefunction given its initial state (Fourier's Trick!)