Consider a power series of the form $y=\sum_{n}^\infty a_nx^n$ for the equation $(1-x)y''+xy'-y=0$.
a. Find a recurrence relation for the $a_n's$
$a_2=\frac{a_0}{2},a_{k+2}=\frac{k}{k+2}\cdot a_{k+1}-\frac{k-1}{(k+2)(k+1)}, k\ge1$
b. Find the first $5$ coefficients $a_n$.
c. Find the general formula for the $a_n's$ as a function of $n$.
$y=a_0\Big(1+\sum_2^\infty\frac{x^n}{n!}\Big)+a_1x = a_0e^x+(a_1-a_0)x$
You take the first and second derivative of $y$. Note that any $a_n$ is a constant from the point of view of derivation. $$y'=\sum_{n=1}^\infty a_n n x^{n-1}\\ y''=\sum_{n=2}^\infty a_n n (n-1) x^{n-2}$$ Note that when you plug into the equation, the summation should be over the same power of $x$ $$(1-x)\sum_{n=2}^\infty a_n n (n-1) x^{n-2} +x\sum_{n=1}^\infty a_n n x^{n-1}-\sum_{n=0}^\infty a_n x^n=0$$ becomes $$\sum_{n=2}^\infty a_n n (n-1) x^{n-2} -\sum_{n=2}^\infty a_n n (n-1) x^{n-1} +\sum_{n=1}^\infty a_n n x^{n}-\sum_{n=0}^\infty a_n x^n=0$$ Now $x^0$ terms occurs only in the first sum for $n=2$ and in the last sum for $n=0$ $$2a_2-a_0=0$$ or $$a_2=\frac{a_0}{2}$$ Now the rest of the equation becomes $$\sum_{n=1}^\infty a_{n+2} (n+2) (n+1) x^{n} -\sum_{n=1}^\infty a_{n+1} (n+1) n x^{n} +\sum_{n=1}^\infty a_n n x^{n}-\sum_{n=1}^\infty a_n x^n=0$$ Therefore, for $n\ge1$ $$a_{n+1} (n+2) (n+1)-a_{n+1} (n+1) +(n-1)a_n=0$$ This yields your first reply. Note that in the iamge there is a missing $a_n$ term