*i.e.*you are probably on a mobile phone). Due to the nature of the mathematics on this site it is best views in landscape mode. If your device is not in landscape mode many of the equations will run off the side of your device (should be able to scroll to see them) and some of the menu items will be cut off due to the narrow screen width.

### Section 6.3 : Series Solutions

Before we get into finding series solutions to differential equations we need to determine when we can find series solutions to differential equations. So, let’s start with the differential equation,

\[\begin{equation}p\left( x \right)y'' + q\left( x \right)y' + r\left( x \right)y = 0\label{eq:Eq1}\end{equation}\]This time we really do mean nonconstant coefficients. To this point we’ve only dealt with constant coefficients. However, with series solutions we can now have nonconstant coefficient differential equations. Also, in order to make the problems a little nicer we will be dealing only with polynomial coefficients.

Now, we say that \(x=x_{0}\) is an **ordinary point** if provided both

are analytic at \(x=x_{0}\). That is to say that these two quantities have Taylor series around \(x=x_{0}\). We are going to be only dealing with coefficients that are polynomials so this will be equivalent to saying that

\[p\left( {{x_0}} \right) \ne 0\]for most of the problems.

If a point is not an ordinary point we call it a **singular point**.

The basic idea to finding a series solution to a differential equation is to assume that we can write the solution as a power series in the form,

\[\begin{equation}y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{{\left( {x - {x_0}} \right)}^n}} \label{eq:eq2}\end{equation}\]and then try to determine what the \(a_{n}\)’s need to be. We will only be able to do this if the point \(x=x_{0}\), is an ordinary point. We will usually say that \(\eqref{eq:eq2}\) is a series solution around \(x=x_{0}\).

Let’s start with a very basic example of this. In fact, it will be so basic that we will have constant coefficients. This will allow us to check that we get the correct solution.

Notice that in this case \(p(x)=1\) and so every point is an ordinary point. We will be looking for a solution in the form,

\[y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{x^n}} \]We will need to plug this into our differential equation so we’ll need to find a couple of derivatives.

\[y'\left( x \right) = \sum\limits_{n = 1}^\infty {n{a_n}{x^{n - 1}}} \hspace{0.25in}y''\left( x \right) = \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} \]Recall from the power series review section on power series that we can start these at \(n=0\) if we need to, however it’s almost always best to start them where we have here. If it turns out that it would have been easier to start them at \(n=0\) we can easily fix that up when the time comes around.

So, plug these into our differential equation. Doing this gives,

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} + \sum\limits_{n = 0}^\infty {{a_n}{x^n}} = 0\]The next step is to combine everything into a single series. To do this requires that we get both series starting at the same point and that the exponent on the \(x\) be the same in both series.

We will always start this by getting the exponent on the \(x\) to be the same. It is usually best to get the exponent to be an \(n\). The second series already has the proper exponent and the first series will need to be shifted down by 2 in order to get the exponent up to an \(n\). If you don’t recall how to do this take a quick look at the first review section where we did several of these types of problems.

Shifting the first power series gives us,

\[\sum\limits_{n = 0}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{x^n}} + \sum\limits_{n = 0}^\infty {{a_n}{x^n}} = 0\]Notice that in the process of the shift we also got both series starting at the same place. This won’t always happen, but when it does we’ll take it. We can now add up the two series. This gives,

\[\sum\limits_{n = 0}^\infty {\left[ {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} + {a_n}} \right]{x^n}} = 0\]Now recalling the fact from the power series review section we know that if we have a power series that is zero for all \(x\) (as this is) then all the coefficients must have been zero to start with. This gives us the following,

\[\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} + {a_n} = 0,\hspace{0.25in}n = 0,1,2, \ldots \]This is called the **recurrence relation** and notice that we included the values of \(n\) for which it must be true. We will always want to include the values of \(n\) for which the recurrence relation is true since they won’t always start at \(n\) = 0 as it did in this case.

Now let’s recall what we were after in the first place. We wanted to find a series solution to the differential equation. In order to do this, we needed to determine the values of the \(a_{n}\)’s. We are almost to the point where we can do that. The recurrence relation has two different \(a_{n}\)’s in it so we can’t just solve this for \(a_{n}\) and get a formula that will work for all \(n\). We can however, use this to determine what all but two of the \(a_{n}\)’s are.

