Skip to main content

Applied Mathematics

Section 8.4 Series Solutions of Differential Equations

In Section 8.3, we touched on solutions to linear ordinary differential equations. We kept our scope to those that were 2nd order and constant coefficient. In this section, we investigate power series solutions to differential equations.

Subsection 8.4.1 Solving First-order Differential Equations with Series

Let’s start this section with a specific example. Before doing that example, we will assume that the solution has the form:
\begin{equation} y = \sum_{n=0}^{\infty} a_n x^n\tag{8.4.1} \end{equation}
and because we need the derivative as well, we will differentiate the series or
\begin{equation} y' = \sum_{n=0}^{\infty} n a_n x^{n-1}\tag{8.4.2} \end{equation}

Example 8.4.1.

Solve the initial value problem
\begin{equation*} y' = y, \quad y(0) = 1, \end{equation*}
for some non-zero real constant \(r\) using power series.
Solution.
Start by substituting (8.4.1) and (8.4.2) into the differential equation or
\begin{equation*} \sum_{n=0}^{\infty} n a_n x^{n-1} = \sum_{n=0}^{\infty} a_n x^n \end{equation*}
We will use the method of underdetermined coefficients which is a general techniques that is used to find the coefficients of variables functions (polynomials, sines and cosines or exponentials ) which sets the coefficients on both sides of an example to the same.
In this case, we match similar powers and it is easier if the series on the left is written in term of \(x^{n}\) instead of \(x^{n-1}\) and we can change this by first noting that we can start incrementing at \(n=1\) instead, because the first term is 0.
\begin{equation*} \sum_{n=1}^{\infty} n a_n x^{n-1} = \sum_{n=0}^{\infty} a_n x^n \end{equation*}
and then if we let \(k=n-1\) or \(n= k+1\text{,}\) then the left side becomes
\begin{equation*} \sum_{k=0}^{\infty} (k+1) a_{k+1} x^k = \sum_{n=0}^{\infty} a_n x^n \end{equation*}
and lastly since the index variable doesn’t matter, let’s switch back to \(n\) using \(k=n\text{.}\)
 1 
Wait. You might be thinking "Wait. First you said \(n=k+1\) and then \(n=k\text{.}\) How can these both be true?" That is some good thinking there are your part. However, since both \(n\) and \(k\) are just indexes, they aren’t variables in the power series. Write out a handful of terms of each of the series on the left sides above and you will see that they are equivalent. We just write them differently.
\begin{equation*} \sum_{n=0}^{\infty} (n+1) a_{n+1} x^n = \sum_{n=0}^{\infty} a_n x^n \end{equation*}
Now that powers are both sides are the same, this means that the coefficients must be the same or
\begin{equation*} (n+1)a_{n+1} = a_n \end{equation*}
or
\begin{equation*} a_{n+1} = \frac{1}{n+1} a_n \end{equation*}
and since we have the initial condition, plugging \(x=0\) into (8.4.1), results in \(a_0=1\text{.}\) If determining a formula for \(a_n\) is not clear, let’s try
\begin{equation*} \begin{aligned} a_1 \amp = \frac{a_0}{1} = 1 \\ a_2 \amp = \frac{a_1}{2} = \frac{1}{2} \\ a_3 \amp = \frac{a_2}{3} = \frac{1}{2\cdot 3} \\ a_4 \amp = \frac{a_3}{4} = \frac{1}{2 \cdot 3 \cdot 4} \end{aligned} \end{equation*}
and can be shown that in general
\begin{equation*} a_n = \frac{1}{n!} \end{equation*}
So the series solution will be substituting \(a_n\) into (8.4.1) or
\begin{equation*} y = \sum_{n=0}^{\infty} \frac{1}{n!} x^n \end{equation*}
The equation in the previous example was relatively simple. The follow exercises asks you to expand the equation a bit.

Checkpoint 8.4.2.

Solve the following initial value problem using power series techniques.
\begin{equation*} y' + r y = 0, \quad y(0) = y_0 \end{equation*}

Subsection 8.4.2 Second-Order Differential Equations

