Someone asked me to do this question and post it here. For those interested, it is taken from "Elementary Differential Equations and Boundary Value Problems," 8th Edition. By Boyce. Section 5.2 (Page 259), problem 8

The standard approach for problems of this nature is to assume a solution of the form $\displaystyle y = \sum_{n = 0}^{ \infty} a_n (x - x_0)^n$Solve using series:

$\displaystyle xy'' + y' + xy = 0$, $\displaystyle \mbox { } x_0 = 1$

so here we would assume $\displaystyle y = \sum_{n = 0}^{ \infty} a_n (x - 1)^n$

but there's a problem here, how would we multiply such a series by $\displaystyle x$? Sure we can just attach an $\displaystyle x$ to the formula, but that's not very convenient. The way I was taught, and have always dealt with it is that we can treat $\displaystyle (x - 1)$ as a variable unto itself, and rewrite $\displaystyle x$ in terms of this variable.

so we would realize that $\displaystyle x = (x - 1) + 1$, so, for instance, $\displaystyle xy = [(x - 1) + 1]y = (x - 1)y + y$

now we can multiply the series representation of y with (x - 1) no problem, we just bump up the power by 1 and done. However, in my experience, students have problems coming to grips with this method. In my experience as a tutor, I find that the following method, which really is the same thing in disguise, is much more well-received.

since the (x - 1) is causing problems, make a substitution and replace it with a variable, say $\displaystyle z$. then we can rewrite x in terms of this z, and continue with that, and we would work in the single variable z, as opposed to the nasty variable (x - 1), and just replace the z with (x - 1) at the very end. Let's see how this works out. Go grab a snack, and come back and get comfortable, these problems take forever and are very intricate, it's easy to get lost or wonder off mentally or just get tired of it all together.

Here goes.

$\displaystyle xy'' + y' + xy = 0$ for $\displaystyle x_0 = 1$

Thus we can assume a solution of the form, $\displaystyle y = \sum_{n = 0}^{ \infty} a_n (x - 1)^n$

Let $\displaystyle z = x - 1$

$\displaystyle \Rightarrow x = z + 1$

So our equation becomes:

$\displaystyle (z + 1)y'' + y' + (z + 1)y = 0$

$\displaystyle \Longleftrightarrow zy'' + y'' + y' + zy + y = 0$

with a particular solution of the form, $\displaystyle \sum_{n = 0}^{ \infty} a_n z^n$

$\displaystyle \Rightarrow y' = \sum_{n = 1}^{ \infty} n a_n z^{n - 1}$

$\displaystyle \Rightarrow y'' = \sum_{n = 2}^{ \infty} n(n - 1) a_n z^{n - 2}$

Plugging these into the original equation, we get:

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

$\displaystyle \Rightarrow \sum_{n = 2}^{ \infty} n(n - 1) a_n z^{n - 1} + \sum_{n = 2}^{ \infty} n(n - 1) a_n z^{n - 2} + \sum_{n = 1}^{ \infty} n a_n z^{n - 1} +$ $\displaystyle \sum_{n = 0}^{ \infty} a_n z^{n + 1} + \sum_{n = 0}^{ \infty} a_n z^n = 0$

Now we get all the powers the same, we want the all powers to be n

$\displaystyle \Rightarrow \sum_{n = 1}^{ \infty} n(n + 1) a_{n + 1} z^n + \sum_{n = 0}^{ \infty} (n + 1)(n + 2) a_{n + 2} z^n + \sum_{n = 0}^{ \infty} (n + 1) a_{n + 1} z^n +$ $\displaystyle \sum_{n = 1}^{ \infty} a_{n - 1} z^n + \sum_{n = 0}^{ \infty} a_n z^n = 0$

Now we want to get all the indexes, that is, starting points for the series the same. the only way to do that here is to evaluate the first term of the series that start at n = 0 a write the remainder of the series as the summation from n = 1 onward, so we get all the indexes to 1

$\displaystyle \Rightarrow 2a_2 + a_1 + a_0 + \sum_{n = 1}^{ \infty} n(n + 1) a_{n + 1} z^n + \sum_{n = 1}^{ \infty} (n + 1)(n + 2) a_{n + 2} z^n + \sum_{n = 1}^{ \infty} (n + 1) a_{n + 1} z^n +$ $\displaystyle \sum_{n = 1}^{ \infty} a_{n - 1} z^n + \sum_{n = 1}^{ \infty} a_n z^n = 0$

