For a particle of mass $m$ in a one-dimensional box of length $l$, the eigenfunctions and energies are

$$
\begin{aligned}
\psi_{n}(x) &=\sqrt{\frac{2}{l}} \sin \frac{n \pi x}{l}, \quad 0 \leq x \leq l \\
E_{n} &=\frac{1}{2 m}\left(\frac{n \pi \hbar}{l}\right)^{2}, \quad n=\pm 1, \pm 2, \ldots
\end{aligned}
$$

Suppose the particle is originally in a state $|n\rangle$ and the box length is increased to a length of $2 l(0 \leq x \leq 2 l)$ in a time $t \ll h / E_{n}$. Afterwards what is the probability that the particle will be found in an energy eigenstate with energy $E_{n}$ ?
First consider the process in which the box length is increased from $l$ to $2 l$. As $t \ll \frac{h}{E_{n}}$, it is reasonable to assume that the state of the particle in the box is unable to respond to the change during such a short time. Therefore the wave function of the particle after the change is completed is

$$
\psi(x)= \begin{cases}\sqrt{\frac{2}{l}} \sin \frac{n \pi x}{l}, & 0 \leq x \leq l \\ 0, & l \leq x \leq 2 l\end{cases}
$$

On the other hand, the eigenstates and eigenvalues of the same particle in the one-dimensional box of length $2 l$ would be, respectively,

$$
\begin{aligned}
\phi_{n^{\prime}}(x) &=\sqrt{\frac{1}{l}} \sin \frac{n^{\prime} \pi x}{2 l}, \quad(0 \leq x \leq 2 l), \\
E_{n^{\prime}} &=\frac{1}{2 m}\left(\frac{n^{\prime} \pi \hbar}{2 l}\right)^{2}, \quad\left(n^{\prime}=\pm 1, \pm 2, \ldots\right) .
\end{aligned}
$$

The energy $E_{n}$ of the particle corresponds to the energy level $E_{n^{\prime}}$ in the $2 l$ box, where $\frac{n}{l}=\frac{n^{\prime}}{2 l}$, i.e., $n^{\prime}=2 n$. The corresponding eigenstate is then $\phi_{2 n}$. Thus the probability amplitude is

$$
A=\int_{-\infty}^{\infty} \phi_{2 n}(x) \psi(x) d x=\frac{\sqrt{2}}{l} \int_{0}^{l} \sin ^{2} \frac{n \pi x}{l} d x, \frac{1}{\sqrt{2}},
$$

and the probability of finding the particle in an eigenstate with energy $E_{n}$ is

$$
P=|A|^{2}=\frac{1}{2} .
$$