Series Solutions of Second Order Linear Differential Equations (example)

Find the series solution to the following initial value problem. Find the recurrence relation and compute terms up to x^4

$$xy'' + y' + xy = 0 $$

$$\qquad \qquad where:\;y(1)=2 \;, y'(1)=-3 $$

$$\qquad \qquad which \; means:\;a(0)=2 \;, a(1)=-3 $$

Since our initial conditions are taken at x=1 will use the following substitution that involves the assumption that the solution to our differential equation is a power series:

$$y(x) = \sum_{n=0}^{\infty} a_n (x-x_0)^n $$

Which converges for:

$$x_0 = 1 $$

...and gives us a solution to our differential equation which has the form of:

$$y(x) = \sum_{n=0}^{\infty} a_n (x-1)^n \qquad(series \; substitution)$$

...and taking the first and second derivative of the above gives us:

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

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

Pluggin the above substitutions into our original equation gives us:

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

Next we will address the two x terms outside of the two summation notations. We want to conver them to something in the form of (x-1) which we can then distribute across the terms inside the summation notation. Note that we can rewrite the x terms as:

$$x = (x-1)+1 $$

...and we proceed to rewrite our expression as:

$$[(x-1)+1]\sum_{n=2}^{\infty} a_n n (n-1)(x-1)^{n-2} + \sum_{n=1}^{\infty} a_n n (x-1)^{n-1}$$

$$ + [(x-1)+1]\sum_{n=0}^{\infty} a_n (x-1)^n = 0 $$

...and if we distribute the (x-1) and the (1) through the two sums, we get:

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

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

Next we want to rewrite our expression as sums whose generic terms are x^k. We will do this by using a substitution method similar to the one explained in the previous page of this section.

Rewriting the first series:

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

...our substitution will consist of:

$$k = n-1 $$

$$n = k+1 $$

...which allows us to rewrite the first series as:

$$\sum_{k=1}^{\infty} a_{k+1} (k+1) k (x-1)^k \qquad(1) $$

Rewriting the second series:

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

...our substitution will consist of:

$$k = n-2 $$

$$n = k+2 $$

...which allows us to rewrite the second series as:

$$\sum_{k=0}^{\infty} a_{k+2} (k+2) (k+1) (x-1)^k \qquad(2) $$

Rewriting the third series:

$$\sum_{n=1}^{\infty} a_n n (x-1)^{n-1} $$

...our substitution will consist of:

$$k = n-1 $$

$$n = k+1 $$

...which allows us to rewrite the third series as:

$$\sum_{k=0}^{\infty} a_{k+1} (k+1) (x-1)^k \qquad(3) $$

Rewriting the fourth series:

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

...our substitution will consist of:

$$k = n+1 $$

$$n = k-1 $$

...which allows us to rewrite the fourth series as:

$$\sum_{k=1}^{\infty} a_{k-1} (x-1)^k \qquad(4) $$

Rewriting the fifth series:

$$\sum_{n=0}^{\infty} a_n (x-1)^n $$

...our substitution will consist of:

$$k = n $$

$$n = k$$

...which allows us to rewrite the fifth series as:

$$\sum_{k=0}^{\infty} a_k (x-1)^k \qquad(5) $$

Our entire expression is now:

$$\sum_{k=1}^{\infty} a_{k+1} (k+1) k (x-1)^k + \sum_{k=0}^{\infty} a_{k+2} (k+2) (k+1) (x-1)^k $$

$$+ \sum_{k=0}^{\infty} a_{k+1} (k+1) (x-1)^k + \sum_{k=1}^{\infty} a_{k-1} (x-1)^k $$

$$+ \sum_{k=0}^{\infty} a_k (x-1)^k = 0$$

You will notice that our expression now has generic terms that are all to the power of "k"

The next issue we want to address is the fact that the index of notation for each summation term in our expression does not start at the same place. Two of them start at one and three of them start at zero. We want to be able to add up these series terms and in order to do so they must have the same starting index. We will now shift the index of summation by "burning" a term in the series that start at zero. This is best explained by going through the steps as I do it.

The first series:

...consists of:

$$\sum_{k=1}^{\infty} a_{k+1} (k+1) k (x-1)^k$$

Since it already starts at k=1, we leave it as it is.

The second series:

...consists of:

$$\sum_{k=0}^{\infty} a_{k+2} (k+2) (k+1) (x-1)^k$$

You notice that the second series starts at k=0 and the goal is to make it start at k=1. To accomplish this we will "burn a term" by plugging in zero everywhere we see a "k" inside the summation notation.

...which gives us:

$$ a_{0+2} (0+2) (0+1) (x-1)^0 = (2)(1)(1)a_{2} = 2a_2$$

We can now pull the above expression outside of the second series and start the series at k=1 (since we just evaluated it at k=0). This allows us to rewrite the second series as:

