The particle is confined in its ground state in an infinite square well of width L.
Right at time t = 0, the infinite square well is expanded to width 2L.
The time-independent form of the particle at t = 0 before expansion is <math>\psi(x) = \sqrt{\frac{2}{L}}\sin{(\frac{\pi}{a}x)}</math>
Once the width of the well has expanded to 2L, the initial conditions for our function function becomes:
<math>\Psi(x, 0) = \sqrt{\frac{2}{L}}\sin{(\frac{\pi}{L}x)}</math> for 0 < x < L
<math>\Psi(x, 0) = 0</math> for L < x < 2L, (as well as x > 2L, and x < 0)
We want to find <math>\Psi(x, t)</math>
It's tempting to say, <math>\Psi(x, 0) </math> is a stationary state (first excited state) of the infinite square well after the wall has moved since the new set of (after the wall's move) stationary state wave functions are, <math>\psi_n(x) = \sqrt{\frac{2}{2L}}\sin{(\frac{n\pi}{2L}x)}</math>, and for <math>n=2</math>, it's <math>\psi_2(x) = \sqrt{\frac{2}{2L}}\sin{(\frac{2\pi}{2L}x)}=\sqrt{\frac{1}{L}}\sin{(\frac{\pi}{L}x)}</math>, which is very similar to <math>\Psi(x, 0) </math>.
If this is the case, we can say that <math>\Psi(x, t)=\Psi(x, 0)e^{-iE_2t/\hbar}</math>, where <math>E_2</math> is the energy of the 1st excited state, and we are done. But this is not correct.
There is important difference between <math>\Psi(x, 0) </math> and the 2nd new stationary state, <math>\psi_2(x)</math>. The normalization factors are different: <math>\sqrt{\frac{1}{L}}</math> v.s. <math>\sqrt{\frac{2}{L}}</math> may not look so significant, but the major difference is that for <math>L<x<2L</math>, <math>\Psi(x, 0) </math> is zero, while the stationary state wave function is still non-zero at <math>\psi_2(x) =\sqrt{\frac{1}{L}}\sin{(\frac{\pi}{L}x)}</math>. These differences lead to the following.
When you expand <math>\Psi(x, 0) </math> in terms of the linear combination of the (new) stationary state wave functions (Fourier series in this case - infinite square well stationary state wave functions), <math>\sum_n^\infty c_n \psi_n(x)</math>, <math>c_2</math> is large but not 1 as you may think. Actually it will be <math>\sqrt{\frac{1}{2}}</math>. The remaining components are spread among all stationary state wave functions with odd indeces.
The energy associated with <math>\Psi(x, 0) </math> is not uniquely that of <math>\psi_2(x)</math> (only half of the time) but energies associated with many other states are involved.
i.e. <math>\Psi(x, 0) = \sqrt{\frac{1}{2}}\psi_2(x)e^{\frac{-iE_2t}{\hbar}}+\sum_n^{\rm odd}c_n\psi_n(x)e^{\frac{-iE_nt}{\hbar}}</math>. The calculations of <math>c_n</math>'s are left to the students.