Potential well expanding Imagine you have a particle in a 1D potential well with infinitely high walls. Such a particle would have an energy of
\begin{equation*}
E_n = \frac{\hbar^2 \pi^2}{2m a^2}n^2
\end{equation*}
if the mass of the particle is $m$ and the well has a width of $a$. Now assume $n=1$ for that particle. What would happen if we let the walls grow to a width of $2a$ apart in an adiabatic fashion such that the system has time to catch up? This can be imagined by saying that $a(t) = a + \frac{t}{T}a$ for some time $T$ and $t \in [0, T]$. (of course there are some conditions on $T$ to guarantee this is adiabatic and so on), but  I would imagine that during this transition it would probably have an energy of
\begin{equation*}
E_n = \frac{\hbar^2 \pi^2}{2m (\left(1 + \frac{t}{T} \right)a)^2}
\end{equation*}
but this would mean that
\begin{equation*}
\Delta E = \frac{\hbar^2 \pi^2}{2m (\left(1 + \frac{t}{T} \right)a)^2} - \frac{\hbar^2 \pi^2}{2m a^2} = \left(\left(\frac{T}{t+T} \right)^2 - 1\right) \frac{\hbar^2 \pi^2}{2 m a^2}
\end{equation*}
disappeared out of the system. My question is: where did this energy go? It doesn't seem to make much sense to me. Could anyone help me with this?
 A: The changing size of the infinite square well is really a change in the form of the Hamiltonian from some initial Hamiltonian $H^i$ to a final Hamiltonian $H^f$. The adiabatic theorem tells us that if a particle is initially in the $n$-th eigenstate of $H^i$, it will be carried (via the Schrödinger equation) to the $n$-th eigenstate of $H^f$ under the assumption that the energy spectra is discreet and nondegenerate during the transition.
Suppose, as you suggested that the we start with the ground state wavefunction of a well of size $a$,
\begin{equation}
\psi^i(x) = \sqrt{\frac{2}{a}}\sin\left(\frac{\pi}{a}x\right)
.
\end{equation}
Gradually moving the size to $2a$ will transition the particle to the ground state,
\begin{equation}
\psi^f(x) = \sqrt{\frac{1}{a}}\sin\left(\frac{\pi}{2a}x\right)
.
\end{equation}
The change in the energy is then,
\begin{equation}
\Delta E = \frac{\hbar^2\pi^2}{2ma^2} - \frac{\hbar^2\pi^2}{8ma^2} = \frac{3\hbar^2\pi^2}{8ma^2}\neq 0
.
\end{equation}
This is (negative) the result one would derive from your answer with $t = T$. As you pointed out, the energy is not conserved here. By moving the barrier, someone is extracting energy out of the system, much like an expanding gas pushing out a piston.
For further details, I recommend you consult Chpt. 10 of Griffiths Quantum Mechanics (2nd Edition) which contains more information and a proof of the adiabatic theorem. Hope this helped!
