Series Solution of ODEs
From biophysics wiki
Let us consider the linear homogenious second order ODE with $z \in \mathbb{C}$
\begin{align} y + p(z) y' +q(z)y=0 \label{ode} \end{align} If \ref{ode} the fucntions $p(z)$ and $q(z)$ are at some point $z=z_0$ finite, then they can be expressed as a power series \begin{align} p(z)=\sum_{n=0}^{\infty} p_n(z-z_0)^n \\ q(z)=\sum_{n=0}^{\infty} q_n(z-z_0)^n \\ \end{align} Functions for which a power series exists are called analytic at $z=z_0$ and $z_0$ is called an ordinary point. If a function $p(z)$ or $q(z)$ diverges at $z=z_0$, then $z_0$ is called a singular point.
Even if a function diverges at $z=z_0$ it may possess a nonsingular (finite) solution at $z_0$. The nessessary and sufficient condition of for existence is that the functions \begin{align} p(z)(z-z_0)\\ q(z)(z-z_0)^2 \end{align} are analytic at $z-z_0$. Such a point is called a regular singular point. Problems of this kind can be solved by the Method of Frobenius.
Series solution about an ordinary point
In the following discussion we make the transformiation $Z=z-z_0$, if $z_0$ is not zero already. Since any solution $y$ of equation \ref{ode} can be represented by a power series \begin{align} y(z)=\sum_{n=0}^{\infty} a_n \, z^n \label{power} \end{align} we take \ref{power} as an ansatz for \ref{ode}. The derivatives of \ref{power} is \begin{align} y'&=\sum_{n=0}^{\infty} n \cdot a_n \, z^{n-1}=\sum_{n=0}^{\infty} (n+1) \cdot a_{n+1} \, z^{n} \end{align} \begin{align} y&=\sum_{n=0}^{\infty} n(n-1) \cdot a_n \, z^{n-2}=\sum_{n=0}^{\infty} (n+2)(n+1) \cdot \, a_{n+1} z^{n} \end{align}
The solution to an ODE \ref{ode} is obtained by pluggin in the derivatives of $y(z)$ with the same power of $z$. This enables us to use only one summation sign and we can pull out $z^n$. This is best illustrated at an example.<br\><br\>
Example<br\>
Solve the ODE \begin{align} y + y=0 \end{align} We simply plug in the derivatives of $y$ \begin{align} \sum_{n=0}^{\infty} (n+2)(n+1) \cdot a_{n+1} \, z^{n} + \sum_{n=0}^{\infty} (n+1) \cdot a_{n+1} \, z^{n} =0\\ \sum_{n=0}^{\infty} \left[ (n+2)(n+1) \cdot a_{n+1} +(n+1) \cdot a_{n+1} \right] \, z^{n} =0 \end{align}