# $x^2f''(x)+xf'(x)+y=x^2+1$, $x>0$, $f(0)=f'(0)=0$. Find $f(x)$.

The function comes out to be $$c_1\cos(\ln x)+c_2\sin(\ln x)+\frac{x^2}{5}+1$$

Someone pointed out that by putting $$x=0$$ in the given equation, we get $$f(0)=1$$ but it is given that $$f(0)=0$$ hence there are no solutions.

Is this a valid argument?

• It must be $$x>0$$ see the condition above! Jun 2 '19 at 10:00
• Is your $y$ another $f(x)$? Then yes, this argument shows that you can not give initial conditions in a singular point without restrictions. Jun 2 '19 at 15:39

The given equation has to be only satisfied for $$x>0$$. You can take $$\lim_{x\rightarrow 0}$$ to obtain $$\lim_{x\rightarrow 0} \big(x^2 f''(x) + xf'(x) + f(x) \big) = 1$$ $$\lim_{x\rightarrow 0} \big(x^2 f''(x)\big) + 0\cdot f'(0) + f(0) = 1$$ $$\lim_{x\rightarrow 0} \big(x^2 f''(x)\big) + f(0) = 1$$ It can be satisfied even with $$f(0)=0$$ if $$\lim_{x\rightarrow 0} f''(x) = \infty$$. The argument that inserting $$x=0$$ to the eqaution gives you $$f(0)=1$$ is invalid, because it assumes that $$\lim_{x\rightarrow 0} f''(x)$$ is finite, which (as you can check from the solution) is not true.
Put $$x=e^{t}$$ in the given d.e. and you will get $$y''(t)+y(t)=e^{2t} +1$$ Solve this linear differential equation with constant coefficients and you will have $$y(t)=acos(t)+bsin(t)+\dfrac{e^{2t}}{5}+1$$ then use the initial conditions to find $$a$$ and $$b$$ and then substitute $$t=ln x$$.
• The initial conditions translate to conditions on values at $t=-\infty$, which is slightly impractical for the oscillating part. Jun 2 '19 at 15:38