To do this we first solve the recurrence relation for the \(a_{n}\) that has the largest subscript. Doing this gives,

\[{a_{n + 2}} = - \frac{{{a_n}}}{{\left( {n + 2} \right)\left( {n + 1} \right)}}\hspace{0.25in}n = 0,1,2, \ldots \]Now, at this point we just need to start plugging in some value of \(n\) and see what happens,

\(n=0\) | \({a_2} = \frac{{ - {a_0}}}{{\left( 2 \right)\left( 1 \right)}}\) | \(n=1\) | \({a_3} = \frac{{ - {a_1}}}{{\left( 3 \right)\left( 2 \right)}}\) |

\(n=2\) | \(\begin{align*}{a_4} &= - \frac{{{a_2}}}{{\left( 4 \right)\left( 3 \right)}}\\ & = \frac{{{a_0}}}{{\left( 4 \right)\left( 3 \right)\left( 2 \right)\left( 1 \right)}}\end{align*}\) | \(n=3\) | \(\begin{align*}{a_5} &= - \frac{{{a_3}}}{{\left( 5 \right)\left( 4 \right)}}\\ & = \frac{{{a_1}}}{{\left( 5 \right)\left( 4 \right)\left( 3 \right)\left( 2 \right)}}\end{align*}\) |

\(n=4\) | \(\begin{align*}{a_6} & = - \frac{{{a_4}}}{{\left( 6 \right)\left( 5 \right)}}\\ & = \frac{{ - {a_0}}}{{\left( 6 \right)\left( 5 \right)\left( 4 \right)\left( 3 \right)\left( 2 \right)\left( 1 \right)}}\end{align*}\) | \(n=5\) | \(\begin{align*}{a_7} & = - \frac{{{a_5}}}{{\left( 7 \right)\left( 6 \right)}}\\ & = \frac{{ - {a_1}}}{{\left( 7 \right)\left( 6 \right)\left( 5 \right)\left( 4 \right)\left( 3 \right)\left( 2 \right)}}\end{align*}\) |

\(\vdots \) | \(\vdots \) | ||

\({a_{2k}} = \frac{{{{\left( { - 1} \right)}^k}{a_0}}}{{\left( {2k} \right)!}},\,\,\,k = 1,2, \ldots \) | \({a_{2k + 1}} = \frac{{{{\left( { - 1} \right)}^k}{a_1}}}{{\left( {2k + 1} \right)!}},\,\,\,k = 1,2, \ldots \) |

Notice that at each step we always plugged back in the previous answer so that when the subscript was even we could always write the \(a_{n}\) in terms of \(a_{0}\) and when the coefficient was odd we could always write the \(a_{n}\) in terms of \(a_{1}\). Also notice that, in this case, we were able to find a general formula for \(a_{n}\)’s with even coefficients and \(a_{n}\)’s with odd coefficients. This won’t always be possible to do.

There’s one more thing to notice here. The formulas that we developed were only for \(k=1,2,\ldots\) however, in this case again, they will also work for \(k=0\). Again, this is something that won’t always work, but does here.

Do not get excited about the fact that we don’t know what \(a_{0}\) and \(a_{1}\) are. As you will see, we actually need these to be in the problem to get the correct solution.

Now that we’ve got formulas for the \(a_{n}\)’s let’s get a solution. The first thing that we’ll do is write out the solution with a couple of the \(a_{n}\)’s plugged in.

\[\begin{align*}y\left( x \right) & = \sum\limits_{n = 0}^\infty {{a_n}{x^n}} \\ & = {a_0} + {a_1}x + {a_2}{x^2} + {a_3}{x^3} + \cdots + {a_{2k}}{x^{2k}} + {a_{2k + 1}}{x^{2k + 1}} + \cdots \\ & = {a_0} + {a_1}x - \frac{{{a_0}}}{{2!}}{x^2} - \frac{{{a_1}}}{{3!}}{x^3} + \cdots + \frac{{{{\left( { - 1} \right)}^k}{a_0}}}{{\left( {2k} \right)!}}{x^{2k}} + \frac{{{{\left( { - 1} \right)}^k}{a_1}}}{{\left( {2k + 1} \right)!}}{x^{2k + 1}} + \cdots \end{align*}\]The next step is to collect all the terms with the same coefficient in them and then factor out that coefficient.