Let’s now examine some second order equations. We’ll start with one we know.
\begin{equation*} y'' + 4y = 0, \quad y(0) = 1, y'(0)=0 \end{equation*}
and in this case, we will need the second derivative or the derivative of
\begin{equation} y'' = \sum_{n=0}^{\infty}n(n-1) a_n x^{n-2}\tag{8.4.3} \end{equation}
and substitute this and (8.4.1) into the differential equation as
\begin{equation*} \begin{aligned} \sum_{n=0}^{\infty}n(n-1) a_n x^{n-2} + 4 \sum_{n=0}^{\infty} a_n x^n \amp = 0\\ \sum_{n=2}^{\infty} n(n-1) a_n x^{n-2} + 4 \sum_{n=0}^{\infty} a_n x^n \amp = 0 \end{aligned} \end{equation*}
where the first two terms of the left series are zero so we start at index 2. Next, we will reindex the first series as \(k=n-2\text{,}\) then \(k=n\) to get
\begin{equation*} \begin{aligned} \sum_{n=0}^{\infty} (n+2)(n+1)a_{n+2} x^n + \sum_{n=0}^{\infty} 4 a_n x^n \amp =0 \\ \sum_{n=0}^{\infty} \left((n+2)(n+1) a_{n+2} + 4 a_n\right) x^n \amp 0 \end{aligned} \end{equation*}
and the result is the recursive formula:
\begin{equation*} a_{n+2} = - \frac{4}{(n+1)(n+2)}a_n \end{equation*}
The intial conditions result in \(a_0=1\) and \(a_1=0\text{.}\) From the recursive formula and \(a_1=0\text{,}\) we get \(a_k=0\) for all odd values of \(k\text{.}\) For even values,
\begin{equation*} \begin{aligned} a_2 \amp = -\frac{4}{(1)(2)} a_0 = -2 = - \frac{2^2}{2!}, \\ a_4 \amp = -\frac{4}{(3)(4)} a_2 = \frac{2^4}{4!} \\ a_6 \amp = -\frac{4}{(5)(6)} a_4 = -\frac{2^2 (2^4)}{(4!)(5)(6)} = - \frac{2^6}{6!} \\ a_8 \amp = -\frac{4}{(7)(8)} a_6 = \frac{2^8}{8!} \end{aligned} \end{equation*}
and in general, we can write:
\begin{equation*} a_{2k} = (-1)^k \frac{2^{2k}}{(2k)!} \end{equation*}
so the series is
\begin{equation*} \begin{aligned} y \amp = 1 - \frac{2^2}{2!}x^2 + \frac{2^4}{4!} x^4 - \frac{2^6}{6!} x^6 + \frac{2^8}{8!} x^8 + \cdots \\ \amp = \sum_{k=0}^{\infty} \frac{2^{2k}}{4!}x^{2k} \end{aligned} \end{equation*}
and this is the Taylor series expansion of \(\cos(2x)\text{.}\)

Subsection 8.4.3 Series Solutions and Orthogonal Polynomials

In Section 4.4, we saw orthogonal sets of "vectors", which can include polynomials. The inner product is defined with respect to a weight function and interval and an example of this is if \(w(x) \equiv 1\) on \([-1,1]\text{,}\) the the resulting polynomials are the Legendre Polynomials. In Example 4.4.15, we used the Gram-Schmidt Orthogonalization algorithm to find these polynomials. An alternative method is to solve the differential equation:
\begin{equation*} \frac{d}{dx} \left( (1-x^2) \frac{dy}{dx}\right) + n(n+1) y = 0 \end{equation*}
which will have a solution \(P_n(x)\text{,}\) which will be the \(n\)th Legendre polynomial.
The series solutions of this differential equation is quite nice in that it can be found for general value \(n\text{.}\) As before, we will assume the solution has the form of (8.4.1) and then we will need the first derivative.
\begin{equation*} \begin{aligned} \frac{d}{dx} \left( (1-x^2) \sum_{k=0}^{\infty} k a_k x^{k-1}\right) + n(n+1) \sum_{k=0}^{\infty} a_k x_k \amp = 0 \\ \frac{d}{dx} \left(\sum_{k=0}^{\infty} k a_k x^{k-1} - \sum_{k=0}^{\infty} k a_k x^{k+1} \right) + n(n+1) \sum_{k=0}^{\infty} a_k x_k \amp = 0 \end{aligned} \end{equation*}
where \(k\) is used as the index for the series because \(n\) is used as the specific polynomial (solution). Differentiating
\begin{equation*} \begin{aligned} \sum_{k=2}^{\infty} k (k-1) a_k x^{k-2} - \sum_{k=0}^{\infty} k (k+1) a_k x^k + n(n+1) \sum_{k=0}^{\infty} a_k x_k \amp = 0 \\ \sum_{k=0}^{\infty} (k+2) (k+1) a_{k+2} x^k - \sum_{k=0}^{\infty} k (k+1) a_k x^k + n(n+1) \sum_{k=0}^{\infty} a_k x_k \amp = 0 \\ \sum_{k=0}^{\infty} \left((k+2)(k+1)a_{k+2} - k(k+1)a_k + n(n+1)a_k\right) x^k \amp =0 \end{aligned} \end{equation*}
where the in the first equation above, the series starts at \(k=2\text{,}\) because the first two terms are 0. Also the indexing for the first series in the second equation above has been shifted by 2.
The coefficient of \(x^k\) must be zero so setting the coefficient to 0 results in
\begin{equation*} a_{k+2} = \frac{k(k+1) - n(n+1)}{(k+1)(k+2)}a_k \end{equation*}
Like above and is common to other 2nd order differential equations, the even and odd coefficients decouple from each other. If \(n\) is not an integer, then eventually the terms will look like \(a_{k+2} \approx \frac{k}{k+2} \) and recall that if the terms of a series do not go to 0, then the series diverges. It is a solution, but not a helpful one.
If \(n\) is an integer, that when \(k=n\text{,}\) the term \(a_{k+2}=0\) and from this general relationship \(a_{k+2j}=0\) for all \(j \geq 1\text{.}\) Note also, if \(n\) is odd, then the even terms \(a_{2k}\) will have the same situation as the non-integer solution and will diverge. Similarly if \(n\) is even then the odd terms \(a_{2k+1}\) will diverge.
Thus the only interesting solution to this is to examine the odd terms if \(n\) is odd or the even terms if \(n\) is even. Let’s look at the cases:

