Solution (source code)

= Solution

\b[Stationary states.] Inside the <infinite square well>, the <time-independent Schrödinger equation> has sinusoidal solutions. The <boundary conditions> $\phi(0)=\phi(a)=0$ select $k_na=n\pi$; normalization then gives
$$
\boxed{\phi_n(x)=\sqrt{\frac2a}\sin\frac{n\pi x}{a},\quad
E_n=\frac{n^2\pi^2\hbar^2}{2ma^2}},\qquad n=1,2,\ldots.
$$
Each <wavefunction> vanishes outside the well. There is no nonzero $n=0$ state.

\b[Immediate <energy> measurement after expansion.] For the <one-sided sudden expansion of an infinite square well>, take the original wall at $x=0$ as fixed, so the expanded well occupies $0<x<2a$. In the <sudden approximation>, the initial <wavefunction> remains $\sqrt{2/a}\sin(\pi x/a)$ on $0<x<a$, extended by zero elsewhere. The new <ground state> is $\chi_1=a^{-1/2}\sin(\pi x/(2a))$. Its <probability amplitude> is
$$
c_1=\frac{\sqrt2}{a}\int_0^a\sin\frac{\pi x}{a}\sin\frac{\pi x}{2a}\,dx
=\frac{4\sqrt2}{3\pi}.
$$
The <Born rule> therefore gives
$$
\boxed{P_1=|c_1|^2=\frac{32}{9\pi^2}=0.36025}.
$$
The motion of the walls matters: a symmetric expansion about the old midpoint would instead give $64/(9\pi^2)$. The stated width alone does not explicitly identify the final endpoints. The first result uses the natural continuation of the specified left boundary; if both boundaries are moved, the final location must be supplied. For a new well $(b,b+2a)$ containing $(0,a)$, the overlap is $c_1(b)=(4\sqrt2/(3\pi))[\cos(\pi b/(2a))-\sin(\pi b/(2a))]$.

\b[Evolution of one <energy eigenstate>.] For a time-independent <Hamiltonian operator>, write $|\psi(t)\rangle=f(t)|\phi_n\rangle$. Substitution into the <Time-dependent Schrödinger equation> gives $i\hbar \dot f=E_nf$, so
$$
\boxed{|\psi(t)\rangle=e^{-iE_nt/\hbar}|\phi_n\rangle}.
$$
Only a <global phase> changes, leaving all measurement <probabilities> unchanged.

\b[Delayed <energy> measurement.] Expand the unchanged initial state in the complete new <energy> <eigenbasis>,
$$
\psi(x,t)=\sum_{n=1}^\infty c_n\chi_n(x)e^{-iE_n't/\hbar},
\quad \chi_n=\frac1{\sqrt a}\sin\frac{n\pi x}{2a},
\quad E_n'=\frac{n^2\pi^2\hbar^2}{8ma^2}.
$$
For the fixed-left-wall geometry, direct overlap integration gives
$$
c_2=\frac1{\sqrt2},\qquad
c_n=\frac{4\sqrt2\sin(n\pi/2)}{\pi(4-n^2)}\quad(n\ne2).
$$
<orthogonality> isolates the new ground-state amplitude as $c_1e^{-iE_1't/\hbar}$. Its phase cancels on squaring, so \b[the ground-state <probability> remains $32/(9\pi^2)$ for every delay], provided the expanded well remains fixed and no intervening measurement or environment changes the state. The position <probability density> generally evolves because different <eigenstates> acquire different relative phases.