Solution (source code)

= Solution

Assume $a>0$ and define $\omega=\sqrt{2a/m}$ so that the potential is that of a <quantum harmonic oscillator>. The two trial forms have derivatives
$$
\Psi_1''=(4C^2x^2-2C)\Psi_1,\qquad \Psi_2''=(4C^2x^2-6C)\Psi_2.
$$
Substitution into the stationary <Schrödinger equation> cancels the $x^2$ terms precisely when $a=2\hbar^2C^2/m$. Normalizability selects the positive root,
$$
\boxed{C=\sqrt{\frac{ma}{2\hbar^2}}=\frac{m\omega}{2\hbar}.}
$$
The remaining constants give
$$
\boxed{E_{\Psi_1}=\frac{\hbar^2C}{m}=\frac{\hbar\omega}{2},\qquad E_{\Psi_2}=\frac{3\hbar^2C}{m}=\frac{3\hbar\omega}{2}.}
$$
For later overlaps choose positive normalization constants. The <Gaussian integral> gives $A=(2C/\pi)^{1/4}$, while its second-moment <integral> gives $B=2\sqrt C\,A$. Thus both wavefunctions have unit <norm> and are <orthogonal> by their opposite <parity>.

The real Gaussian is positive everywhere and has no nodes; the odd state has exactly one node at $x=0$. The <Sturm oscillation theorem> orders one-dimensional bound states by their node count. Consequently these are the <ground state> and first excited state, respectively, also agreeing with the oscillator spectrum $E_n=(n+1/2)\hbar\omega$.