\(n=0\) case.

In this case, we have
\begin{equation*} a_{k+2} = \frac{k(k+1) - 0}{(k+1)(k+2)} a_0 \end{equation*}
and when \(k=0\text{,}\) \(a_{k+2} =a_2=0\) as so all even terms above this are also zero, then \(y(x) = a_0\)

\(n=1\) case.

In this case, we have
\begin{equation*} a_{k+2} = \frac{k(k+1) - 1(2)}{(k+1)(k+2)} a_k \end{equation*}
and when \(k=1\text{,}\) \(a_{k+2} =0\) the only solution is \(P_1(x) = a_1 x\)

\(n=2\) case.

In this case we ignore the odd terms and when \(k=0\)
\begin{equation*} a_2 = \frac{0(1)-2(3)}{(1)(2)}a_0 = -\frac{3}{2} a_0 \end{equation*}
and all \(a_{2k}=0\) for \(k \geq 2\text{.}\) The solution thus is a polynomial of the form:
\begin{equation*} P_2(x) = a_0 - 3 a_0 x^2 \end{equation*}
and often we write this as a monomial or
\begin{equation*} P_2(x) = C\left(x^2 - \frac{1}{3}\right) \end{equation*}

\(n=3\) case.

In this case, we ignore the even terms and when \(k=1\)
\begin{equation*} a_3 = \frac{1(2)-3(4)}{2(3)} a_1 = -\frac{5}{3} a_1 \end{equation*}
and for all \(a_{2k+1}=0\) for \(k \geq 2\text{.}\) The solution is a polynomial:
\begin{equation*} P_3 = a_1 x - \frac{5}{3} a_1 x^3 \end{equation*}
and writing this as a monomial:
\begin{equation*} P_3 = C\left(x^3 - \frac{3}{5} x) \end{equation*}

Subsection 8.4.4 Differential Equations with Singular Points

Let’s take a look at another example:
\begin{equation} 2x y'' + y'+ y = 0\tag{8.4.4} \end{equation}
We assume the form of (8.4.1) for the solution and use (8.4.2) and (8.4.3) for the derivatives, then
\begin{equation*} \begin{aligned} 2x \sum_{n=0}^{\infty} n(n-1) a_n x^{n-2} + \sum_{n=0}^{\infty} n a_n x^{n-1} + \sum_{n=0}^{\infty} a_n x^n \amp = 0 \\ \sum_{n=2}^{\infty} 2n(n-1) a_n x^{n-1}+ \sum_{n=1}^{\infty} n a_n x^{n-1} + \sum_{n=0}^{\infty} a_n x^n \amp = 0 \end{aligned} \end{equation*}
and we reindex the first two series, first with \(k=n+1\text{,}\) then \(k=n\)
\begin{equation*} \sum_{n=1}^{\infty} 2(n+1)na_{n+1} x^n + \sum_{n=0}^{\infty} (n+1) a_{n+1} x^n + \sum_{n=0}^{\infty} a_n x^n = 0 \end{equation*}
and now the powers are the same, however note that the second two sums have an additional term so we would need to write this as
\begin{equation*} \begin{aligned} a_1 + a_0 + \sum_{n=1}^{\infty} \left((2(n+1)n +(n+1))a_{n+1} + a_n\right) x^n \amp = 0 \\ a_1 + a_0 + \sum_{n=1}^{\infty} \left((n+1)(2n+1)a_{n+1} + a_n\right) x^n \amp = 0 \end{aligned} \end{equation*}
The general term would be
\begin{equation*} a_{n+1} = -\frac{1}{(2n+1)(n+1)} a_n \end{equation*}
with the first term leading to \(a_1 = -a_0\) and then the next few terms are:
\begin{equation*} \begin{aligned} a_2 \amp = - \frac{1}{3(2)} a_1 = \frac{1}{2(3)} a_0 \\ a_3 \amp = -\frac{1}{5(3)} a_2 = -\frac{1}{5(3)(2)(3)} = - \frac{1}{90} a_0 \\ a_4 \amp = -\frac{1}{7(4)} a_3 = \frac{1}{48 \cdot 90} = \frac{1}{4320} a_0 \end{aligned} \end{equation*}
and then this leads to the series
\begin{equation*} y (x) = a_0 \left(1-x+\frac{x^2}{6} - \frac{x^3}{90} + \frac{x^4}{4320} + \cdots\right) \end{equation*}