Now combine all the series into one.

$\displaystyle \Rightarrow 2a_2 + a_1 + a_0 + \sum_{n = 1}^{ \infty} \left[ n(n + 1) a_{n + 1} + \right.$ $\displaystyle \left. (n + 1)(n + 2) a_{n + 2} + (n + 1) a_{n + 1} + a_{n - 1} + a_n \right] z^n = 0$

Now we want this expression to be zero independent of the value of $\displaystyle z$, hence we must have that all the coefficients are zero.

$\displaystyle \Rightarrow 2a_2 + a_1 + a_0 = 0 \implies a_2 = - \frac {a_0}{2} - \frac {a_1}{2}$

$\displaystyle \Rightarrow n(n + 1) a_{n + 1} + (n + 1)(n + 2) a_{n + 2} + (n + 1) a_{n + 1} + a_{n - 1} + a_n = 0$

$\displaystyle \implies \boxed { a_{n + 2} = \frac {-(n + 1)^2 a_{n + 1} - a_{n - 1} - a_n}{(n + 1)(n + 2)} }$

the boxed expression above is our recursive formula, we will use it to get all the coefficients above $\displaystyle a_2$.

Thus, our coefficients are:

$\displaystyle a_0 \mbox { , } a_1 \mbox { , } a_2 = \boxed { - \frac {a_0}{2} - \frac {a_1}{2}} \mbox { , } a_3 = \boxed { \frac {a_0}{6} + \frac {a_1}{6} }$ $\displaystyle \mbox {, } a_4 = - \frac {a_0}{12} - \frac {a_1}{6} \mbox {, ...}$

we'll stop there, those calculations were getting to me. Note that all coefficients are written in terms of $\displaystyle a_0$ and $\displaystyle a_1$, we had to back substitute to get the coefficients in that form.

Now that we have our coefficients, we can reveal our solution and simplify things a bit.

Remember, we assumed our solution is of the form, $\displaystyle y = \sum_{n = 0}^{ \infty} a_n z^n$, that is:

$\displaystyle y = a_0 + a_1 z + a_2 z^2 + a_3 z^3 + a_4 z^4 + ...$

now fill in the coefficients

$\displaystyle \Rightarrow y = a_0 + a_1 z - \frac {a_0 z^2}{2} - \frac {a_1 z^2}{2} + \frac {a_0 z^3}{6} + \frac {a_1 z^3}{6} - \frac {a_0 z^4}{12} - \frac {a_1 z^4}{6} + ...$

Now separate the $\displaystyle a_0$'s and $\displaystyle a_1$'s and factor out the common $\displaystyle a_0$ and $\displaystyle a_1$, we get:

$\displaystyle y = a_0 \left( 1 - \frac {z^2}{2} + \frac {z^3}{6} - \frac {z^4}{12} + ... \right) + a_1 \left( z - \frac {z^2}{2} + \frac {z^3}{6} - \frac {z^4}{6} + ... \right)$

Now remember, at the beginning we replaced x - 1 with z, so we have to be good little boys and girls and put the x - 1 back where we found it. Thus we get:

$\displaystyle y = a_0 \left( 1 - \frac {(x - 1)^2}{2} + \frac {(x - 1)^3}{6} - \frac {(x - 1)^4}{12} + ... \right) + $ $\displaystyle a_1 \left( (x - 1) - \frac {(x - 1)^2}{2} + \frac {(x - 1)^3}{6} - \frac {(x - 1)^4}{6} + ... \right)$

Thus we have the solution to our differential equation through the sum of these two series, note that each series (apart from the arbitrary constants $\displaystyle a_0$ and $\displaystyle a_1$) are linearly independent homogeneous solutions to the differential equation

that is,

$\displaystyle y_1 = 1 - \frac {(x - 1)^2}{2} + \frac {(x - 1)^3}{6} - \frac {(x - 1)^4}{12} + ... $

and

$\displaystyle y_2 = (x - 1) - \frac {(x - 1)^2}{2} + \frac {(x - 1)^3}{6} - \frac {(x - 1)^4}{6} + ... $

where $\displaystyle y_1$ and $\displaystyle y_2$ are linearly independent homogeneous solutions