Use power series to find the general solution of the linear differential equation \[ \begin{equation*} y^{\prime \prime} +xy^{\prime} +2y=0 \end{equation*} \]

Solution If \(y(x)=\sum\limits_{k=0}^{\infty }a_{k}x^{k}\) is a solution to the differential equation, then \[ y^{\prime} (x)=\sum\limits_{k=1}^{\infty }ka_{k}x^{k-1}\qquad \hbox{and}\qquad y^{\prime \prime} (x)=\sum\limits_{k=2}^{\infty }k(k-1)a_{k}x^{k-2} \]

Now we substitute these power series into the differential equation. \[ \begin{eqnarray*} \sum\limits_{k=2}^{\infty }k(k-1)a_{k}x^{k-2}\,{+}\,x\!\sum\limits_{k=1}^{\infty}ka_{k}x^{k-1}+2\sum\limits_{k=0}^{\infty }a_{k}x^{k}\!&=&0\quad {\color{#0066A7}{y^{\prime \prime} +xy^{\prime} +2y=0}} \\[4pt] \sum\limits_{k=2}^{\infty }k(k-1)a_{k}x^{k-2}+\sum\limits_{k=1}^{\infty }ka_{k}x^{k}+\sum\limits_{k=0}^{\infty }2a_{k}x^{k}\!&=&0 \quad {\color{#0066A7}{\hbox{Move }x\hbox{ and } 2\hbox{ into the summation.}}} \end{eqnarray*} \]

Next we adjust the indexes of summation so that \(x^{k}\) appears in each series. Here, only the first series needs modification. If we replace \(k\) with \(k+2\) in the first series, we obtain \[ \begin{equation*} \underset{\color{#0066A7}{\hbox{Replace }k\hbox{ with }k+2}}{\underbrace{\sum\limits_{k=0}^{ \infty }( k+2) (k+1)a_{k+2}x^{k}}}+\sum\limits_{k=1}^{\infty }ka_{k}x^{k}+\sum\limits_{k=0}^{\infty }2a_{k}x^{k}=0 \end{equation*} \]

1092

The index in the first and third series begins at \(k=0\), and the index in the second series begins at \(k=1\). We write out the \(k=0\) term of the first and third series separately. Then each summation starts at \(k=1.\) \[ \begin{eqnarray*} \left( 2\right) \left( 1\right) a_{2}x^{0}+2a_{0}x^{0}+\sum\limits_{k=1}^{\infty }( k+2) (k+1)a_{k+2}x^{k}+\sum\limits_{k=1}^{\infty }ka_{k}x^{k}+\sum\limits_{k=1}^{\infty }2a_{k}x^{k}& =&0 \\[4pt] 2a_{2}+2a_{0}+\sum\limits_{k=1}^{\infty }\left[ (k+2)(k+1)a_{k+2}+(k+2) a_{k}\right] x^{k}& =&0 \end{eqnarray*} \]

Equating the coefficients of corresponding powers of \(x\) (the coefficients on the right side are all \(0)\), we have \[ \begin{eqnarray*} \hspace{-5pt}2a_{2}+2a_{0}&=&0 \hspace{20pt}(n+2)(n+1)a_{n+2}+(n+2)a_{n}=0 & \\[2pt] a_{2}&=&-a_{0}\quad\hspace{140pt} a_{n+2}=-\dfrac{a_{n}}{(n+1)}\quad n=1,2,3,\ldots \end{eqnarray*} \]

If \(n=1\), we find \(a_3=-\frac{a_1}{2}\). Then we use the recursion formula on the left to obtain all of the coefficients in terms of \(a_{0}\) and \(a_{1}\). That is, \[ \begin{equation*} \begin{array}{@{}l@{\quad\ \ \ }l@{\quad\ \ \ }l@{\quad\ \ \ }l@{}} a_{2}= -a_{0} & a_{4}=-\dfrac{a_{2}}{3}=\dfrac{a_{0}}{3} & a_{6}=-\dfrac{a_{4}}{5}=-\dfrac{a_{0}}{3\cdot 5} & a_{8}=-\dfrac{a_{6}}{7}=\dfrac{a_{0}}{3\cdot 5\cdot 7}\\ a_{3}=-\dfrac{a_{1}}{2} & a_{5}=-\dfrac{a_{3}}{4}=\dfrac{a_{1}}{2\cdot 4} & a_{7}=-\dfrac{a_{5}}{6}=-\dfrac{a_{1}}{2\cdot 4\cdot 6} \end{array} \end{equation*} \]

and so on. Since \(a_{0}\) and \(a_{1}\) can be chosen arbitrarily, the power series representation for the general solution is \[ \begin{eqnarray*} y(x)&=&a_{0}\!\left( 1-x^{2}+\frac{x^{4}}{3}-\frac{x^{6}}{3\cdot 5}+\frac{x^{8}}{3\cdot 5\cdot 7}-\cdots \right)\\[5pt] &&+\,a_{1}\!\left( x-\frac{x^{3}}{2}+\frac{x^{5}}{2\cdot 4}-\frac{x^{7}}{2\cdot 4\cdot 6}+\cdots \right) \end{eqnarray*} \]