What happens if we suddenly change the potential in Schrodinger equation? If a particle in a quantum mechanical infinite square well energy is measured to be $E_2$, and then after a period of time the potential is switched to that of a quantum harmonic oscillator, will the same energy be measured at 100% probability? Or will switching the potential from an infinite square well to a harmonic oscillator allow for more possibilities?
 A: This is a classic problem. I'll answer it in general. Suppose the potential suddenly changes somehow over the time interval $\epsilon$. We can examine what happens as $\epsilon\to 0$. Let $\psi_{-\epsilon/2}$ be the wave function at time $t=-\epsilon/2$ and let $\psi_{\epsilon/2}$ be the wave function at time $t=\epsilon/2$. Then, we can solve the Schrodinger equation by integration to get
$$\psi_{\epsilon/2}-\psi_{-\epsilon/2}=\int_{-\epsilon/2}^{\epsilon/2}\frac{d\psi}{d t}dt=\frac{-i}{\hbar}\int_{-\epsilon/2}^{\epsilon/2}\left(-\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}+V\right)\psi(t) dt.$$
Now, assuming that the integrand is finite (which is should be, unless we have a wave function with infinite energy), this integral vanishes in the limit at $\epsilon\to 0$. Therefore, when an instantaneous change occurs in the potential function $V$, the wave function immediately after is the same as the wave function immediately before. In the more realistic situation where the potential changes very quickly, the wave function will change very little before versus after the change. Nevertheless, in general, the wave function will have a different energy, and will start evolving in a different way after the change, in accordance with the new potential.