\[\begin{align*}y\left( x \right) & = {a_0}\left\{ {1 - \frac{{{x^2}}}{{2!}} \cdots + \frac{{{{\left( { - 1} \right)}^k}{x^{2k}}}}{{\left( {2k} \right)!}} + \cdots } \right\} + {a_1}\left\{ {x - \frac{{{x^3}}}{{3!}} + \cdots + \frac{{{{\left( { - 1} \right)}^k}}}{{\left( {2k + 1} \right)!}}{x^{2k + 1}} + \cdots } \right\}\\ & = {a_0}\sum\limits_{k = 0}^\infty {\frac{{{{\left( { - 1} \right)}^k}{x^{2k}}}}{{\left( {2k} \right)!}}} + {a_1}\sum\limits_{k = 0}^\infty {\frac{{{{\left( { - 1} \right)}^k}{x^{2k + 1}}}}{{\left( {2k + 1} \right)!}}} \end{align*}\]In the last step we also used the fact that we knew what the general formula was to write both portions as a power series. This is also our solution. We are done.

Before working another problem let’s take a look at the solution to the previous example. First, we started out by saying that we wanted a series solution of the form,

\[y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{x^n}} \]and we didn’t get that. We got a solution that contained two different power series. Also, each of the solutions had an unknown constant in them. This is not a problem. In fact, it’s what we want to have happen. From our work with second order constant coefficient differential equations we know that the solution to the differential equation in the last example is,

\[y\left( x \right) = {c_1}\cos \left( x \right) + {c_2}\sin \left( x \right)\]Solutions to second order differential equations consist of two separate functions each with an unknown constant in front of them that are found by applying any initial conditions. So, the form of our solution in the last example is exactly what we want to get. Also recall that the following Taylor series,

\[\cos \left( x \right) = \sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n}}}}{{\left( {2n} \right)!}}} \hspace{0.25in}\sin \left( x \right) = \sum\limits_{n = 0}^\infty {\frac{{{{\left( { - 1} \right)}^n}{x^{2n + 1}}}}{{\left( {2n + 1} \right)!}}} \]Recalling these we very quickly see that what we got from the series solution method was exactly the solution we got from first principles, with the exception that the functions were the Taylor series for the actual functions instead of the actual functions themselves.

Now let’s work an example with nonconstant coefficients since that is where series solutions are most useful.

As with the first example \(p(x)=1\) and so again for this differential equation every point is an ordinary point. Now we’ll start this one out just as we did the first example. Let’s write down the form of the solution and get its derivatives.

\[y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{x^n}} \hspace{0.25in}y'\left( x \right) = \sum\limits_{n = 1}^\infty {n{a_n}{x^{n - 1}}} \hspace{0.25in}y''\left( x \right) = \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} \]Plugging into the differential equation gives,

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} - x\sum\limits_{n = 0}^\infty {{a_n}{x^n}} = 0\]Unlike the first example we first need to get all the coefficients moved into the series.

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} - \sum\limits_{n = 0}^\infty {{a_n}{x^{n + 1}}} = 0\]Now we will need to shift the first series down by 2 and the second series up by 1 to get both of the series in terms of \(x^{n}n\).

\[\sum\limits_{n = 0}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{x^n}} - \sum\limits_{n = 1}^\infty {{a_{n - 1}}{x^n}} = 0\]Next, we need to get the two series starting at the same value of \(n\). The only way to do that for this problem is to strip out the \(n=0\) term.

\[\begin{align*}\left( 2 \right)\left( 1 \right){a_2}{x^0} + \sum\limits_{n = 1}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{x^n}} - \sum\limits_{n = 1}^\infty {{a_{n - 1}}{x^n}} & = 0\\ 2{a_2} + \sum\limits_{n = 1}^\infty {\left[ {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} - {a_{n - 1}}} \right]{x^n}} & = 0\end{align*}\]We now need to set all the coefficients equal to zero. We will need to be careful with this however. The \(n=0\) coefficient is in front of the series and the \(n=1,2,3,\dots\) are all in the series. So, setting coefficient equal to zero gives,

