How to solve $x \frac{d^{2} y}{d x^{2}}+4 \frac{d y}{d x}+x y=0$ How to solve $$x \frac{d^{2} y}{d x^{2}}+4 \frac{d y}{d x}+x y=0$$
First of all i could not find the two linearly independent solutions $y_1(x),y_2(x)$.
I tried polynomials, but in vain.
 A: Let set $\begin{cases}a(x)=x\\b(x)=4\\c(x)=x\end{cases}\quad$ then $\quad a(x)y''+b(x)y'+c(x)y=0$
Can be reduced according to Sturm-Liouville theory via the integration factor
$\displaystyle\mu(x)=\dfrac 1{a(x)}\exp\left(\int \frac{b(x)}{a(x)}\right)=\frac 1x\exp\left(\int\frac 4x\right)=\frac 1x\exp(4\ln(x))=\frac {x^4}x=x^3$
Therefore let substitute $y(x)=\dfrac {u(x)}{x^3}$
After reduction to the same denominator and eliminating the superfluous $x^2$ factor
$$xu''-2u'+xu=0$$
It may seem we have not made much progress, but in fact this ODE is simpler to solve.
Unfortunately not as simple as $(xu)''=xu''+2u'$ (with a $+$ sign instead) would have been much more appealing.
Cheating at the result given by CAS we can set $u=xv'-v$, notice that $u'=xv''$.
We get $\, x(xv'''+v'')-2xv''+x^2v'-xv=0$ which can be rewritten
$$(v''+v)=x(v''+v)'$$
Solving for $\quad w=v''+v\quad $ we get $\quad w=xw'\iff w=C_1x$
And then $\quad v''+v=C_1x\iff v=C_1x+C_2\sin(x)+C_3\cos(x)$
Substituting back in $u$ gives (the term $C_1x$ get cancelled):
$$u=C_2(x\cos(x)-\sin(x))-C_3(x\sin(x)+\cos(x))$$
Just divides by $x^3$ to get the expression for $y$.
Rem: If someone knows the reason why the substitution $u=xv'-v$ works well in this context, I'm interested about it.
A: $$\frac{d^2y}{dx^2} + \frac{4}{x} \frac{dy}{dx} + y = 0$$
has $0$ as a regular singular point.  ($\frac{4}{x}$ is not analytic, but $\frac{4}{x}\cdot (x)$ is.)
So we try a solution of the form $ y = x^r \cdot \sum_{0}^{\infty} a_n x^n$
Substituting in we get an indicial equation for $r$, $$r(r-1) + p_0 r + q_0 = 0$$ where $p_0 = 4$ and $q_0 = 0$ giving $r = 0$ or $r = 3$. Since these solutions differ by an integer, plugging in the larger root, $r = 3$ means that we have an ordinary power series for the first solution.  The second solution may be Frobenius as well or it may require multiplying the series by $\ln (x)$ and finding new coefficients.  In that case the formula is $$y_2(x) = Cy_1(x) \ln x + x^{r_2}\sum_{n = 0}^{\infty} b_n x^n$$
Then we get a recurrence relation for $a_n$ in the usual way.
