2nd order differential equation with non-constant coefficients

Consider the second order differential equation $$y''-x^2y=0$$ where $$y$$ itself is a function of $$x$$. I do not know how to solve this equation. I tried a series expansion and failed, and because the coefficients are not constant, I can not use the characteristic equation to solve it either. Hence, here I am, looking for any hints on how to solve this equation for $$y$$.

I know there are tons of questions already out there concerning second order differential equations looking like this one, and I looked through just about every one of them, however all the solutions provided seem to be very situational for the given DE, and I have yet to find a general method that I can use to solve the above. I though about reducing the order of the equation.

Thanks!

• It is a Weber equation with $k=1,c=0$ and the solution is $$y(x) = c_1 D_{-\frac12}(\sqrt 2 x) + c_2 D_{-\frac12}(i \sqrt 2 x),$$ where $D_n$ is a Parabolic Cylinder function and $c_1,c_2$ are arbitrary constants. It seems that the general solution can't be expressed in terms of elementary functions – User Jan 4 at 15:09
• How did your series expansion fail? $n(n-1)a_n=a_{n-4}$ is a rather simple equation. Note that $a_n=0$ for $n<0$, $a_0,a_1$ are free. – Lutz Lehmann Jan 4 at 15:15

This is a particular case of Weber differential equation $$y''+\left( \nu+\frac 12-\frac {x^2}4\right)y=0$$ Have a look here.

The solution for your specific case is given by $$y=c_1 D_{-\frac{1}{2}}\left(\sqrt{2} x\right)+c_2 D_{-\frac{1}{2}}\left(i \sqrt{2} x\right)$$ where appear the parabolic cylinder function.

For a power series solution, let $$y=\sum_{n=0}^{\infty}a_nx^n,\quad y'=\sum_{n=1}^{\infty}na_nx^{n-1}, \quad y''=\sum_{n=2}^{\infty}n(n-1)a_{n}x^{n-2}$$

then substituting into $$y''-x^2y=0$$ forms

$$\sum_{n=2}^{\infty}n(n-1)a_{n}x^{n-2}-x^2\sum_{n=0}^{\infty}a_nx^n=0$$ or $$\sum_{n=2}^{\infty}n(n-1)a_{n}x^{n-2}-\sum_{n=0}^{\infty}a_nx^{n+2}=0$$ so that for the coefficients we find $$x^0:\quad 2(1) a_2=0 \implies a_2=0$$ $$x^1:\quad 3(2) a_3=0 \implies a_3=0$$ $$x^2:\quad 4(3) a_4-a_0=0 \implies a_4=\frac{a_0}{12}$$ $$x^3:\quad 5(4) a_5-a_1=0 \implies a_5=\frac{a_1}{20}$$ $$x^4:\quad 6(5) a_6-a_2=0 \implies a_6=\frac{a_2}{30}=0$$ therefore our recurrence for $$x^n$$ is given by $$(n+2)(n+1)a_{n+2}-a_{n-2}=0 \implies a_{n+2}=\frac{a_{n-2}}{(n+2)(n+1)},\quad n\ge 2$$ where \begin{align}y&=a_0+a_1x+a_2x^2+a_3x^3+a_4x^4+a_5x_5+a_6x^6+\dots\\&= a_0+a_1x+0x^2+0x^3+\frac{a_0}{12}x^4+\frac{a_1}{20}x^5+0x^6+\dots\\&= a_0\left(1+\frac{x^4}{12}+\dots\right)+a_1\left(1+\frac{x^5}{20}+\dots\right) \end{align}

You could then add more terms to simplify the representation of $$a_0$$ and $$a_1$$.

Note that this belongs to an ODE of the form http://eqworld.ipmnet.ru/en/solutions/ode/ode0205.pdf.

Let $$y=e^{-\frac{x^2}{2}}u$$ ,

Then $$y'=e^{-\frac{x^2}{2}}u'-xe^{-\frac{x^2}{2}}u$$

$$y''=e^{-\frac{x^2}{2}}u''-xe^{-\frac{x^2}{2}}u'-xe^{-\frac{x^2}{2}}u'+(x^2-1)e^{-\frac{x^2}{2}}u=e^{-\frac{x^2}{2}}u''-2xe^{-\frac{x^2}{2}}u'+(x^2-1)e^{-\frac{x^2}{2}}u$$

$$\therefore e^{-\frac{x^2}{2}}u''-2xe^{-\frac{x^2}{2}}u'+(x^2-1)e^{-\frac{x^2}{2}}u-x^2e^{-\frac{x^2}{2}}u=0$$

$$e^{-\frac{x^2}{2}}u''-2xe^{-\frac{x^2}{2}}u'-e^{-\frac{x^2}{2}}u=0$$

$$u''-2xu'-u=0$$

You can apply the procedure in Help on solving an apparently simple differential equation to get $$u=c_1\int_0^\infty\dfrac{e^{-\frac{t^2}{4}+xt}}{\sqrt{t}}dt+c_2\int_0^\infty\dfrac{e^{-\frac{t^2}{4}-xt}}{\sqrt{t}}dt$$

$$\therefore y=c_1e^{-\frac{x^2}{2}}\int_0^\infty\dfrac{e^{-\frac{t^2}{4}+xt}}{\sqrt{t}}dt+c_2e^{-\frac{x^2}{2}}\int_0^\infty\dfrac{e^{-\frac{t^2}{4}-xt}}{\sqrt{t}}dt$$

$$y=c_1\int_0^\infty\dfrac{e^{-\frac{t^2}{4}+xt-\frac{x^2}{2}}}{\sqrt{t}}dt+c_2\int_0^\infty\dfrac{e^{-\frac{t^2}{4}-xt-\frac{x^2}{2}}}{\sqrt{t}}dt$$

$$y=C_1\int_0^\infty e^{-\frac{t^2}{4}+xt-\frac{x^2}{2}}~d(\sqrt{t})+C_2\int_0^\infty e^{-\frac{t^2}{4}-xt-\frac{x^2}{2}}~d(\sqrt{t})$$

$$y=C_1\int_0^\infty e^{-\frac{t^4}{4}+xt^2-\frac{x^2}{2}}~dt+C_2\int_0^\infty e^{-\frac{t^4}{4}-xt^2-\frac{x^2}{2}}~dt$$