\[\begin{align*} & n = 0 & 2{a_2} & = 0\\ & n = 1,2,3, \ldots & \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} - {a_{n - 1}} & = 0\end{align*}\]Solving the first as well as the recurrence relation gives,

\[\begin{align*} & n = 0 & {a_2} & = 0\\ & n = 1,2,3, \ldots & {a_{n + 2}} & = \frac{{{a_{n - 1}}}}{{\left( {n + 2} \right)\left( {n + 1} \right)}}\end{align*}\]Now we need to start plugging in values of \(n\).

\(\displaystyle {a_3} = \frac{{{a_0}}}{{\left( 3 \right)\left( 2 \right)}}\) | \(\displaystyle {a_4} = \frac{{{a_1}}}{{\left( 4 \right)\left( 3 \right)}}\) | \(\displaystyle {a_5} = \frac{{{a_2}}}{{\left( 5 \right)\left( 4 \right)}} = 0\) |

\(\begin{align*}{a_6} &= \frac{{{a_3}}}{{\left( 6 \right)\left( 5 \right)}}\\ & = \frac{{{a_0}}}{{\left( 6 \right)\left( 5 \right)\left( 3 \right)\left( 2 \right)}}\end{align*}\) | \(\begin{align*}{a_7} & = \frac{{{a_4}}}{{\left( 7 \right)\left( 6 \right)}}\\ & = \frac{{{a_1}}}{{\left( 7 \right)\left( 6 \right)\left( 4 \right)\left( 3 \right)}}\end{align*}\) | \(\displaystyle {a_8} = \frac{{{a_5}}}{{\left( 8 \right)\left( 7 \right)}} = 0\) |

\( \vdots \) | \( \vdots \) | \( \vdots \) |

\(\begin{align*}{a_{3k}} & = \frac{{{a_0}}}{{\left( 2 \right)\left( 3 \right)\left( 5 \right)\left( 6 \right) \cdots \left( {3k - 1} \right)\left( {3k} \right)}}\\ k & = 1,2,3, \ldots \end{align*}\) | \(\begin{align*}{a_{3k + 1}} & = \frac{{{a_1}}}{{\left( 3 \right)\left( 4 \right)\left( 6 \right)\left( 7 \right) \cdots \left( {3k} \right)\left( {3k + 1} \right)}}\\ k & = 1,2,3, \ldots \end{align*}\) | \(\begin{align*}{a_{3k + 2}} & = 0\\ k & = 0,1,2, \ldots \end{align*}\) |

There are a couple of things to note about these coefficients. First, every third coefficient is zero. Next, the formulas here are somewhat unpleasant and not all that easy to see the first time around. Finally, these formulas will not work for \(k=0\) unlike the first example.

Now, get the solution,

\[\begin{align*}y\left( x \right) & = {a_0} + {a_1}x + {a_2}{x^2} + {a_3}{x^3} + {a_4}{x^4} + \cdots + {a_{3k}}{x^{3k}} + {a_{3k + 1}}{x^{3k + 1}} + \cdots \\ & = {a_0} + {a_1}x + \frac{{{a_0}}}{6}{x^3} + \frac{{{a_1}}}{{12}}{x^4} \cdots + \frac{{{a_0}{x^{3k}}}}{{\left( 2 \right)\left( 3 \right)\left( 5 \right)\left( 6 \right) \cdots \left( {3k - 1} \right)\left( {3k} \right)}} + \\ & \hspace{3.25in}\frac{{{a_1}{x^{3k + 1}}}}{{\left( 3 \right)\left( 4 \right)\left( 6 \right)\left( 7 \right) \cdots \left( {3k} \right)\left( {3k + 1} \right)}} + \cdots \end{align*}\]Again, collect up the terms that contain the same coefficient, factor the coefficient out and write the results as a new series,

