15. Some simple time-stepping methods#
The goal is to find an approximate solution to the ODE
by a numerical method.
We introduce time points
usually we choose \(n \in {\mathbb N}\), define \(h := \frac{T-t_0}{n}\), and \(t_i := t_0 + ih\).
We compute a discrete approximate solution
15.1. Explicit Euler method#
The derivative \(y^\prime\) is approximated by the forward difference quotient
Inserting this approximation into the equation we get the numerical scheme
or (with constant mesh size \(h = t_{i+1} - t_i\))
This method is very simple, it is a fully explicit algorithm. The next step \(y_{i+1}\) is defined by simply evaluating this formula.
15.2. Implicit Euler method#
One can also start with the backward difference formula. The same difference quotient is now seen as an approximation to \(y^\prime(t_{i+1})\). This leads to the discrete scheme
or
Now, the new step \(y_{i+1}\) shows up also within the right-hand side. We cannot simply evaluate a formula, but have to solve a system of equations. If the right hand side \(f(t,y)\) depends non-linear on the the state \(y\), one has to solve a non-linear system. Typically, this is done using Newton’s method.
15.3. Crank-Nicolson method#
Interpreting the difference quotient as an approximation to the derivative in the mid-point \(\frac{t_{i}+t_{i+1}}{2}\), we end up with the Crank-Nicolson method
Like the implicit Euler method, it is an implicit method as well. Numerical analysis proves that this method provides a better rate of convergence.
15.4. Derivation from the integral equation#
We consider the ODE
on the time interval \([t_i, t_{i+1}]\). We rewrite it as an integral equation
We insert \(t = t_{i+1}\) to obtain the next time-step, and use numerial integration to approximate the integral on the right hand side. The left-sided rectangular rule
leads to
the right-sided rectangular rule
leads to
The more accurate trapezoidal rule
leads to the Crank-Nicolson method
We see that we have recovered the same three methods from numerical integration, as we had already motivated before from numerical differentiation. We will use more accurate integration rules to develop more accurate time-stepping methods later.