Consider the following simple problem -
An electron is moving freely inside a one-dimensional infinite potential box with walls at x = 0 and x = a. If the electron is initially in the ground state (n = 1) of the box and if we suddenly quadruple the size of the box (that is, the right hand side of the wall is moved instantaneously from x = a to x = 4a), calculate the probability of finding the electron in the ground state of the new box.
In this question, the initial wavefunction of the particle is :
$$\psi(x)=\begin{cases} \sqrt{\frac{2}{a}}\sin\left(\frac{\pi x}{a}\right) & x\in[0,\,a] \\ 0 & \text{elsewhere} \end{cases} $$
and its energy should be
$$E=\frac{ℏ^2 π^2}{2m a^2}$$
Now the particle is in the new box. If we assume the energy to remain constant (and I think we should because energy should be conserved) then we have to change the wavefunction of the particle. The wavefunction in the new box corresponding to the energy $$E=\frac{ℏ^2 π^2}{2m a^2}$$
will be
$$\psi'(x)=\begin{cases} \sqrt{\frac{1}{2a}}\sin\left(\frac{\pi x}{a}\right) & x\in[0,\,4a] \\ 0 & \text{elsewhere} \end{cases} $$
Now if we find the probability for the particle to be in the new ground state, it comes out to be 0 since this new wavefunction is the 3rd excited state of the new 1D box.
But, if we had considered that the wave function would remain the same then we would get the answer as provided in the following post -
Frankie S. Palmer , Changing widths of potential wells
A detailed solution for the second method was found here - Check the answer to question 1 in this pdf file
As we can clearly see, in both cases the answer is quite different. So which approach is correct and why? Everywhere I have seen that they use the second approach to keep the wavefunction unchanged but why is that. Shouldn't energy be the quantity that remains unchanged?