## [SOLVED] Series Solution of Differential Equation

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

Solve using series:

$xy'' + y' + xy = 0$, $\mbox { } x_0 = 1$
The standard approach for problems of this nature is to assume a solution of the form $y = \sum_{n = 0}^{ \infty} a_n (x - x_0)^n$

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

but there's a problem here, how would we multiply such a series by $x$? Sure we can just attach an $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 $(x - 1)$ as a variable unto itself, and rewrite $x$ in terms of this variable.

so we would realize that $x = (x - 1) + 1$, so, for instance, $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 $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.

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

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

Let $z = x - 1$

$\Rightarrow x = z + 1$

So our equation becomes:

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

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

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

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

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

Plugging these into the original equation, we get:

$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} +$ $z \sum_{n = 0}^{ \infty} a_n z^n + \sum_{n = 0}^{ \infty} a_n z^n = 0$

$\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} +$ $\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

$\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 +$ $\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

$\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 +$ $\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.

$\Rightarrow 2a_2 + a_1 + a_0 + \sum_{n = 1}^{ \infty} \left[ n(n + 1) a_{n + 1} + \right.$ $\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 $z$, hence we must have that all the coefficients are zero.

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

$\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$

$\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 $a_2$.

Thus, our coefficients are:

$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} }$ $\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 $a_0$ and $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, $y = \sum_{n = 0}^{ \infty} a_n z^n$, that is:

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

now fill in the coefficients

$\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 $a_0$'s and $a_1$'s and factor out the common $a_0$ and $a_1$, we get:

$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:

$y = a_0 \left( 1 - \frac {(x - 1)^2}{2} + \frac {(x - 1)^3}{6} - \frac {(x - 1)^4}{12} + ... \right) +$ $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 $a_0$ and $a_1$) are linearly independent homogeneous solutions to the differential equation

that is,

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

and

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

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