# Thread: Recurrence relation for a Taylor series solution

1. ## Recurrence relation for a Taylor series solution

I am trying to find the recurrence relation for a Taylor series solution of the differential equation

$y'' - 2xy'+(x-1)y=0$

Also I have also to find the first six coefficients of the series.

So far I have
$\sum_{n=2}^{\infty}n(n-1)a_n x^{n-2} - 2x\sum_{n=1}^{\infty}na_n x^{n-1}+(x-1)\sum_{n=0}^{\infty}a_n x^{n}=0$

$\sum_{n=2}^{\infty}n(n-1)a_n x^{n-2} - \sum_{n=1}^{\infty}2na_n x^{n}+\sum_{n=0}^{\infty}a_n x^{n+1} - \sum_{n=0}^{\infty}a_n x^{n}=0$

Taking the series to the power of $x^n$,
$\sum_{n=0}^{\infty}(n+2)(n+1)a_{n+2} x^{n} - \sum_{n=1}^{\infty}2na_n x^{n}+\sum_{n=1}^{\infty}a_{n-1} x^{n} - \sum_{n=0}^{\infty}a_n x^{n}=0$

I took the series to $n=1$
$(2a_{2}-a_{0}) + \sum_{n=1}^{\infty}[(n+2)(n+1)a_{n+2}-2na_n+ a_{n-1}-a_n]x^n = 0$

So I get one recurrent relations as: $a_2=\frac{a_0}{2}$

But how do I solve this part to another relation:
$(n+2)(n+1)a_{n+2}-(2n+1)a_n+a_{n-1}=0$

Have I got it right so far? Any help would be greatly appreciated.