Analytical solution to the Time-Dependent Schrodinger equation for a particle in an infinite square well