# Solving differential equation with power series. $(x-1)y'' + y' = 0$

I'm a bit stuck on how to solve this:

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

so assuming y is a solution in this form:

$$\sum_{n=0}^\infty C_nx^n$$

$$\sum_{n=1}^\infty nC_nx^{n-1}$$

$$\sum_{n=2}^\infty n(n-1)C_nx^{n-2}$$

subbing in and distributing: $$\sum_{n=2}^\infty n(n-1)C_nx^{n-1} - \sum_{n=2}^\infty n(n-1)C_nx^{n-2} + \sum_{n=1}^\infty nC_nx^{n-1}$$

$$\sum_{n=2}^\infty n(n-1)C_nx^{n-1} - \sum_{n=2}^\infty n(n-1)C_nx^{n-2} + C_1 + \sum_{n=2}^\infty nC_nx^{n-1}$$

but I'm confused where to go from here... Any advice?

The strategy is always the same: group like terms and establish a recurrence relation for the coefficients $$C_n$$.

As you've remarked, if $$y = \sum_{n=0}^\infty C_nx^n$$, then $$y' = \sum^\infty_{n=1} nC_n x^{n-1}, \,\,\,\,\,\, \text{ and } \,\,\,\,\,\, y'' = \sum^\infty_{n=2} n(n-1) C_n x^{n-2}.$$ Inserting these into the desired equation gives $$\sum^{\infty}_{n=2} n(n-1)C_n x^{n-1} - \sum_{n=2}^\infty n(n-1)C_n x^{n-2} + \sum^\infty_{n=1}nC_nx^{n-1} = 0.$$ The first thing to do is to shift indices so that all the powers of $$x$$ align. Lets make it so that the powers of $$x$$ in the sums are $$x^{n-1}$$. To do so, we need to shift the index in the middle sum by $$1$$: $$\sum^{\infty}_{n=2} n(n-1)C_n x^{n-1} - \sum_{n=1}^\infty (n+1)nC_{n+1} x^{n-1} + \sum^\infty_{n=1}nC_nx^{n-1} = 0.$$ Now we should run a term off of the latter two sums so that all sums start at $$2$$: $$C_1 - 2C_2 + \sum^{\infty}_{n=2} n(n-1)C_n x^{n-1} - \sum_{n=2}^\infty (n+1)nC_{n+1} x^{n-1} + \sum^\infty_{n=2}nC_nx^{n-1} = 0.$$ Now we can combine the sums: \begin{align*}&C_1 - 2C_2 + \sum^{\infty}_{n=2} \bigg[n(n-1)C_n - (n+1)nC_{n+1} + nC_n \bigg]x^{n-1} = 0 \\ \implies \,\,\,\,\, &C_1 - 2C_2 + \sum^{\infty}_{n=2} \bigg[n^2C_n - (n+1)nC_{n+1}\bigg]x^{n-1} = 0.\end{align*} In order for this equality to be satisfied for all $$x \in \mathbb R$$, you need $$C_1 - 2C_2 = 0, \,\,\,\,\,\, \text{and} \,\,\,\,\,\, n^2 C_n - (n+1)nC_{n+1} = 0, \,\,\,\, n \ge 2.$$ Note, there is no condition on $$C_0$$, since the equation only depends on derivatives of $$y$$ so adding any constant will result in another solution (it is pointed out in another answer that you can set $$z=y'$$ and solve a first order equation for $$z$$ instead).

To solve this relation, consider for large $$n$$: $$C_{n+1} = \frac{n}{n+1} C_n = \frac{n}{n+1}\frac{n-1}{n}C_{n-1} = \cdots = \frac{n}{n+1} \frac{n-1}{n}\cdots\frac{1}{2} C_1 = \frac{1}{n+1} C_1.$$ Thus the full solution is $$y(x) = C_0 + C_1\sum_{n=1}^{\infty} \frac{x^n}{n}.$$

Likewise, if you were to simply integrate the equation after using $$z = y'$$, you would have $$\frac{z'}{z} = \frac{1}{1-x} \,\,\,\,\, \implies \,\,\,\,\, \log(z) = -\log(1-x)+C \,\,\, \implies \,\,\, \log(z(1-x)) = C$$ and so $$z = C/(1-x)$$ for come constant $$C$$. Integrating once more to get $$y$$, we have $$y = D + C\log(1-x).$$ And if we expand this in a Taylor series, we'll get precisely the same answer with $$D = C_0, C= -C_1$$. [The constant $$C$$ changed several times from line to line.]

• @InterstellarProbe Thanks, fixed! May 10, 2019 at 15:22
• I understand up to $c_{n+1} = \frac{nC_n}{n+1}$ but that's. Can't I write out terms and find a pattern and sub into the orignial y now? May 10, 2019 at 17:20
• I get how we arrive at $c_n = \frac{c_1}{n}$ but how did you get y from there? @User8128 Is it because the general term for c_n is only defined for n > 1? May 10, 2019 at 18:47
• Yeah, that's exactly right. There is no condition on $C_0$ at all, and so $C_0$ is an arbitrary constant. Indeed, plug any $C_0 \in \mathbb R$ in there, and you'll see that $y$ is a solution. May 10, 2019 at 22:13

Power series will work but what if you substitute $$z =y'(x)$$ and solve as a separable first order ODE