I want to find at least one solution of the differential equation $$xy''-y'+4xy=0$$ about the point $x=0$. I identified that $x=0$ is a regular singular point and thus Frobenius Theorem is applicable.
Now, assuming a solution of the form $$ y(x)={x^r}\sum_{n=0}^\infty {c_n x^n}=\sum_{n=0}^\infty {c_n x^{n+r}}$$
I get $y'=\sum_{n=0}^\infty {(n+r)c_n x^{n+r-1}}$ and $y''=\sum_{n=0}^\infty {(n+r-1)c_n x^{n+r-2}}$.
Substituting, and simplifying, I end up with the equation: $$\sum_{n=0}^\infty {(n+r)(n+r-1)c_n x^{n+r-1}} - \sum_{n=0}^\infty {(n+r)c_n x^{n+r-1}} + \sum_{n=2}^\infty {4 c_{n-2} x^{n+r-1}} $$
$$\implies r(r-2)c_0 x^{r-1} + (r^2-1)c_1x^r +\sum_{n=2}^\infty {[(n+r)(n+r-2)c_n + {4}c_{n-2}]x^{n+r-1}}=0$$
In this case, I have two indicial equations, $r(r-2)=0$ and $r^2-1=0$, giving $r = 2, 0, 1, -1$.
At this point, I would have expected to only have two values for $r$, but now I have four values.
How should I proceed in terms of using the values of $r$ to obtain a series solution? Is it correct to simply set $c_1=0$ and just use the indicial equation $r(r-2)=0$, and using the larger root $r=2$? If yes, then is there a general rule for which indicial equation to use when faced with more than two values of $r$ in the case of a second order differential equation?
Note: Maple gave one solution to be $$ y_1(x) = x^2\{1 - \frac{1}{2}x^2 + \frac{1}{12}x^4+O(x^6)\}$$
Note that $$\sum_{n=0}^\infty c_n x^{n+r}=\sum_{n=0}^\infty a_nx^n,$$ where $a_n=0$ for $n<r,$ and $a_n=c_{n-r}$ otherwise. Thus, there's no particular benefit to the multiplication by $x^r,$ in the first place.
If we skip that part, instead taking that $$y(x)=\sum_{n=0}^\infty c_n x^n,$$ so that $$y'(x)=\sum_{n=0}^\infty c_n nx^{n-1}=\sum_{n=1}^\infty nc_nx^{n-1}=\sum_{n=0}^\infty(n+1)c_{n+1}x^n$$ and so $$y''(x)=\sum_{n=0}^\infty(n+1)nc_{n+1}x^{n-1}=\sum_{n=1}^\infty(n+1)nc_{n+1}x^{n-1}=\sum_{n=0}^\infty(n+2)(n+1)c_{n+2}x^n,$$ then we obtain
\begin{eqnarray}0 &=& xy''-y'+4xy\\ &=& \sum_{n=0}^\infty(n+2)(n+1)c_{n+2}x^{n+1}-\sum_{n=0}^\infty(n+1)c_{n+1}x^n+\sum_{n=0}^\infty 4c_n x^{n+1}\\ &=& -c_1+\sum_{n=0}^\infty(n+2)(n+1)c_{n+2}x^{n+1}-\sum_{n=1}^\infty(n+1)c_{n+1}x^n+\sum_{n=0}^\infty 4c_n x^{n+1}\\ &=& -c_1+\sum_{n=0}^\infty(n+2)(n+1)c_{n+2}x^{n+1}-\sum_{n=0}^\infty(n+2)c_{n+2}x^{n+1}+\sum_{n=0}^\infty 4c_n x^{n+1}\\ &=& -c_1+\sum_{n=0}^\infty\bigl[(n+2)(n+1)c_{n+2}-(n+2)c_{n+2}+4c_n\bigr]x^{n+1}\\ &=& -c_1+\sum_{n=0}^\infty\bigl[(n+2)nc_{n+2}+4c_n\bigr]x^{n+1}.\end{eqnarray} Thus, $c_1=0,$ and $(n+2)nc_{n+2}=-4c_n$ for all $n.$ Readily, then, we see that $c_n=0$ for all odd $n$ by induction. Letting $c_0=c,$ we can then use induction to prove a formula for all even $n.$
Edit: The above is based on my assumption that $r$ was a nonnegative integer, which is not necessarily the case. However, there is still an important take away.
Note that if $c_m$ is the first non-zero coefficient, then $$x^r\sum_{n=0}^\infty c_nx^n=x^{r+m}\sum_{n=0}^\infty a_nx^n,$$ where $a_n=c_{m+n}$ for all $n.$ Thus, we will always assume that the first coefficient is non-zero. That is, $c_0\ne 0.$
Thus, since we need $r(r-2)c_0=0,$ then we have $r(r-2)=0,$ so $r=0$ (in which case the work I did above is correct) or $r=2$ (in which case the solution is some scalar multiple of $y_1$). From there, we immediately see that in either case, $c_1=0,$ and in general find that $$c_n=-\frac{4}{(n+r)(n+r-2)}c_{n-2}$$ for $n\ge 2.$