In standard form
could represent system of equations (i.e. vector).
Discretize time in steps of size (timestep).
See notes from Oxford course here
Numerical methods (finite difference discretization methods, similar to Finite element methods):
All of these methods have explicit and implicit variants
IVP codes in MATLAB
ode23
: low-order RK
ode45
: higher-order RK
ode113
: variable-order multistep
ode23s
, ode15s
, ode15i
, ode23t
, ode23tb
variants for stiff problems etc.
In Chebfun
N = chebop(a,b)
% define the interval [a,b]
N.op = @(x,u) ...
% define the ODE, with diff(u,k) = kth derivative of u
N.bc = ...
% boundary conditions
See here for explanation of local truncation error (LTE), used to find order of accuracy (what we call accuracy above, , i.e. error decreases with the square of the time step.
Convergence and Stability
Theory of convergence of multistep formulas by Dahlquist (1956). Analogs for RK too.
Key definitions:
consistent: order of accuracy > 1.
stable: if for f(t,u) = 0 all the solutions are bounded.. I.e. does error grow or stay bounded.. See here too.
convergent: for each fixed as (ignoring rounding errors, from computing..).
Dahlquist equivalence theorem:
Convergence consistency stability |
The Adams formulas are consistent and stable, hence convergent
Adaptive ODE codes adapt step size and other parameters so that estimated errors (using methods above, like LTE) are smaller than a prescribed value.
Chaos and Lyapunov exponents. The Lorenz equations. Sinai billiards is another famous chaotic system.
Stability regions regions of space ( is a parameter in the model ode, a=0 corresponds to f=0, as defined above for stability, I guess here we are being more general..) in which solutions remain bounded (this is achieved when characteristic polynomial of the recurrence relation, obtained by the finite difference method, has roots with and any root is simple). See here too.
Stiffness. A stiff ODE is one with widely varying time scales. One may need very small because there are modes with (i.e. part of equation which create behaviour corresponding to certain value) outside stability region, even if our solution of interest has effective inside it.
This is manifested as our solution changing on a long timescale, but depending on short time-scale terms in equation.
Solution: backward-differentiation formulas, or implicit formulas, that include , unlike explicit formulas. (Implicit numerical method)
These require solving a (generally) nonlinear equation (or a system of equations for PDEs). And this may need to be solved numerically itself often, for example by Newton's method.
Aside. We've been discussing IVPs here only.
Boundary value problems (BVP) also important. Nonlinear BVP may not have unique solutions! (unlike IVP).
Can use chebfun to solve.
Books:
Griffiths & Higham, 2010 - introduction to numerical ODE
Iserles, 2009 - includes connection to PDEs
LeVeque, 2007 - likewise
Hairer, Norsett & Wanner I & II - authoritative; full of fun and historical remarks
Ascher & Petzold 1998 - also includes DAEs (differential-algebraic equations, which combine ODEs and nonlinear eqs)
Deuflhard & Bornemann, 2002
Trefethen, old online textbook (http://people.maths.ox.ac.uk/trefethen/pdetext.html)