# Power series in a differential equation

I have a differential equation that I'm having trouble wrapping my head around.

Use a power series to solve $$(1-x)y'(x) + y(x) = 0$$

with the initial condition that $$y(\frac{1}{2}) = 17.$$

I've tried setting up the power series as $$\sum_{k=0}^\infty a_k x^k$$ and differentiating from there, but I'm not managing to land anywhere useful. Some pointers as to where to go from here would be appreciated.

• Hint: Most of your terms will end up vanishing, there is no recurrence relation. – Ninad Munshi May 15 '20 at 14:41

$$y=\sum_{k\ge0}a_kz^k\implies y'=\sum_{k\ge0}(k+1)a_{k+1}z^k$$

where $$z=x-\frac12$$. This is so we can make use of the given initial value; if $$x=\frac12$$, then all but the constant terms in the series vanish, so $$y\left(\frac12\right)=a_0=17$$. The ODE becomes

$$\left(\frac12-z\right)y'+y=0$$

Plug in the series:

\begin{align*} 0&=\left(\frac12-z\right)y'+y\\[1ex] &=\frac12\sum_{k\ge0}(k+1)a_{k+1}z^k-\sum_{k\ge0}(k+1)a_{k+1}z^{k+1}+\sum_{k\ge0}a_kz^k\\[1ex] &=\frac12\left(a_1+\sum_{k\ge1}(k+1)a_{k+1}z^k\right)-\sum_{k\ge1}ka_kz^k+\left(a_0+\sum_{k\ge1}a_kz^k\right)\\[1ex] &=\frac{a_1}2+a_0+\sum_{k\ge1}\left(\frac12(k+1)a_{k+1}-(k-1)a_k\right)z^k \end{align*}

It follows that

$$\frac{a_1}2+a_0=0\implies a_1=-34$$

The remaining coefficients are governed by the recurrence relation,

$$\frac12(k+1)a_{k+1}-(k-1)a_k=0\implies a_{k+1}=\frac{2(k-1)}{k+1}a_k$$

Notice that when $$k=1$$, we have $$a_2=0$$, and this forces $$a_n=0$$ for all $$n\ge2$$.

Hence

$$y(z)=17-34z\iff y(x)=34-34x$$

• Thank you! One minor question. I'm having a bit of trouble parsing the last step of the plug-in (before "It follows that...") I see that you're taking the first element out of the 3/2 series, but the others aren't connecting for me right now. Would you mind explaining that step a bit further? Thanks again! – DealerUmbra May 15 '20 at 16:10
• I've added a step to clarify what happened. It's just a matter of adjusting the starting index of each series so that we can condense all three into one. (Incidentally, I seemed to have dropped a factor of $\frac32$, which I'll fix now.) – user170231 May 15 '20 at 16:24
• I see, thank you! How about that x^k on the same line? Is that meant to be z^k, or do you already swap back to x here? Also, just to make sure I understand: How does it follow that the first two terms are equal to zero? – DealerUmbra May 15 '20 at 16:45
• Yes, that's a typo. All coefficients are equal to $0$ because the left hand side is $0$. We're essentially equating two polynomials, which are equal if the coefficients of same-degree terms are equal. – user170231 May 15 '20 at 16:51
• One more typo; with $z=x-\frac12$, we should have $1-x=\frac12-\left(x-\frac12\right)=\frac12-z$. I've corrected this, too. – user170231 May 15 '20 at 16:58