I want to solve the ODE : $ x^2y′′ + (x^2 + 2x)y′ −2y = 0 $ using the Frobenius method but i have stuck a little bit. So far i found the recurrence equation to be: $$ a_k = \frac {-1}{s+k+2} a_{k-1} $$ Where s is the starting power and equal $ s = 1 $ and $ s = -2 $. So for $s=1$ i found that $$ a_k = \frac {(-1)^k}{(k+2)!/2}a_0 $$ So the first solution is
$$ y_1(x) = x^s \sum_{k=0}^{\infty} a_kx^k = 2a_0 \cdot x \sum_{k=0}^{\infty} \frac {(-1)^k}{(k+2)!} x^k$$
I know the solution $ y_1 $ should equal to :$$ y_1(x) = e^{-x}/x^2 $$ but i can't go from the sum that i found to this.
For $s=1$, $a_k = \frac{-1}{k+3}a_{k-1}$ then $a_k = \frac{(-1)^k}{(k+3)!}a_0$.
Then your series is:
$y_1(x) = a_0 x \sum_{k=0}^{\infty}\frac{(-1)^k}{(k+3)!}x^k = a_0 \frac{1}{x^2} \sum_{k=0}^{\infty}\frac{(-1)^k}{(k+3)!}x^{k+3} = \frac{a_0}{x^2}(e^{-x}-\frac{x^2}{2}+x-1)$.
Thus your first solution is $y_1(x) = \frac{C_1}{x^2}(e^{-x}-\frac{x^2}{2}+x-1)$ where $C_1$ is an arbitrary constant.
The solution corresponding to $s=-2$ will give you $y_2(x) = \frac{a_0}{x^2}e^{-x}$