Gaussian eigenstate for a quadratic potential (source code)

= Gaussian eigenstate for a quadratic potential

For $U(x)=kx^2$ and $k>0$, the ansatz $\psi=Ce^{-\alpha x^2}$ solves the stationary Schrödinger equation when
$$
\alpha=\frac1\hbar\sqrt{\frac{mk}{2}},
\qquad
E=\hbar\sqrt{\frac{k}{2m}},
\qquad
C=\left(\frac{2\alpha}{\pi}\right)^{1/4}.
$$
It has $\Delta x=1/(2\sqrt\alpha)$ and $\Delta p=\hbar\sqrt\alpha$, so it saturates the Heisenberg bound.