Motivation
Euler's method
Runge-Kutta method
Applications:
SIR model
Van der Pol oscillator
Double pendulum
Many differential equations of practical interest are nonlinear and do not have a closed-form analytical solution.
Examples:
Van der Pol oscillator
Double pendulum
Though apparently complicated such systems are of the general form
Methods for systems are essentially the same as those for the scalar DE
We'll study a few key concepts on numerical solution of
IVP: , , find solution over interval
Discretize the interval with step size ,
The slope is sampled at points , notation
The derivative is approximated, e.g., Euler's method ,
An approximate solution is built up iteratively
Truncation error. Since is an approximation of , an error is introduced at each step of the iteration. The truncation error can be estimated from a Taylor series
Cummulative error (global truncation error)
Numerical methods use floating point numbers, a finite-precision approximation of reals
A numerical method that amplifies inherent rounding error is unstable, e.g.,
Consider approximated by Euler's method
Euler's method error
If errors get amplified, Euler's method is unstable, stable
Euler's method approximates the average slope over interval by , i.e., at the start of the interval.
Runge-Kutta idea: approximate the average slope by a weighted average
The above method is one particular example of a large class of Runge-Kutta algorithms
The (global) truncation error is , much more accurate than that for Euler's method () since can be considered small (subunitary)
Recall the SIR epidemic model: , ,
|
|
|
|
Choose
|
|