Teaching
Calculus
- Sequences and series
- Finite sums and mathematical induction
- Sequences
- The Fibonacci sequence
- The Lucas sequence
- The integral test
- Comparison tests
- Alternating series
- Absolute convergence
- Power series
- Power series representations
- Remarkable decimal fractions
- A generating function for the Fibonacci numbers
- A generating function for the Lucas numbers
- Taylor series
- Catalan's constant
- The Riemann zeta function
- The harmonic numbers
- Pascal's triangle and the binomial theorem
- Binomial series
- Power series solutions of differential equations
Calculus – Sequences and series – Power series solutions of differential equations
A second-order linear differential equation has the form
\[P(x)y''(x)+Q(x)y'(x)+R(x)y(x)=G(x),\]where \(P\), \(Q\) and \(R\) are continuous functions with \(P(x)\not\equiv0\).
Many of these differential equations can't be solved explicitly in terms of finite combinations of simple familiar functions. This is true even for simple looking equations like
\[xy''+y'+xy=0\quad\text{or}\quad y''-2xy'+4y=0.\]In the case of linear differential equations it is sometimes possible to find solutions in terms of power series. The method is to substitute such a power series into the differential equation and try to determine the values of the coefficients. We first illustrate the method by solving the differential equation \(y''+y=0\) for which we already know the general solution: \(y(x)=c_0\cos(x)+c_1\sin(x)\) with \(c_0,c_1\in\mathbb{R}\).
Stewart §17.4, Example 1:
Use power series to solve the differential equation \(y''+y=0\).
Solution:
We assume that there is a solution of the form \(y=\displaystyle\sum_{n=0}^{\infty}c_nx^n\). Then we have:
\(y'=\displaystyle\sum_{n=1}^{\infty}nc_nx^{n-1}\) and \(y''=\displaystyle\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}\).
Substitution leads to
This implies that
\[\sum_{n=0}^{\infty}\left[(n+2)(n+1)c_{n+2}+c_n\right]x^n=0\quad\Longrightarrow\quad(n+2)(n+1)c_{n+2}+c_n=0,\quad n=0,1,2,\ldots.\]This is a recursion relation for the coefficients:
\[c_{n+2}=-\frac{c_n}{(n+1)(n+2)},\quad n=0,1,2,\ldots.\]If \(c_0\) and \(c_1\) are known, this equation allows us to determine the remaining coefficients recursively by putting \(n=0,1,2,\ldots\) in succession:
\[\begin{array}{llll} n=0: & c_2=-\displaystyle\frac{c_0}{1\cdot2} &{}\hspace{25mm}n=1: & c_3=-\displaystyle\frac{c_1}{2\cdot3}\\[5mm] n=2: & c_4=-\displaystyle\frac{c_2}{3\cdot4}=\frac{c_0}{1\cdot2\cdot3\cdot4}=\frac{c_0}{4!} &{}\hspace{25mm}n=3: & c_5=-\displaystyle\frac{c_3}{4\cdot5}=\frac{c_1}{2\cdot3\cdot4\cdot5}=\frac{c_1}{5!}\\[5mm] n=4: & c_6=-\displaystyle\frac{c_4}{5\cdot6}=-\frac{c_0}{4!\cdot5\cdot6}=-\frac{c_0}{6!} &{}\hspace{25mm}n=5: & c_7=-\displaystyle\frac{c_5}{6\cdot7}=-\frac{c_1}{5!\cdot6\cdot7}=-\frac{c_1}{7!} \end{array}\]and so on. We see the pattern: \(c_{2n}=\displaystyle\frac{(-1)^n}{(2n)!}c_0\) and \(c_{2n+1}=\displaystyle\frac{(-1)^n}{(2n+1)!}c_1\) for \(n=1,2,3,\ldots\). This leads to the (general) solution
\[y=\sum_{n=0}^{\infty}c_nx^n=\sum_{n=0}^{\infty}c_{2n}x^{2n}+\sum_{n=0}^{\infty}c_{2n+1}x^{2n+1} =c_0\sum_{n=0}^{\infty}\frac{(-1)^n}{(2n)!}x^{2n}+c_1\sum_{n=1}^{\infty}\frac{(-1)^n}{(2n+1)!}x^{2n+1}=c_0\cos(x)+c_1\sin(x), \quad c_0,c_1\in\mathbb{R}.\]It is not always possible to find all solutions or the general solution:
Example: Find a solution of \(xy''+y'+xy=0\).
Solution: Substitution of \(y=\displaystyle\sum_{n=0}^{\infty}c_nx^n\), \(y'=\displaystyle\sum_{n=1}^{\infty}nc_nx^{n-1}\) and \(y''=\displaystyle\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}\) leads to
\[x\sum_{n=0}^{\infty}n(n-1)c_nx^{n-2}+\sum_{n=1}^{\infty}nc_nx^{n-1}+x\sum_{n=0}^{\infty}c_nx^n=0\quad\Longleftrightarrow\quad \sum_{n=2}^{\infty}n(n-1)c_nx^{n-1}+\sum_{n=1}^{\infty}nc_nx^{n-1}+\sum_{n=0}^{\infty}c_nx^{n+1}=0.\]In order to find the coefficients we rewrite the last series:
\[\sum_{n=2}^{\infty}n(n-1)c_nx^{n-1}+\sum_{n=1}^{\infty}nc_nx^{n-1}+\sum_{n=2}^{\infty}c_{n-2}x^{n-1}=0\quad\Longrightarrow\quad c_1=0\;\;\text{and}\;\;\sum_{n=2}^{\infty}\left[n(n-1)c_n+nc_n+c_{n-2}\right]x^{n-1}=0.\]So we conclude that \(c_1=0\) and \(c_n=-\displaystyle\frac{c_{n-2}}{n^2}\) for \(n=2,3,4,\ldots\). This implies that \(c_{2n+1}=0\) for \(n=1,2,3,\ldots\) and
\[c_{2n}=-\frac{c_{2n-2}}{(2n)^2}=\frac{c_{2n-4}}{(2n)^2(2n-2)^2}=\cdots=\frac{(-1)^n}{(2n)^2(2n-2)^2\cdots2^2}c_0=\frac{(-1)^n}{2^{2n}(n!)^2}c_0,\quad n=1,2,3,\ldots.\]This leads to the solution \(y=c_0\displaystyle\sum_{n=0}^{\infty}\frac{(-1)^n}{2^{2n}(n!)^2}x^{2n}=c_0J_0(x)\), where \(J_0(x)\) denotes the Bessel function of the first kind of order \(0\).
Example: Find a solution of \(y''-2xy'+4y=0\).
Solution: Substitution of \(y=\displaystyle\sum_{n=0}^{\infty}c_nx^n\), \(y'=\displaystyle\sum_{n=1}^{\infty}nc_nx^{n-1}\) and \(y''=\displaystyle\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}\) leads to
\[\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}-2x\sum_{n=1}^{\infty}nc_nx^{n-1}+4\sum_{n=0}^{\infty}c_nx^n=0\quad\Longleftrightarrow\quad \sum_{n=0}^{\infty}(n+2)(n+1)c_{n+2}x^n-2\sum_{n=0}^{\infty}nc_nx^n+4\sum_{n=0}^{\infty}c_nx^n=0.\]This leads to the recursion relation
\[(n+2)(n+1)c_{n+2}-(2n-4)c_n=0,\quad n=0,1,2,\ldots\quad\Longrightarrow\quad c_{n+2}=\frac{2(n-2)}{(n+1)(n+2)}c_n,\quad n=0,1,2,\ldots.\]Putting \(n=0,1,2,\ldots\) successively, we obtain:
\[\begin{array}{llll} n=0: & c_2=\displaystyle\frac{-4}{1\cdot2}c_0=-2c_0 &{}\hspace{25mm}n=1: & c_3=\displaystyle\frac{-2}{2\cdot3}c_1=-\frac{1}{3}c_1\\[5mm] n=2: & c_4=0 &{}\hspace{25mm}n=3: & c_5=\displaystyle\frac{2}{4\cdot5}c_3=\frac{1}{10}c_3=-\frac{1}{30}c_1\\[5mm] n=4: & c_6=0 &{}\hspace{25mm}n=5: & c_7=\displaystyle\frac{6}{6\cdot7}c_5=\frac{1}{7}c_5=\frac{1}{210}c_1 \end{array}\]and so on. This implies that \(c_{2n}=0\) for \(n=2,3,4,\ldots\) and therefore we have:
\[y=\sum_{n=0}^{\infty}c_nx^n=\sum_{n=0}^{\infty}c_{2n}x^{2n}+\sum_{n=0}^{\infty}c_{2n+1}x^{2n+1}=c_0\left(1-2x^2\right) +c_1\left(x-\frac{1}{3}x^3-\frac{1}{30}x^5-\frac{1}{210}x^7-\cdots\right),\quad c_0,c_1\in\mathbb{R}.\]Note that \(p(x)=1-2x^2\) is a polynomial solution. This is easily checked, since: \(p'(x)=-4x\) and \(p''(x)=-4\). This implies that
\[p''(x)-2xp'(x)+4p(x)=-4+8x^2+4(1-2x^2)=0.\]It is not impossible to find an explicit formula for the coefficients of the second solution:
\[c_{2n+1}=\frac{2(2n-3)}{2n(2n+1)}c_{2n-1}=\frac{2n-3}{n(2n+1)}\cdot\frac{2n-5}{(n-1)(2n-1)}\cdots\frac{1}{2\cdot5}\cdot\frac{-1}{1\cdot3}c_1 =\frac{(-1)\cdot1}{n!(2n-1)(2n+1)}c_1=-\frac{1}{(4n^2-1)n!}c_1\]for \(n=1,2,3,\ldots\). This implies that the second solution is \(y=x-\displaystyle\sum_{n=1}^{\infty}\frac{x^{2n+1}}{(4n^2-1)n!}\).
Example: Solve \((1-x^2)y''-4xy'-2y=0\).Solution: Substitution of \(y=\displaystyle\sum_{n=0}^{\infty}c_nx^n\), \(y'=\displaystyle\sum_{n=1}^{\infty}nc_nx^{n-1}\) and \(y''=\displaystyle\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}\) leads to
\[(1-x^2)\sum_{n=2}^{\infty}n(n-1)c_nx^{n-2}-4x\sum_{n=1}^{\infty}nc_nx^{n-1}-2\sum_{n=0}^{\infty}c_nx^n=0\;\;\Longleftrightarrow\;\; \sum_{n=0}^{\infty}(n+2)(n+1)c_{n+2}x^n-\sum_{n=0}^{\infty}\left[n(n-1)+4n+2\right]x^n=0.\]This leads to the recursion relation
\[(n+2)(n+1)c_{n+2}-(n^2+3n+2)c_n=0,\quad n=0,1,2,\ldots\quad\Longrightarrow\quad c_{n+2}=\frac{(n+1)(n+2)}{(n+1)(n+2)}c_n=c_n,\quad n=0,1,2,\ldots.\]Hence we have: \(y=\displaystyle\sum_{n=0}^{\infty}c_nx^n=c_0\sum_{n=0}^{\infty}x^{2n}+c_1\sum_{n=0}^{\infty}x^{2n+1}\). For \(|x| < 1\) we have: \(\displaystyle\sum_{n=0}^{\infty}x^{2n}=\frac{1}{1-x^2}\) and \(\displaystyle\sum_{n=0}^{\infty}x^{2n+1}=\frac{x}{1-x^2}\).
Direct substitution shows that these solutions \(p(x)=\displaystyle\frac{1}{1-x^2}\) and \(q(x)=\displaystyle\frac{x}{1-x^2}\) are also valid for \(|x| > 1\). Note that \(p'(x)=\displaystyle\frac{2x}{(1-x^2)^2}\) and \(p''(x)=\displaystyle\frac{2+6x^2}{(1-x^2)^3}\), which implies that \((1-x^2)p''(x)-4xp'(x)-2p(x)=\displaystyle\frac{2+6x^2}{(1-x^2)^2}-\frac{8x^2}{(1-x^2)^2}-\frac{2}{1-x^2}=0\). Similarly we have \(q'(x)=\displaystyle\frac{1+x^2}{(1-x^2)^2}\) and \(q''(x)=\displaystyle\frac{6x+2x^3}{(1-x^2)^3}\), and therefore \((1-x^2)q''(x)-4xq'(x)-2q(x)=\displaystyle\frac{6x+2x^3}{(1-x^2)^2}-\frac{4x+4x^3}{(1-x^2)^2}-\frac{2x}{1-x^2}=0\).
Last modified on March 15, 2021