Subsection 8.4.5 Frobenius Method

But a second solution is missing. There should be two linearly independent solutions. Although there are other ways to do this, let’s use a more general method for series, called the Frobenius Method. Instead of the power series form in (8.4.1), we can assume
\begin{equation*} y = x^r \sum_{n=0}^{\infty} a_n x^n = \sum_{n=0}^{\infty} a_n x^{r+n} \end{equation*}
where \(r\) is a constant. Let’s use this to see what happens with (8.4.4) and will need the derivatives of this.
\begin{equation*} \begin{aligned} y' \amp = \sum_{n=0}^{\infty} (r+n)a_n x^{r+n-1} \\ y'' \amp = \sum_{n=0}^{\infty} (r+n)(r+n-1) a_n x^{r+n-2} \end{aligned} \end{equation*}
Substituting this into (8.4.4) results in
\begin{equation*} \begin{aligned} 2x \sum_{n=0}^{\infty} (r+n)(r+n-1)a_n x^{r+n-2} + \sum_{n=0}^{\infty} (r+n)a_n x^{r+n-1} + \sum_{n=0}^{\infty} a_n x^{r+n} \amp = 0 \\ \sum_{n=0}^{\infty} 2(r+n)(r+n-1)a_n x^{r+n-1} + \sum_{n=0}^{\infty} (r+n)a_n x^{r+n-1} + \sum_{n=0}^{\infty} a_n x^{r+n} \amp = 0 \\ \end{aligned} \end{equation*}
and note that since we don’t know a value of \(r\text{,}\) we don’t drop off the first term like above. Reindexing like above results in
\begin{equation*} \sum_{n=-1}^{\infty} 2(r+n+1)(r+n)a_{n+1} x^{r+n} + \sum_{n=-1}^{\infty} (r+n+1)a_{n+1} x^{r+n} + \sum_{n=0}^{\infty} a_n x^{r+n} = 0 \\ \end{equation*}
The first term in each of the first two series is extra, so we write it separately
\begin{equation*} 2r(r-1)a_0 x^{r-1} + r a_0 x^{r-1} + \sum_{n=0}^{\infty} \left(2(r+n+1)(r+n)a_{n+1} + (r+n+1)a_{n+1} + a_n\right)x^{r+n} =0 \end{equation*}
the general terms (coefficient of \(x^{r+n}\) inside the sum) results in
\begin{equation} a_{n+1} = - \frac{a_n}{(r+n+1)(2(r+n)+1)}\tag{8.4.5} \end{equation}
the coefficient of the first term is
\begin{equation*} a_0 (2r^2-2r+r) x^{r-1} = a_0 (2r^2-r) x^{r-1} = 0 \end{equation*}
and since we are looking for the value of \(r\text{,}\) \(2r^2-r = r(2r-1)\text{,}\) which has the two solutions \(r=0,1/2\text{.}\)
Note that the \(r=0\) will result in the solution we found above, so we’re interested in the \(r=1/2\) case. Let’s write down a few terms using the general formula in (8.4.5):
\begin{equation*} \begin{aligned} a_1 = - \frac{a_0}{(1/2+1)(2(1/2)+1)} = - \frac{a_0}{3} \\ a_2 = - \frac{a_1}{(5/2)(2(3/2)+1)} = \frac{a_0}{10\cdot 3} = \frac{a_0}{30} \\ a_3 = - \frac{a_2}{(7/2)(2(5/2)+1)} = -\frac{a_0}{30(7/2)(6)} = -\frac{a_0}{630} \\ a_4 = - \frac{a_3}{(9/2)(2(7/2)+1)} = \frac{a_0}{630(9/2)(8)} = \frac{a_0}{2520} \end{aligned} \end{equation*}
resulting in the series (with the \(x^{1/2}\) term)
\begin{equation*} y_2 = C \sqrt{x} \left(1-\frac{x}{3} + \frac{x^2}{30} - \frac{x^3}{630} + \frac{x^4}{2520} + \cdots \right) \end{equation*}