How to find the second solution to an ODE of the form $xy''+y'-xy=0$? I am learning about the Frobenius method to solving ordinary differential equations, but I seem to have some difficulty with finding the second linearly independent solution to the above equation (this is a homework problem). I was hoping someone could point out what is going wrong here.
To start, I found my first solution by letting $y = x^{r} \sum_{n=0}^{\infty} c_n x^n$. Using this method and substituting it above, I found the first solution to be:
$$ y_1 = \sum_{n=0}^{\infty} \frac{x^{2n}}{2^{2n}(n!)^2}.$$
The characteristic of the original ODE is $r^2 = 0$, so we have repeated roots. Therefore, the second solution should contain a logarithm and be given by:
$$y_2 = y_1 \ln x + x^{r+1} \sum_{n=0}^{\infty} b_n x^n.$$
When I do this, I find that the coefficients $b_{2n} = 0$, and the recursion relation for the odd coefficients is (with $b_1 = -1/4$):
$$ b_{2n-1} = \frac{b_{2n-3}}{(2n)^2} - \frac{2}{2^{2n} (n!)^2 (2n) }, \,\, n \ge 2.$$
The issue is that this recursion relation will yield coefficients that are always negative. However, the actual solution yields alternating coefficients, which means something above is wrong. I'm only interested in the first few terms of the solution for $y_2$, but I still need to get the alternative terms. I know the actual second solution is given by (from the textbook Elementary Differential Equations With Boundary Value Problems, sixth edition, Edwards and Penney, question 9 on page 246):
$$y_2 \approx y_1 \left( \ln x - \frac{x^2}{4} + \frac{5x^4}{128} - \frac{23x^6}{3456} \right).$$
In addition to this, I know there is a different way to go about this by using an integrating factor and doing some long division (through the method of reduction of order), and I do indeed get the correct answer. It's just that I would like to confirm why I'm getting the wrong coefficients here. The first coefficient $b_1$ is good, but the others don't match the solution above.
Finally, I realize that this equation yields Bessel functions with imaginary arguments, but I'm looking for the actual terms using the above method.
 A: As confirmed below, your result is correct. Now you need to carefully compare with the given result, you need to perform a power series division to extract the factor $y_1$ from the whole expression, that is, the given result is $y_2(x)=y_1(x)(\ln x+a(x))$ where $a(x)y_1(x)=b(x)$.

The equation you should have obtained for $y_2=y_1\ln x+b$, $b(x)=\sum b_kx^{k+1}$ is
$$
0=2y_1'+xb''+b'-xb
\\
\implies 
0=2\sum 2nc_{2n}x^{2n-1}+\sum k^2b_{k-1}x^{k-1}-b_{k-3}x^{k-1}
$$
so that the recursion for the even indices gives the zero solution, and for the odd indices you get
$$
4n^2b_{2n-1}=b_{2n-3}-4nc_{2n}\iff b_{2n-1}=\frac{b_{2n-3}}{4n^2}-\frac{1}{2^{2n}n(n!)^2}.
$$
In a form that reduces the number of variable coefficients, the formula is
$$
2^{2n}(n!)^2b_{2n-1}=2^{2n-2}((n-1)!)^2b_{2n-3}-\frac1{n}\implies b_{2n-1}=\frac{4b_1+1-H_n}{2^{2n}(n!)^2}.
$$
and a simple form of this solution is obtained with setting the constant term $4b_1+1=0$.

Now we need to solve
$$
\sum_{n>0}a_{2n}x^{2n}\sum_{n\ge 0} \frac{x^{2n}}{2^{2n}(n!)^2}=-\sum_{n>0} \frac{H_nx^{2n}}{2^{2n}(n!)^2}
\\~\\
(a_2x^2+a_4x^4+a_6x^6+...)\left(1+\frac{x^2}{4}+\frac{x^4}{2^6}+...\right)
=-\frac{x^2}4-\frac{(1+\frac12)x^4}{2^6}-\frac{(1+\frac12+\frac13)x^6}{2^8\cdot 3^2}-...
$$
so that 
$$a_2=-\frac14,\\
a_4+\frac14a_2=-\frac{3}{2^7}\implies a_4=\frac{5}{2^7},\\
a_6+\frac14a_4+\frac1{2^6}a_2=-\frac{11}{2^9⋅3^3}\implies a_6=\frac{-11+(2-5)⋅3^3}{2^9⋅3^3}=-\frac{23}{2^7⋅3^3}
$$
and so on.