\[y\left( x \right) = {a_0}\left\{ {1 + \sum\limits_{k = 1}^\infty {\frac{{{x^{3k}}}}{{\left( 2 \right)\left( 3 \right)\left( 5 \right)\left( 6 \right) \cdots \left( {3k - 1} \right)\left( {3k} \right)}}} } \right\} + {a_1}\left\{ {x + \sum\limits_{k = 1}^\infty {\frac{{{x^{3k + 1}}}}{{\left( 3 \right)\left( 4 \right)\left( 6 \right)\left( 7 \right) \cdots \left( {3k} \right)\left( {3k + 1} \right)}}} } \right\}\]We couldn’t start our series at \(k=0\) this time since the general term doesn’t hold for \(k=0\).

Now, we need to work an example in which we use a point other that \(x=0\). In fact, let’s just take the previous example and rework it for a different value of \(x_{0}\). We’re also going to need to change up the instructions a little for this example.

Unfortunately for us there is nothing from the first example that can be reused here. Changing to \({x_0} = - 2\) completely changes the problem. In this case our solution will be,

\[y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} \]The derivatives of the solution are,

\[y'\left( x \right) = \sum\limits_{n = 1}^\infty {n{a_n}{{\left( {x + 2} \right)}^{n - 1}}} \hspace{0.25in}y''\left( x \right) = \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{{\left( {x + 2} \right)}^{n - 2}}} \]Plug these into the differential equation.

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{{\left( {x + 2} \right)}^{n - 2}}} - x\sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} = 0\]We now run into our first real difference between this example and the previous example. In this case we can’t just multiply the \(x\) into the second series since in order to combine with the series it must be \(x+2\). Therefore, we will first need to modify the coefficient of the second series before multiplying it into the series.

\[\begin{align*}\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{{\left( {x + 2} \right)}^{n - 2}}} - \left( {x + 2 - 2} \right)\sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} & = 0\\ \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{{\left( {x + 2} \right)}^{n - 2}}} - \left( {x + 2} \right)\sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} + 2\sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} & = 0\\ \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{{\left( {x + 2} \right)}^{n - 2}}} - \sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^{n + 1}}} + \sum\limits_{n = 0}^\infty {2{a_n}{{\left( {x + 2} \right)}^n}} & = 0\end{align*}\]We now have three series to work with. This will often occur in these kinds of problems. Now we will need to shift the first series down by 2 and the second series up by 1 the get common exponents in all the series.

\[\sum\limits_{n = 0}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{{\left( {x + 2} \right)}^n}} - \sum\limits_{n = 1}^\infty {{a_{n - 1}}{{\left( {x + 2} \right)}^n}} + \sum\limits_{n = 0}^\infty {2{a_n}{{\left( {x + 2} \right)}^n}} = 0\]In order to combine the series we will need to strip out the \(n=0\) terms from both the first and third series.

\[\begin{align*}2{a_2} + 2{a_0} + \sum\limits_{n = 1}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{{\left( {x + 2} \right)}^n}} - \sum\limits_{n = 1}^\infty {{a_{n - 1}}{{\left( {x + 2} \right)}^n}} + \sum\limits_{n = 1}^\infty {2{a_n}{{\left( {x + 2} \right)}^n}} & = 0\\ 2{a_2} + 2{a_0} + \sum\limits_{n = 1}^\infty {\left[ {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} - {a_{n - 1}} + 2{a_n}} \right]{{\left( {x + 2} \right)}^n}} & = 0\end{align*}\]Setting coefficients equal to zero gives,

\[\begin{align*} & n = 0 & 2{a_2} + 2{a_0} & = 0\\ & n = 1,2,3, \ldots & \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} - {a_{n - 1}} + 2{a_n} & = 0\end{align*}\]We now need to solve both of these. In the first case there are two options, we can solve for \(a_{2}\) or we can solve for \(a_{0}\). Out of habit I’ll solve for \(a_{0}\). In the recurrence relation we’ll solve for the term with the largest subscript as in previous examples.

\[\begin{align*} & n = 0 & {a_2} & = - {a_0}\\ & n = 1,2,3, \ldots & {a_{n + 2}} & = \frac{{{a_{n - 1}} - 2{a_n}}}{{\left( {n + 2} \right)\left( {n + 1} \right)}}\end{align*}\]Notice that in this example we won’t be having every third term drop out as we did in the previous example.

