# How to write down the recurrence relation for the coefficients $a_n.$

Consider the differential equation $$(1 + x)y' = py$$ where $$p$$ is a constant. Assume that the equation has a power series solution $$y= \sum_{n=0}^{+\infty} a_nx^n$$ . Write down the recurrence relation for the coefficients $$a_n.$$

My attempt : Given equation $$(1 + x)y' = py \tag 1$$

Consider $$y=\sum_{n=0}^\infty a_nx^n$$ Then $$y'=\sum_{n=1}^\infty na_nx^{n-1}$$ Now substitute in $$(1)$$ we have $$\sum_{n=0}^\infty a_nx^n+ x\sum_{n=1}^\infty na_nx^{n-1}=p\sum_{n=0}^\infty a_nx^n$$

After that im not able to proceed further

Since $$y=\sum_{n=0}^{\infty}a_nx^n$$ observe that $$y'=\sum_{n=0}^{\infty}na_nx^{n-1}=\sum_{n=1}^{\infty}na_nx^{n-1}=\sum_{n=0}^{\infty}(n+1)a_{n+1}x^{n}$$

therefore $$(1+x)y’=py$$ becomes $$(1+x)\sum_{n=0}^{\infty}(n+1)a_{n+1}x^{n}=p\sum_{n=0}^{\infty}a_nx^{n}$$ $$\sum_{n=0}^{\infty}(n+1)a_{n+1}x^{n}+\sum_{n=1}^{\infty}na_{n}x^{n}=p\sum_{n=0}^{\infty}a_nx^{n}$$ $$a_1+\sum_{n=1}^{\infty}\Big[(n+1)a_{n+1}+na_n\Big]x^{n}=p\sum_{n=0}^{\infty}a_nx^{n}$$ which gives $$a_1 =pa_0$$ $$(n+1)a_{n+1} + na_n =pa_n$$

It should be $$\sum_{n=1}^\infty na_n x^{n-1} +\sum_{n=1}^\infty na_n x^n =p\sum_{n=0}^\infty a_nx^n$$ so rewriting this yield $$a_1 + \sum_{n=1}^\infty[ (n+1)a_{n+1} + na_n]x^n =p\sum_{n=0}^\infty a_nx^n.$$ Pairing up the coefficients on both sides we obtain \begin{align*} a_1 &=p a_0 \\ (n+1)a_{n+1} + na_n &= pa_n \end{align*}

You do not need to change the index.

You have $$\sum_{n=0}^\infty na_nx^{n-1}+\sum_{n=0}^\infty na_nx^{n}=p\sum_{n=0}^\infty a_nx^{n}$$ So, for degree $$m$$ $$(m+1)\,a_{m+1}+m\, a_m=p\,a_m$$