Parabolic variational trial for a particle in a box (source code)

= Parabolic variational trial for a particle in a box
{title2=$\widetilde E=5\hbar^2/(ma^2)$}

For an <infinite square well> of width $a$, the normalized trial $\widetilde\psi=\sqrt{30/a^5}\,x(a-x)$ obeys both <Dirichlet boundary conditions> and has no interior <nodes of a wavefunction>. Its <kinetic energy> is
$$
\frac{\hbar^2}{2m}\frac{30}{a^5}\int_0^a(a-2x)^2\,dx
=\frac{5\hbar^2}{ma^2}.
$$
The ratio to the exact <ground-state energy> is $10/\pi^2=1.01321\ldots$. Its expansion in the normalized sine <eigenfunctions> has coefficients $4\sqrt{60}/(\pi^3n^3)$ for odd $n$ and zero for even $n$. This supplies a concrete check of the <quantum variational principle> and shows that a small energy error can coexist with excited-state admixtures.