At this point we’ll also acknowledge that the instructions for this problem are different as well. We aren’t going to get a general formula for the \(a_{n}\)’s this time so we’ll have to be satisfied with just getting the first couple of terms for each portion of the solution. This is often the case for series solutions. Getting general formulas for the \(a_{n}\)’s is the exception rather than the rule in these kinds of problems.

To get the first four terms we’ll just start plugging in terms until we’ve got the required number of terms. Note that we will already be starting with an \(a_{0}\) and an \(a_{1}\) from the first two terms of the solution so all we will need are three more terms with an \(a_{0}\) in them and three more terms with an \(a_{1}\) in them.

\[n = 0\hspace{0.25in}{a_2} = - {a_0}\]We’ve got two \(a_{0}\)’s and one \(a_{1}\).

\[n = 1\hspace{0.25in}{a_3} = \frac{{{a_0} - 2{a_1}}}{{\left( 3 \right)\left( 2 \right)}} = \frac{{{a_0}}}{6} - \frac{{{a_1}}}{3}\]We’ve got three \(a_{0}\)’s and two \(a_{1}\)’s.

\[n = 2\hspace{0.25in}{a_4} = \frac{{{a_1} - 2{a_2}}}{{\left( 4 \right)\left( 3 \right)}} = \frac{{{a_1} - 2\left( { - {a_0}} \right)}}{{\left( 4 \right)\left( 3 \right)}} = \frac{{{a_0}}}{6} + \frac{{{a_1}}}{{12}}\]We’ve got four \(a_{0}\)’s and three \(a_{1}\)’s. We’ve got all the \(a_{0}\)’s that we need, but we still need one more \(a_{1}\). So, we’ll need to do one more term it looks like.

\[n = 3\hspace{0.25in}{a_5} = \frac{{{a_2} - 2{a_3}}}{{\left( 5 \right)\left( 4 \right)}} = - \frac{{{a_0}}}{{20}} - \frac{1}{{10}}\left( {\frac{{{a_0}}}{6} - \frac{{{a_1}}}{3}} \right) = - \frac{{{a_0}}}{{15}} + \frac{{{a_1}}}{{30}}\]We’ve got five \(a_{0}\)’s and four \(a_{1}\)’s. We’ve got all the terms that we need.

Now, all that we need to do is plug into our solution.

\[\begin{align*}y\left( x \right) & = \sum\limits_{n = 0}^\infty {{a_n}{{\left( {x + 2} \right)}^n}} \\ & = {a_0} + {a_1}\left( {x + 2} \right) + {a_2}{\left( {x + 2} \right)^2} + {a_3}{\left( {x + 2} \right)^3} + {a_4}{\left( {x + 2} \right)^4} + {a_5}{\left( {x + 2} \right)^5} + \cdots \\ & = {a_0} + {a_1}\left( {x + 2} \right) - {a_0}{\left( {x + 2} \right)^2} + \left( {\frac{{{a_0}}}{6} - \frac{{{a_1}}}{3}} \right){\left( {x + 2} \right)^3} + \\ & \hspace{0.25in}\left( {\frac{{{a_0}}}{6} + \frac{{{a_1}}}{{12}}} \right){\left( {x + 2} \right)^4} + \left( { - \frac{{{a_0}}}{{15}} + \frac{{{a_1}}}{{30}}} \right){\left( {x + 2} \right)^5} + \cdots \end{align*}\]Finally collect all the terms up with the same coefficient and factor out the coefficient to get,

\[\begin{align*}y\left( x \right) & = {a_0}\left\{ {1 - {{\left( {x + 2} \right)}^2} + \frac{1}{6}{{\left( {x + 2} \right)}^3} + \frac{1}{6}{{\left( {x + 2} \right)}^4} - \frac{1}{{15}}{{\left( {x + 2} \right)}^5} + \cdots } \right\} + \\ & \,\,\,{a_1}\left\{ {\left( {x + 2} \right) - \frac{1}{3}{{\left( {x + 2} \right)}^3} + \frac{1}{{12}}{{\left( {x + 2} \right)}^4} + \frac{1}{{30}}{{\left( {x + 2} \right)}^5} + \cdots } \right\}\end{align*}\]That’s the solution for this problem as far as we’re concerned. Notice that this solution looks nothing like the solution to the previous example. It’s the same differential equation but changing \(x_{0}\) completely changed the solution.

