Solution (source code)

= Solution

For the <quantum harmonic oscillator>, using $[\hat x,\hat p]=i\hbar$, direct multiplication gives
$$
\hat a^\dagger\hat a=\frac{\hat p^2}{2m\hbar\omega}+\frac{m\omega\hat x^2}{2\hbar}-\frac12,
\qquad
\boxed{\hat H=(\hat a^\dagger\hat a+\tfrac12)\hbar\omega.}
$$
The <commutators> are
$$
\boxed{[\hat a,\hat a^\dagger]=1,\quad
[\hat H,\hat a]=-\hbar\omega\hat a,\quad
[\hat H,\hat a^\dagger]=\hbar\omega\hat a^\dagger.}
$$
Thus each ladder operation shifts <energy> by one quantum. The <ladder operator> norms $\|a|n\rangle\|^2=n$ and $\|a^\dagger|n\rangle\|^2=n+1$, with conventional <phases>, give
$$
\boxed{\hat a|n\rangle=\sqrt n\,|n-1\rangle,\qquad
\hat a^\dagger|n\rangle=\sqrt{n+1}\,|n+1\rangle.}
$$
Let $\ell=\sqrt{\hbar/(m\omega)}$. In position space $\hat p=-i\hbar\partial_x$, so $a\psi_0=0$ becomes $(x+\ell^2\partial_x)\psi_0=0$. Normalizing and then applying $a^\dagger$ gives
$$
\boxed{\psi_0=(\pi\ell^2)^{-1/4}e^{-x^2/(2\ell^2)},\qquad
\psi_1=\sqrt2\frac{x}{\ell}\psi_0.}
$$
Their overlap vanishes because $\psi_0^*\psi_1$ is odd on the full real line; the <Gaussian> second moment verifies $\int|\psi_1|^2dx=1$.

\Image[/past-exam-of-the-physics-course-of-the-year-4-of-the-natural-sciences-course-of-the-university-of-cambridge/2012/paper-1-gp2012-oscillator.png]
{title=Oscillator ground and first states}
{description=Original normalized oscillator wavefunctions show even ground-state parity, odd first-excited parity and one interior node in the excited state.}