# Finding a power series solution to a differential equation?

1. Apr 23, 2017

### Eclair_de_XII

1. The problem statement, all variables and given/known data
"Find the recurrence relation in the power series solution for $y''-xy'-y=0$ centered about $x_0=1$."

2. Relevant equations
$y=\sum_{n=0}^\infty a_nx^n$
Answer as given in book: $(n+2)a_{n+2}-a_{n+1}-a_n=0$

3. The attempt at a solution
$y=\sum_{n=0}^\infty a_n(x-1)^n$
$xy'=x\sum_{n=0}^\infty na_n(x-1)^{n-1}=x\sum_{n=1}^\infty na_n(x-1)^{n-1}=x\sum_{n=0}^\infty (n+1)a_{n+1}n(x-1)^{n}$
$y''=\sum_{n=0}^\infty n(n-1)a_n(x-1)^{n-2}=\sum_{n=0}^\infty n(n-1)a_n(x-1)^{n-2}=\sum_{n=2}^\infty n(n-1)a_n(x-1)^{n-2}=\sum_{n=0}^\infty a_{n+2}(n+2)(n+1)(x-1)^{n}$

$y''-xy'-y=0=\sum_{n=0}^\infty[(n+2)(n+1)a_{n+2}-x(n+1)a_{n+1}-a_n](x-1)^n$

$(n+2)(n+1)a_{n+2}=x(n+1)a_{n+1}+a_n$

I don't know what I'm doing wrong. It's not matching the answer given in the back of the book.

2. Apr 23, 2017

### Eclair_de_XII

Never mind, I found what I did wrong.

$xy'=x\sum_{n=0}^\infty na_n(x-1)^{n-1}=[1+(x-1)]⋅\sum_{n=0}^\infty na_n(x-1)^{n-1}=\sum_{n=1}^\infty na_n(x-1)^{n-1}+\sum_{n=0}^\infty na_n(x-1)^{n}=\sum_{n=0}^\infty (n+1)a_{n+1}(x-1)^{n}+\sum_{n=1}^\infty na_n(x-1)^{n}$