Solving differential equation: $y''-\frac{\epsilon ^2 y}{x^2} + \frac{y'}{x}=0$ I've derived a differential equation, as below. 
$$y''(x)-\frac{\epsilon ^2 y(x)}{x^2} + \frac{y'(x)}{x}=0$$
It is a second order linear differential equation, WolframAlpha seem to suggest that the solution is (for the equation without $\epsilon$):
$$y(x) = \frac{(c_1 (x^2 + 1))}{x} + \frac{(i c_2 (x^2 - 1))}{(2 x)}$$
I have two questions:


*

*What is the step-by-step towards the solution?

*Why is there imaginary part in the solution?


Would be appreciated for any help!
 A: Let's assume that we want the solution for $0<x$, so multiply both sides by $x^2$.  Yield the following:
$$ x^2y'' +xy' - \epsilon^2y = 0$$
Guess that the solution looks like $y = x^r$.  Then,
$$x^2r(r-1)x^{r-2} + xrx^{r-1} + \epsilon x^r = 0$$
Factor out the $x^r$ which is not zero by assumption. You are left with something quadratic in $r$
A: This is a Cauchy-Euler equation.
Putting it in that form:
$$x^2\frac{d^2 y}{dx^2}+x\frac{dy}{dx}-\epsilon^2 y=0$$
You can use the ansatz $y=x^{\lambda}$:
$$\frac{dy}{dx}=\lambda x^{\lambda-1}$$
$$\frac{d^2y}{dx^2}=\lambda(\lambda-1)x^{\lambda-2}$$
To obtain the polynomial:
$$-\epsilon^2+\lambda^2=0$$
Solving for $\lambda$ and using the fact that $y(x)=c_1 y_1(x)+c_2 y_2(x)$, we obtain the general solution.

To answer your second question:
Do not be alarmed that the solution given by the above looks different when letting $\epsilon=1$. Wolfram|Alpha in this case did not give the simplest solution. Let's continue from the answer given:
$$y(x)=\frac{c_1(x^2+1)}{x}+\frac{ic_2(x^2-1)}{x}=c_1\left(x+\frac{1}{x}\right)+i\cdot c_2\left(x-\frac{1}{x}\right)$$
Grouping terms:
$$y(x)=x\cdot (c_1+i\cdot c_2)+\frac{1}{x}\cdot (c_1-i\cdot c_2)$$
Since $c_1$ and $c_2$ are arbitrary constants, we may let $c_1+ic_2=k_1$ and $c_1-ic_2=k_2$. This gives a simple solution, which is consistent with the solution we obtain for general $\epsilon$.
