TITLE: Solving a second-order linear ODE: $\frac{d^2 y}{dx^2}+(x+1)\cdot \frac{dy}{dx}+5x^2\cdot y=0$
QUESTION [7 upvotes]: Recently, a friend challenged me to find the general solution of the following differential equation:

$$\frac{d^2 y}{dx^2}+(x+1)\cdot \frac{dy}{dx}+5x^2\cdot y=0 \tag{1}$$

This is a second-order linear ordinary differential equation.
I have tried putting this ODE into the form of a Sturm-Liouville Equation by multiplying both sides by $e^{\int (x+1)~dx}$ to obtain:
$$e^{\frac{x^2}{2}+x}\cdot\frac{d^2 y}{dx^2}+(x+1)\cdot e^{\frac{x^2}{2}+x}\cdot \frac{dy}{dx}+5x^2\cdot e^{\frac{x^2}{2}+x}\cdot y=0$$
By the reverse product rule:
$$\frac{d}{dx}\left(e^{\frac{x^2}{2}+x}\cdot y'(x)\right)+5x^2\cdot e^{\frac{x^2}{2}+x}\cdot y=0 \tag{2}$$
Now, it is in Sturm-Liouville form, however I am unsure how to proceed from here.

Therefore, I have instead tried to do some substitution on the differential equation to eliminate the first order term to obtain this form:
$$\frac{d^2 y}{dx^2}+q(x)\cdot y=0$$
Therefore, I have tried using the substitution:
$$y=e^{-\frac{(1+x)^2}{4}}\cdot z$$
$$\ln y=\ln{z}-\frac{(1+x)^2}{4}$$
Differentiating implicitly both sides w.r.t $x$:
$$\frac{y'}{y}=\frac{z'}{z}-\frac{1}{2}(x+1) \tag{3}$$
Differentiating again:
$$\frac{y\cdot y''-(y')^2}{y^2}=\frac{z\cdot z''-(z')^2}{z^2}-\frac{1}{2}$$
Thus:
$$\frac{y''}{y}-\left(\frac{y'}{y}\right)^2=\frac{z''}{z}-\left(\frac{z'}{z}\right)^2-\frac{1}{2}$$
Substituting $(3)$:
$$\frac{y''}{y}=\left(\frac{z'}{z}-\frac{1}{2}(x+1)\right)^2+\frac{z''}{z}-\left(\frac{z'}{z}\right)^2-\frac{1}{2}$$
Expanding gives:
$$\frac{y''}{y}=\left(\frac{z'}{z}\right)^2-\left(\frac{z'}{z}\right)(x+1)+\frac{1}{4}(x+1)^2+\left(\frac{z''}{z}\right)-\left(\frac{z'}{z}\right)^2-\frac{1}{2}$$
$$\frac{y''}{y}=-\left(\frac{z'}{z}\right)(x+1)+\frac{1}{4}(x+1)^2+\left(\frac{z''}{z}\right)-\frac{1}{2} \tag{4}$$
Going back to our original ODE $(1)$:
$$y''+(x+1)y'+5x^2\cdot y=0$$
$$\frac{y''}{y}+(x+1)\frac{y'}{y}+5x^2=0$$
Substituting $(3)$ and $(4)$ gives:
$$-\left(\frac{z'}{z}\right)(x+1)+\frac{1}{4}(x+1)^2+\left(\frac{z''}{z}\right)-\frac{1}{2}+(x+1)\left[\frac{z'}{z}-\frac{1}{2}(x+1)\right]+5x^2=0$$
Cancelling terms gives:
$$\left(\frac{z''}{z}\right)-\frac{1}{4}(x+1)^2-\frac{1}{2}+5x^2=0$$
Which gives the ODE:
$$z''+\left[5x^2-\frac{1}{2}-\frac{1}{4}(x+1)^2\right]z=0$$
When the $z$ term is expanded, it gives:
$$z''+\frac{1}{4}(19x^2-2x-3)z=0 \tag{5}$$
I tried identifying this ODE as a known type, however I could not. Therefore, I am stuck at this point.

Note that I am trying to avoid a series solution for this differential equation. I am aware that the result will be in terms of non-elementary functions. Wolfram|Alpha suggests that the solution will be in terms of the Hermite polynomial $H_n(z)$ defined as:
$$H_n(z)=\frac{n!}{2\pi i} \oint e^{-t^2+2tz}\cdot t^{-n-1}~dt$$
And the Kummer confluent hypergeometric function $_1F_1(a;b;x)$ defined as:
$$_1F_1(a;b;x)=1+\frac{a}{b}x+\frac{a(a+1)}{b(b+1)}\frac{x^2}{2!}+\cdots=\sum_{k=0}^{\infty} \frac{(a)_k}{(b)_k}\frac{x^k}{k!}$$
Where $(a)_k$ and $(b)_k$ are Pochhammer Symbols.
In conclusion, I would appreciate some guidance on how to continue solving this ODE analytically. I was thinking that equation $(5)$ seems simpler to solve from what we have, however if $(1)$ seems easier, please feel free to continue from the original ODE.
Thanks in advance.

Edit:
I figured that I could simplify $(5)$ further by completing the square:
$$\frac{d^2 z}{dx^2}+\left[\frac{19}{4}\left(x-\frac{1}{19}\right)^2-\frac{29}{38}\right]z=0$$
And then applying the substitution $u=x-\frac{1}{19}$ and $du=dx$. Evaluating $\frac{d^2 z}{dx^2}$:
$$\frac{dz}{dx}=\frac{dz}{du}\cdot \frac{du}{dx}=\frac{dz}{du}$$
Thus, differentiating w.r.t $x$ gives:
$$\frac{d^2 z}{dx^2}=\frac{d}{dx}\left(\frac{dz}{du}\right)=\frac{d}{du}\left(\frac{dz}{du}\right)\frac{du}{dx}=\frac{d^2 z}{du^2}$$
Therefore, we reduce it to the form:
$$\frac{d^2 z}{du^2}+\left[\frac{19}{4}u^2-\frac{29}{38}\right]z=0 \tag{6}$$

REPLY [7 votes]: I figured it out. Equation $(6)$ can be put into the form of a Weber Differential Equation defined as:
$$\frac{d^2 y}{dx^2}+\left(\nu + \frac{1}{2}-\frac{x^2}{4}\right)y=0 \tag{7}$$
With general solution:
$$y(x)=c_1D_{\nu}(x)+c_2 D_{-\nu-1}(ix)$$
Where $D_{\nu}(x)$ represents the parabolic cylinder function.
Substituting $\gamma=\sqrt[4]{-19}\cdot u$ and $d\gamma =\sqrt[4]{-19}~du$ puts it in the form of $(7)$. Let's evaluate $\frac{d^2 z}{du^2}$:
$$\frac{dz}{du}=\frac{dz}{d\gamma}\cdot \frac{d\gamma}{du}=\frac{dz}{d\gamma}\cdot \sqrt[4]{-19}$$
$$\frac{d^2 z}{du^2}=\frac{d}{du}\left(\frac{dz}{d\gamma}\cdot \sqrt[4]{-19}\right)=\frac{d}{d\gamma}\left(\frac{dz}{d\gamma}\cdot \sqrt[4]{-19}\right)\cdot \frac{d\gamma}{du}=\frac{d^2 z}{d\gamma^2}\sqrt{19}\cdot i$$
Substituting into $(6)$ gives:
$$i \frac{d^2 z}{d\gamma^2}\sqrt{19}+\left[\frac{19}{4}\cdot \frac{\gamma^2}{\sqrt{19}i}-\frac{29}{38}\right]z=0$$
Dividing both sides by $i\sqrt{19}$ gives:
$$\frac{d^2z}{d\gamma^2}+\left[-\frac{\gamma^2}{4}+\frac{29i}{38\sqrt{19}}\right]z=0 \tag{8}$$
Thus, it is now in the form of $(7)$. Hence, we let $\nu=\frac{29i}{38\sqrt{19}}-\frac{1}{2}$ and obtain the general solution for $z$ as a function of $\gamma$:
$$\large z(\gamma)=c_1\cdot D_{\frac{29i}{38\sqrt{19}}-\frac{1}{2}}(\gamma)+c_2\cdot D_{-\frac{1}{2}-\frac{29i}{38\sqrt{19}}}(i\gamma)$$
Thus, if we substitute back for $u$, we obtain:
$$\large z(u)=c_1\cdot D_{\frac{29i}{38\sqrt{19}}-\frac{1}{2}}(\sqrt[4]{-19}\cdot u)+c_2\cdot D_{-\frac{1}{2}-\frac{29i}{38\sqrt{19}}}(i\sqrt[4]{-19}\cdot u)$$
Substituting back for $x$, we obtain:
$$z(x)=c_1\cdot D_{\frac{29i}{38\sqrt{19}}-\frac{1}{2}}\left(\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)+c_2\cdot D_{-\frac{1}{2}-\frac{29i}{38\sqrt{19}}}\left(i\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)$$
Finally, substituting back for $y$, we obtain:
$$y\cdot e^{\frac{(1+x)^2}{4}}=c_1\cdot D_{\frac{29i}{38\sqrt{19}}-\frac{1}{2}}\left(\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)+c_2\cdot D_{-\frac{1}{2}-\frac{29i}{38\sqrt{19}}}\left(i\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)$$
Which gives the explicit solution:
$$\small \bbox[5px,border:2px solid #C0A000]{y(x)=c_1\cdot D_{\frac{29i}{38\sqrt{19}}-\frac{1}{2}}\left(\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)\cdot e^{-\frac{(1+x)^2}{4}}+c_2\cdot D_{-\frac{1}{2}-\frac{29i}{38\sqrt{19}}}\left(i\sqrt[4]{-19}\cdot \left(x-\frac{1}{19}\right)\right)\cdot e^{-\frac{(1+x)^2}{4}}} \tag{9}$$
This is equivalent to the solution given by Wolfram|Alpha, but I find this solution to be a neater one.