Solution (source code)

= Solution

Substitution of the <power series>, with termwise <differentiation>, gives the coefficient identity
$$
-(n+2)(n+1)a_{n+2}+2na_n=Ea_n,
\qquad a_{n+2}=\frac{2n-E}{(n+2)(n+1)}a_n.
$$
Thus $a_0$ and $a_1$ are arbitrary, and all <power series> solutions of the <Hermite differential equation> are
$$
\boxed{W(x)=a_0\sum_{j=0}^\infty\frac{\prod_{r=0}^{j-1}(4r-E)}{(2j)!}x^{2j}
+a_1\sum_{j=0}^\infty\frac{\prod_{r=0}^{j-1}(4r+2-E)}{(2j+1)!}x^{2j+1}.}
$$
An empty product is one. For a nonterminating branch the ratio of consecutive terms in its own parity subsequence is asymptotic to $|x|^2/j$, hence tends to zero for every fixed $x$. The <ratio test> proves convergence everywhere; the resulting <power series> can be differentiated termwise and indeed solve the <differential equation>. A terminating branch is already a <polynomial>.

The <boundary condition> $W(0)=0$ forces $a_0=0$; the solution is odd. Apart from the zero solution, which works for every $E$, a <polynomial> occurs exactly when an odd index $d$ satisfies $2d-E=0$. Before that index the odd coefficients are nonzero, and after it they vanish. Thus the <odd polynomial solutions of the Hermite differential equation> have
$$
\boxed{E=4j+2,\quad \deg W=2j+1,\quad j=0,1,2,\ldots.}
$$
Equivalently, comparison of leading <polynomial> coefficients gives $E=2\deg W$, proving that no other nonzero polynomial is possible. Normalizing by $a_1=1$, the <polynomials> of degree below six are
$$
\begin{array}{c|c}
E&W(x)\\\hline
2&x\\
6&x-\frac23x^3\\
10&x-\frac43x^3+\frac4{15}x^5.
\end{array}
$$
Each can be multiplied by an arbitrary nonzero constant; these are normalized odd <Hermite polynomials>.

Let $L=-d^2/dx^2+2x\,d/dx$. The forcing in the final <inhomogeneous linear differential equation> is precisely the displayed degree-five <eigenfunction> $P_5$, with $LP_5=10P_5$. Hence
$$
\boxed{W(x)=\frac1{10}P_5(x)=\frac{x}{10}-\frac{2x^3}{15}+\frac{2x^5}{75}.}
$$
Direct <differentiation> gives $LW=x-4x^3/3+4x^5/15$, and $W(0)=0$. Among <polynomial> solutions this choice is unique: a polynomial in the <kernel> of $L$ must be constant, and its value at zero eliminates that constant.