$$2a_2 + \sum_{k=1}^{\infty} a_{k+2} (k+2) (k+1) (x-1)^k$$

The third series:

...consists of:

$$\sum_{k=0}^{\infty} a_{k+1} (k+1) (x-1)^k $$

Just as with the second series, we will "burn a term" in order to start the index of summation at k=1 instead of k=0. Evaluating at k=0 inside the series gives us:

$$ a_{0+1}(0+1) (x-1)^0 = a_1$$

Which allows us to rewrite the third series as:

$$a_1 + \sum_{k=1}^{\infty} a_{k+1} (k+1) (x-1)^k $$

The fourth series:

...consists of:

$$\sum_{k=1}^{\infty} a_{k-1} (x-1)^k$$

...and since it already starts at k=1 we leave it as is

The fifth series:

...consists of:

$$\sum_{k=0}^{\infty} a_k (x-1)^k $$

Once again we "burn a term" by evaluating at k=0, which gives us:

$$a_0(x-1)^0 = a_0 $$

...and we can rewrite the fifth series as:

$$a_0 + \sum_{k=1}^{\infty} a_k (x-1)^k$$

After completing all of the above steps our expresion is now:

$$\sum_{k=1}^{\infty} a_{k+1} k (k+1) (x-1)^k + 2a_2 + \sum_{k=1}^{\infty} a_{k+2} (k+2) (k+1) (x-1)^k$$

$$+ a_1 + \sum_{k=1}^{\infty} a_{k+1} (k+1) (x-1)^k + \sum_{k=1}^{\infty} a_{k-1} (x-1)^k$$

$$+ a_0 + \sum_{k=1}^{\infty} a_k (x-1)^k = 0$$

Next we group all of the terms that don't include "k" and pull them outside of the series notation. Since every series in our expression has the same starting index of k=1, we can place everything else inside the same summation notation. Additionally, we can factor out the generic (x-1)^k term.

$$2a_2+a_1+a_0+\sum_{k=1}^{\infty} (x-1)^k[a_{k+1}k(k+1) + a_{k+2}(k+2)(k+1) $$

$$ + \; a_{k+1}(k+1) + a_k-1 + a_k] = 0$$

Considering the Fundamental Theorem of Algebra, we realize that for the above expression to be true (the left side equals zero) both the constant terms must sum to zero and the terms inside of the summation notation must sum to zero.

Taking the constant terms, we already know a_0 and a_1, so we will solve for a_2:

$$2a_2 + a_1 + a_0 = 0 $$

$$a_2 = \frac{-a_1 - a_0}{2} $$

$$a_2 = \frac{3-2}{2} $$

$$a_2 = \frac{1}{2} $$

Next we will equate the terms inside of the summation notation to zero:

$$(x-1)^k[a_{k+1}k(k+1) + a_{k+2}(k+2)(k+1) + a_{k+1}(k+1) + a_k-1 + a_k] = 0$$

By solving for the highest term [a_(k+2)] we obtain our "Recurrence Relation":

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

Recall that we already know a_0 and a_1, therefore we will solve for a_3.

Solving for a_3:

Our recurrence relation involves the term:

$$a_{k+2} $$

...but if we want to solve for:

$$a_3 $$

...then k must equal one and we need to plug in "1" everywhere we see "k" in our recurrence relation. Doing so gives us:

$$a_3 = \frac{-a_2(1)(2)-a_2(2)-a_0-a_1}{3(2)} $$

$$a_3 = \frac{-2(\frac{1}{2}) - 2(\frac{1}{2}) - 2 + 3}{6} $$

$$a_3 =\frac{-1}{6} $$

Solving for a_4:

Similarly to solve for a_4, we realize that k=2 in our recurrence relation. This gives us:

$$a_4 = \frac{-a_3(2)(3) - a_3(3) - a_1 - a_2}{4(3)} $$

$$a_4 = \frac{\frac{1}{6}(6) + \frac{1}{6}(3) + 3 - \frac{1}{2}}{12} $$

$$a_4 = \frac{1}{3} $$

Final solution:

Recall that towards the beginning of this page, we proposed a solution to our differential that had the form of the series:

$$y(x) = \sum_{n=0}^{\infty} a_n (x-1)^n $$

...and if we expand the above series up to 4 terms, we get:

$$y(x) = a_0(x-1)^0 + a_1(x-1)^1 + a_2(x-1)^2 + a_3(x-1)^3 + a_4(x-1)^4 $$

...which simplifies to:

$$y(x) = a_0 + a_1(x-1) + a_2(x-1)^2 + a_3(x-1)^3 + a_4(x-1)^4 $$

Plugging in our above-determined values for a_0-a_4 gives us a solution to our given differential equation (up to 5 terms/x^4) of:

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