Solution (source code)

= Solution

\b[Factorization.] Put $\alpha=\sqrt{m\omega/(2\hbar)}$ and use the <canonical commutation relation> $[x,p]=i\hbar$:
$$
a^\dagger a=\alpha^2\left(x-\frac{ip}{m\omega}\right)
\left(x+\frac{ip}{m\omega}\right)
=\frac{m\omega x^2}{2\hbar}+\frac{p^2}{2m\hbar\omega}-\frac12.
$$
It follows that
$$
\boxed{H=\hbar\omega(a^\dagger a+\tfrac12)}.
$$
The $-1/2$ arises from <quantum operator ordering>; treating $x$ and $p$ as commuting would lose the <zero-point energy>.

\b[<commutators>.] Direct use of $[x,p]=i\hbar$ gives $[a,a^\dagger]=1$. The product rule for <commutators> then yields $[a^\dagger a,a]=-a$ and $[a^\dagger a,a^\dagger]=a^\dagger$, hence
$$
\boxed{[a,a^\dagger]=1,\quad[H,a]=-\hbar\omega a,\quad
[H,a^\dagger]=\hbar\omega a^\dagger}.
$$

\b[Raising the <energy>.] If $H|\phi\rangle=E|\phi\rangle$, then
$$
Ha^\dagger|\phi\rangle
=(a^\dagger H+[H,a^\dagger])|\phi\rangle
=(E+\hbar\omega)a^\dagger|\phi\rangle.
$$
Thus the <creation operator> produces an <energy eigenstate> with \b[<energy> $E+\hbar\omega$]. It is nonzero: for a normalized physical oscillator <eigenstate>, $\|a^\dagger\phi\|^2=\langle aa^\dagger\rangle=E/(\hbar\omega)+1/2>0$. Normalize by this norm if a normalized state is wanted.

\b[Lowest <wavefunctions> and <orthogonality>.] In the <position representation in quantum mechanics>,
$$
a=\sqrt{\frac{m\omega}{2\hbar}}\left(x+\frac{\hbar}{m\omega}\frac{d}{dx}\right).
$$
The annihilation condition therefore gives $\psi_0'=-(m\omega/\hbar)x\psi_0$. Applying $a^\dagger$ to its solution gives
$$
\boxed{\psi_0\propto e^{-m\omega x^2/(2\hbar)},\qquad
\psi_1\propto x e^{-m\omega x^2/(2\hbar)}}.
$$
Their <inner product> is proportional to $\int_{-\infty}^\infty x e^{-m\omega x^2/\hbar}\,dx=0$, since the integrand is odd. These are the even and odd lowest <wavefunctions> shown in A2, with <energies> $\hbar\omega/2$ and $3\hbar\omega/2$.