Solution (source code)

= Solution

Direct evaluation of the <Rayleigh quotient> exposes a problem with the requested minimization. Using the supplied <Gaussian integrals>,
$$
\begin{aligned}
\langle\psi|\psi\rangle&=\sqrt\pi(a^2-2a+3),\\
\langle\psi|\hat H|\psi\rangle&=\frac{\sqrt\pi}{2}(a^2-2a+11),\\
\mathcal E(a)&=\frac{a^2-2a+11}{2(a^2-2a+3)}
=\frac12+\frac4{(a-1)^2+2}.
\end{aligned}
$$
Thus
$$
\mathcal E'(a)=\frac{-8(a-1)}{[(a-1)^2+2]^2},\qquad
\mathcal E'(1)=0,\qquad \mathcal E''(1)=-2.
$$
\b[The <eigenfunction> value $a=1$ is a maximum, not a minimum.] Indeed $\mathcal E(1)=5/2$, whereas $\mathcal E(0)=11/6$ is already lower. There is no finite minimizing $a$ in this family: its infimum is $1/2$, approached as $|a|\to\infty$, when the normalized trial <wavefunction> approaches the ground state. This is consistent with the <quantum variational principle>. The original printed instruction in this subpart is therefore inconsistent as an unconstrained minimization; a stationary <Rayleigh quotient> need not be a minimum.

The intended excited state can instead be obtained by imposing an <excited-state variational constraint>. <Orthogonality> to the ground state requires
$$
\langle g|\psi\rangle=\sqrt\pi(1-a)=0,
$$
which fixes \b[$a=1$]. Every member of the family is even, so it is already orthogonal to the odd $n=1$ state. With the ground state excluded, the lowest allowed oscillator <energy> is therefore $E_2=5/2$. In the exact oscillator <basis>, $\psi$ is proportional to $\sqrt2\,\phi_2+(1-a)\phi_0$, making both the maximum and the <orthogonality> correction transparent.

\Image[/past-exam-of-the-chemistry-course-of-the-year-3-of-the-natural-sciences-course-of-the-university-of-cambridge/2022/paper-2b-variational-quotient.png]
{title=The trial-family energy has a maximum at the exact second-excited-state parameter}