Solution of differential equation with some conditions! Find twice differentiable function $f:\Bbb{R}\to \Bbb{R}$  such that  $f''(x)=(x^2-1)f(x)$ with $f(0)=1$ and $f'(0)=0$
I can see that $f(x)$=$e^{-x^2/2}$ satisfies the required conditions but I don't have any proper way to finding this function.I have found this by "hit and trial" method.
 A: If you have a ODE with initial conditions, then you have uniqueness for the solution of your problem.
Edit:
You see that if you had $y''(x)=c^2y(x)$ where $c$ is a constant, then $y=e^{cx}$, now we suppose $y(x)=e^{g(x)}$instead $y=e^{cx}$, derivating two times $y''=(g''+g'^2)e^{g(x)}=(g''+g'^2)y$, if we suppose that this a solution of the problem then, $g''+g'^2=x^2-1$, now
take $v=g'$ and we have, $v'+v^2=x^2-1$, since the right hand side is a polynomial of degree two, and the derivative low the degree, and the square up the degree of the polynomial, we can suppose that $v(x)= ax+c$. Then $a+(ax+c)^2=x^2-1$ then $a+a^2x^2 +2acx +c^2=x^2-1$, implies $a^2=1$ and $ac=0$, so we get $c=0$, since $a\neq 0$, and $a=-1$. Then $v=g'(x)=-x $ hence integrating yelds $g(x)=-x^2/2+d$. Now test the initial conditions to find $d$. $e^{g(0)}=1$ implies $e^{d}=1$, so $d=0$. And $y'(0)=g'(0)e^{g(0)}=-0\times 1=0$. By the uniques of the solution we are done.
A: The only one solution is $$f \left( x \right) ={{\rm e}^{-\frac{{x}^{2}}{2}}}$$
