Energy form of a half-well sine state (source code)

= Energy form of a half-well sine state
{title2=$\langle H\rangle=\hbar^2\pi^2/(2ma^2)$}

In the <infinite square well> on $(-a,a)$, extend $\sqrt{2/a}\sin(\pi x/a)$ from $(0,a)$ by zero. It is normalized and continuous, but its <derivative> jumps at zero. Its energy <expectation value> is the <quadratic form of a positive quantum Hamiltonian> $\hbar^2\int|\psi'|^2/(2m)$, giving the displayed value. It is not in the operator domain of the Dirichlet <Hamiltonian operator>: its distributional second <derivative> contains a <Dirac delta>. Its sine-basis coefficients are $a_2=-1/\sqrt2$, all other even coefficients zero, and $a_{2p+1}=4\sqrt2(-1)^p/[\pi(4-(2p+1)^2)]$. These make $\sum_nE_n|a_n|^2$ finite but $\sum_nE_n^2|a_n|^2$ divergent, independently distinguishing the form domain from the operator domain.