Numerical Methods for First Order Differential Equations
Most differential equations cannot be solved analytically. As a consequence, a wide array of numerical methods have been developed to produce approximate solutions, typically by making successive stepwise approximations across some finite interval from a defined starting point.
It is useful to understand the basic principles of these methods. This appendix provides the background necessary to solve the kinds of initial value problems typically encountered in simulations of electrical excitability.
The goal is to approximate a solution for the differential equation,
\[ \frac{dy}{dt} = f\left( t,y \right)\text{\ \ \ \ \ }\tag{1} \]
over the interval \(0 \leq t \leq T\). Typically, there will be an infinite number of solutions. To select a specific solution, it is also necessary to define an initial condition.
\[y\left( 0 \right) = y_{0}\]
This combination of a differential equation, a fixed interval for solution and a defined initial condition is known as an initial value problem.
To make this a tractable problem for computation, the continuous differential equation is converted into a difference equation in discrete time. The first step is to convert the continuous interval \(0 \leq t \leq T\) into a finite number of discrete steps, separated by some finite time difference \(\mathrm{\Delta}t\). In the simplest case the steps are all equal length so that,
\[\Delta t = \frac{T}{N}\]
where, \(N\) is the number of steps in the interval. This creates the series \(t_{0} = 0,\ \ t_{1} = t_{0} + \Delta t,\ \ t_{2} = t_{1} + \Delta t,\ \ldots,\ \ t_{n + 1} = t_{n} + \Delta t,\ \ldots,\ \ t_{N} = T\) for which we wish to determine the corresponding y-values \(y_{0},\text{\ y}_{1},\ \ y_{2},\ldots,\ \ y_{n + 1},\ldots,\ y_{N}\).
There are two broad classes of numerical methods for the solution of differential equations known as explicit and implicit methods. Each has some advantages. Explicit methods are generally easier to program for a broad range of differential equations and are usually less computationally intensive. Implicit methods are generally more stable.
Further Reading
‘Numerical Analysis” by T. Sauer gives a more complete and rigorous description of the material in this chapter.