Solve $x^2f''(x)+f(x)=0$ check my answer I'd just like someone else to review my answer, I'm  preparing for an exam and I saw this question but a solution was not included with it, and the result is...somewhat unpleasant, It's not feasible to derive it twice and check that it is indeed a solution.
Ok, so the question is to solve the ODE $x^2f''(x)+f(x)=0$, it's not with constant coefficients so there is no set method, but we do have a hint: define $t=\ln{x}$
Ok, so $e^{2t}f''(e^t)+f(e^t)=0$ is what we want to solve. Let's look at the function $g(t)=f(e^t)$:
$g'(t)=e^tf'(e^t)$, and $g''(t)=e^tf'(e^t)+e^{2t}f''(e^t)$
We can see that $g''(t)-g'(t)+g(t)=e^{2t}f''(t)+f(e^t)$.
So solving $g''(t)-g'(t)+g(t)=0$ is equivalent to solving our original question.
Using the method of finding the roots of the characteristic polynomial, the solutions are $g_1(t)=e^{\frac{1}{2}t}\cos(\frac{\sqrt{3}}{2}t)$ and $g_2(t)=e^{\frac{1}{2}t}\sin({\frac{\sqrt{3}}{2}t})$
And the most general solution is $g(t)=f(e^t)=c_1e^{\frac{1}{2}t}\cos(\frac{\sqrt{3}}{2}t)+c_2e^{\frac{1}{2}t}\sin({\frac{\sqrt{3}}{2}t}) $
But since our original question was in the sense of $x$, not $t$, our final answer should be $f(x)=c_1e^{\frac{1}{2}\ln x}\cos(\frac{\sqrt{3}}{2}\ln x)+c_2e^{\frac{1}{2}\ln x}\sin({\frac{\sqrt{3}}{2}\ln x})$
Is this result correct?
 A: Direct solution check  using the free Wolfram Alpha seems to match
A: Define
\begin{align}
g(x) = \sqrt{x} \sin(r \log(x))
\end{align}
Then
\begin{align}
g'(x) &= \frac{1}{2\sqrt{x}} \sin(r \log(x))
+ \sqrt{x}\cos(r\log(x)) \cdot\frac{r}{x}
\\
&= \frac{1}{2\sqrt{x}}(\sin(r\log(x))+ 2r\cos(r\log(x))
\end{align}
Differentiating again (note, that we already know the derivatives of $\sin(\log(x))$ and $\cos(\log(x))$ from before). Note, that $r=\sqrt{3}$ and later I replace $w=r\log(x)$.
\begin{align}
g''(x)&=\frac{-1}{4\sqrt{x}^3}(\sin(r\log(x))+ 2r\cos(r\log(x))
\\&\quad+\frac{1}{2\sqrt{x}}
(\cos(r\log(x))\frac{r}{x}-\sin(\log(x))\frac{2r^2}{x}) 
\\
&=\frac{1}{4\sqrt{x}^3}(
-\sin(w)
-2r\cos(w))+2r\cos(w)-4r^2sin(w))
\\&=
\frac{-1}{4\sqrt{x}^3}(1+r^2)\sin(w)\\
&=-\frac{1}{\sqrt{x}^3}\sin(\sqrt{3}\log(x))
\\
&=
\frac{-1}{x^2}\sqrt{x} \sin(\sqrt{3}\log(x))
\end{align} 
Now, doing everything again for $h(x) = \sqrt{x} \cos(r \log(x))$ you will probably (left as exercise) obtain
\begin{align}
h''(x) = \frac{-1}{x^2}\sqrt{x} \cos(\sqrt{3} \log(x))
\end{align}
And as you can see,
\begin{align}
y(x) &= c_1 h(x)+c_2g(x) \\
\Rightarrow y''(x) &=c_1h''(x)+c_2g''(x) \\
&=\frac{-1}{x^2}(c_1 h(x)+c_2g(x))
\\
&=\frac{-1}{x^2} y(x) \\
\Leftrightarrow 
0&=y''(x)x^2+y(x)
\quad \quad \quad \quad \quad \blacksquare
\end{align}
