<s>[INST] Power series expansion of ODE So I have this equation:
$$(1-x^2)y''-2xy'+\lambda y=0$$
Where it is given that the solution can be written as the following convergent power series:
$$y(x) =\sum_{n=0}^\infty a_n x^n$$
And my goal is to arrive to this relationship of the coefficients:
$$a_{n+2} = \frac{n(n+1)-\lambda}{(n+1)(n+2)}a_n$$

My attempt:
$$y'=\sum_{n=0}^\infty (n+1)a_{n+1}x^n$$
$$y''=\sum_{n=0}^\infty (n+2)a_{n+2}x^n$$
Substituting in the above equation and considering the coefficients of $x^n$ we get the following equation:
$$ 0 = (n+2)a_{n+2} - na_n -2na_n+\lambda a_n$$
Which does not seem to match the above relationship. What am I missing? 
 [/INST] $y′=\sum_{n=-1}^{\infty}a_{n+1}(n+1)x^n$
$y′'=\sum_{n=-2}^{\infty}a_{n+2}(n+2)(n+1)x^n$
$\lambda y = 2xy'-(1-x^2)y''$
$\lambda y = 2x[\sum_{n=-1}^{\infty}a_{n+1}(n+1)x^n]-(1-x^2)[\sum_{n=-2}^{\infty}a_{n+2}(n+2)(n+1)x^n]$
$\lambda y = [\sum_{n=-1}^{\infty}2a_{n+1}(n+1)x^{n+1}]-[\sum_{n=-2}^{\infty}a_{n+2}(n+2)(n+1)x^n]+[\sum_{n=-2}^{\infty}a_{n+2}(n+2)(n+1)x^{n+2}]$
$\lambda y = \sum_{n=0}^{\infty}[2a_{n}n-a_{n+2}(n+2)(n+1)+a_{n}n(n-1)]x^n$
$\lambda a_{n} = a_{n}n(n+1)-a_{n+2}(n+2)(n+1)$
$[\lambda-n(n+1)] a_{n} = -a_{n+2}(n+2)(n+1)$
$a_{n+2} = \frac{n(n+1)-\lambda}{(n+2)(n+1)}a_{n}$
</s>