17-02-2023

Problem: Determine a series solution of the equation \[ y^{\prime\prime } + x y^\prime + y = 0. \]

Solution: Suppose that the differential equation \[ y^{\prime \prime} + xy^\prime + y = 0 \] has a (power )series solution given by \begin{equation}\label{eq:17Feb2023-1} y = \sum_{n=0} ^{\infty} a_nx^n. \end{equation} We need to determine the coefficients $a_n$.


At first we have \begin{align*} y^\prime & = \sum_{n=1}^{\infty} n a_n x^{n-1} \\ y^{\prime \prime } & = \sum_{n=2} ^{\infty} n(n-1)a_n x^{n-2}. \end{align*}


Plugging the above in the given differential equation, we obtain \begin{align*} & y^{\prime\prime} + xy^\prime + y = 0 \\ \implies & \sum_{n=2} ^{\infty} n(n-1)a_n x^{n-2} + x \sum_{n=1}^{\infty} n a_n x^{n-1} + \sum_{n=0} ^\infty a_n x^n = 0 \\ \implies & \sum_{n=0} ^{\infty} (n+1)(n+2)a_{n+2}x^n + \sum_{n=1} ^{\infty} na_n x^n + \sum_{n=0} ^{\infty} a_n x^n = 0 \\ \implies & 2a_2 + a_0 + \sum_{n=1} ^{\infty} \left[ (n+1)(n+2)a_{n+2}+ na_n + a_n \right]x^n = 0. \end{align*} The above equality will hold only if each coefficient of $x^n$ is zero, so we have \begin{gather*} 2a_2 + a_0 = 0 \\ (n+1)(n+2)a_{n+2} + (n+1)a_n = 0 \implies a_{n+2} = -\frac{a_n}{n+2}. \end{gather*}


So we have \[ a_2 = - \frac{a_0}{2},~a_{n+2} = -\frac{a_n}{n+2}~n\geq 1. \] We can assume in the above recursion, that $a_0$ and $a_1$ are arbitrary and then we can determine all other coefficients. Let us find some of the terms, then will say what will be the general term. \begin{align*} a_2 & = \frac{-a_0}{2}\\ a_3 & = \frac{-a_1}{3}\\ a_4 & = \frac{-a_2}{4} = \frac{a_0}{2\cdot 4} \\ a_5 & = \frac{-a_3}{5} = \frac{a_1}{3\cdot 5} \\ a_6 & = \frac{-a_4}{6} = \frac{-a_0}{2\cdot 4\cdot 6} \\ a_7 & = \frac{-a_5}{7} = \frac{-a_1}{3\cdot 5\cdot 7}. \end{align*}


It is not difficult to show by the mathematical induction that the general formula will be \begin{align*} a_{2n} & = \frac{(-1)^n a_0}{2\cdot 4\cdot 6.\cdot \cdots \cdot (2n)},~\textup{and} \\ a_{2n+1} & = \frac{(-1)^n a_1}{3\cdot 5\cdot 7.\cdot \cdots \cdot (2n+1)}. \end{align*} Therefore, we obtain a power series solution of the differential equation $y^{\prime\prime} +xy^\prime +y=0$ which is \[ \textcolor{blue}{\boxed{ y = a_0 \left( \sum_{n=1} ^{\infty} \frac{ x^{2n}}{2\cdot 4\cdot 6\cdot \cdots \cdot (2n)} \right) + a_1 \left( \sum_{n=1} ^{\infty} \frac{ x^{2n+1}}{3\cdot 5\cdot 7\cdot \cdots \cdot (2n+1)} \right) }} \]