Let’s work one final problem.

We finally have a differential equation that doesn’t have a constant coefficient for the second derivative.

\[p\left( x \right) = {x^2} + 1\hspace{0.25in}p\left( 0 \right) = 1 \ne 0\]So \({x_0} = 0\) is an ordinary point for this differential equation. We first need the solution and its derivatives,

\[y\left( x \right) = \sum\limits_{n = 0}^\infty {{a_n}{x^n}} \hspace{0.25in}y'\left( x \right) = \sum\limits_{n = 1}^\infty {n{a_n}{x^{n - 1}}} \hspace{0.25in}y''\left( x \right) = \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} \]Plug these into the differential equation.

\[\left( {{x^2} + 1} \right)\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} - 4x\sum\limits_{n = 1}^\infty {n{a_n}{x^{n - 1}}} + 6\sum\limits_{n = 0}^\infty {{a_n}{x^n}} = 0\]Now, break up the first term into two so we can multiply the coefficient into the series and multiply the coefficients of the second and third series in as well.

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^n}} + \sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^{n - 2}}} - \sum\limits_{n = 1}^\infty {4n{a_n}{x^n}} + \sum\limits_{n = 0}^\infty {6{a_n}{x^n}} = 0\]We will only need to shift the second series down by two to get all the exponents the same in all the series.

\[\sum\limits_{n = 2}^\infty {n\left( {n - 1} \right){a_n}{x^n}} + \sum\limits_{n = 0}^\infty {\left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}{x^n}} - \sum\limits_{n = 1}^\infty {4n{a_n}{x^n}} + \sum\limits_{n = 0}^\infty {6{a_n}{x^n}} = 0\]At this point we could strip out some terms to get all the series starting at \(n=2\), but that’s actually more work than is needed. Let’s instead note that we could start the third series at \(n=0\) if we wanted to because that term is just zero. Likewise, the terms in the first series are zero for both \(n=1\) and \(n=0\) and so we could start that series at \(n=0\). If we do this all the series will now start at \(n=0\) and we can add them up without stripping terms out of any series.

\[\begin{align*}\sum\limits_{n = 0}^\infty {\left[ {n\left( {n - 1} \right){a_n} + \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} - 4n{a_n} + 6{a_n}} \right]{x^n}} & = 0\\ \sum\limits_{n = 0}^\infty {\left[ {\left( {{n^2} - 5n + 6} \right){a_n} + \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}} \right]{x^n}} & = 0\\ \sum\limits_{n = 0}^\infty {\left[ {\left( {n - 2} \right)\left( {n - 3} \right){a_n} + \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}}} \right]{x^n}} & = 0\end{align*}\]Now set coefficients equal to zero.

\[\left( {n - 2} \right)\left( {n - 3} \right){a_n} + \left( {n + 2} \right)\left( {n + 1} \right){a_{n + 2}} = 0,\hspace{0.25in}n = 0,1,2, \ldots \]Solving this gives,

\[{a_{n + 2}} = - \frac{{\left( {n - 2} \right)\left( {n - 3} \right){a_n}}}{{\left( {n + 2} \right)\left( {n + 1} \right)}},\hspace{0.25in}n = 0,1,2, \ldots \]Now, we plug in values of \(n\).

\[n = 0:\hspace{0.25in}{a_2} = - 3{a_0}\] \[n = 1:\hspace{0.25in}{a_3} = - \frac{1}{3}{a_1}\] \[n = 2:\hspace{0.25in}{a_4} = - \frac{0}{{12}}{a_2} = 0\] \[n = 3:\hspace{0.25in}{a_5} = - \frac{0}{{20}}{a_3} = 0\]Now, from this point on all the coefficients are zero. In this case both of the series in the solution will terminate. This won’t always happen, and often only one of them will terminate.

The solution in this case is,

\[y\left( x \right) = {a_0}\left\{ {1 - 3{x^2}} \right\} + {a_1}\left\{ {x - \frac{1}{3}{x^3}} \right\}\]