Solving an ODE using Frobenius' method I've been tasked with solving the ODE $2xy^{''}-(8x-1)y^{'}+(8x-2)y=0$.
I have tried using the Frobenius method, but have instead found some strange series which i highly doubt is the correct answer (wolframalpha confirms.)
Allowing
$$
y=\sum_{n=0}^\infty a_n x^{n+r}\\ 
y^{'}=\sum_{n=0}^\infty a_n(n+r) x^{n+r-1}\\ 
y^{''}\sum_{n=0}^\infty a_n(n+r)(n+r-1)x^{n+r-2}
$$
we then equate y, y', and y'' back into the ODE.
$$2\sum_{n=0}^\infty (n+r)(n+r-1)a_nx^{n+r-1}+\sum_{n=0}^{\infty}(n+r)a_nx^{n+r-1}-8\sum_{n=0}^\infty a_nx^{n+r}+8\sum_{n=0}^\infty a_nx^{n+r+1}-2\sum_{n=0}^\infty a_nx^{n+r}=0$$
For the third and fifth term, allowing n=k-1, and on the fourth term allowing n=k-2, yields:
$$2\sum_{k=0}^\infty (k+r)(k+r-1)a_kx^{k+r-1}+\sum_{k=0}^{\infty}(k+r)a_kx^{k+r-1}-8\sum_{k=1}^\infty a_{k-1}x^{k-1+r}+8\sum_{k=2}^\infty a_{k-2}x^{k+r-1}-2\sum_{k=1}^\infty a_{k-1}x^{k+r-1}=0$$
Taking the 'lower terms' of k=0, we get
$$
2r(r-1)+r=0
r=0,1/2
$$
From here, $$\left [ 2(k+r)(k+r-1)+(k+r) \right ]a_k-10a_{k-1}+8a_{k-2}=0$$
$$a_k = \frac{10a_{k-1}-8a_{k-2}}{2(k+r)(k+r-1)+(k+r)}\ for\ k\geq 2$$
Clearly, this is not the answer I was looking for. Using r=0,1/2 yields some ghastly results.
Given this, what is the proper way to do this, or where did I go wrong?
 A: There is a mistake when substituting the sums back into the ODE. It should be this:
$$2\sum_{n=0}^\infty (n+r)(n+r-1)a_nx^{n+r-1}+\sum_{n=0}^{\infty}(n+r)a_nx^{n+r-1}-8\sum_{n=0}^\infty (n+r)a_nx^{n+r}\\+8\sum_{n=0}^\infty a_nx^{n+r+1}-2\sum_{n=0}^\infty a_nx^{n+r}=0.$$
Note the extra factor of $(n+r)$ in the third term. That was your mistake. We can rewrite the above as
$$\sum_{n=0}^\infty (n+r)(n+r-\frac{1}{2})a_nx^{n+r-1}-4\sum_{n=1}^\infty (n+r-\frac{3}{4})a_{n-1}x^{n+r-1}+4\sum_{n=2}^\infty a_{n-2}x^{n+r-1}=0.$$
We get the same indicial equation. I will go for $r=0$ and leave you to do the other solution. We have
$$\sum_{n=0}^\infty n(n-\frac{1}{2})a_nx^{n-1}-4\sum_{n=1}^\infty (n-\frac{3}{4})a_{n-1}x^{n-1}+4\sum_{n=2}^\infty a_{n-2}x^{n-1}=0.$$
Equating terms of $O(x^0)$ yields $a_1=2a_0$. Equating the other terms yields the recurence relation
$$a_n=4\frac{(n-\frac{3}{4})a_{n-1}-a_{n-2}}{n(n-\frac{1}{2})}.$$
This still seems nasty, but putting it into Wolfram with $a_0=c$ and $a_1=2c$ yields $a_n=\frac{2^nc}{n!}$. There is your nice solution. If you wanted to get this without Wolfram, induction is your friend.
A: I do not know if you were obliged to use  Frobenius method because the problem is quite simple if you let $y(x)=z(x) \,e^{ax}$. This leads to
$$(a-2) \left((2 (a-2) x+1) z(x)+4 x z'(x)\right)+2 x z''(x)+z'(x)=0$$ So $a=2$ makes
$$2 x z''(x)+z'(x)=0$$ Use the reduction of order, solve for $p(x)=z'(x)$ and integrate again.
