« previous | Thursday, March 20, 2014 | next »
Differential Equations
Initial value problem ODE:
for .
Discretize the interval into points, and let
for
We are given a method
Last Time: Euler
Let
- Given a current approximation , we want
- Approximate
- by ODE definition
Error
In order for , we must have and the IVP must be well-posed:
- is continuous in
- must be Lipschitz continuous: for all
- must be a convex set: for every two points in the set, the line between them must lie entirely in the set.
Lipschitz Continuity
There is an easy way to verify Lipschitz continuity using partial derivatives:
Rewrite definition as
Then
Euler Method Roundoff Error
Each step has a small , so the accumulated error is
On most machines,
Then the error equation becomes
Don't make too small, otherwise accumulated error will be more than the error of
Cost of evaluating is number of steps × local cost
Let error term be bounded by .
For euler, the cost is
Euler is an order-1 method
Taylor Series Based Methods
Let's calculate for multiple values of :
n = 1
(this is Euler's method)
Our numerical method is then
n = 2
Our numerical method is then
Local Truncation Error
At each step, how far off is our approximation?
For Taylor-series-based methods, , and
n = 3
Then
Numerical Integration Methods
Given , we want to construct
So far, we have seen:
- Euler:
- Taylor:
When we evaluate the exact solution to an ODE, we solve
Let the integrand term be represented by (assume these values are approximated with accuracy ):
Modified Euler Method
Euler's method is analogous to evaluating the integral by using the left-riemann summ (a horrible approximation)
Let's use the trapezoidal rule instead:
If we let be the standard Euler method, we can simplify the expression to:
Midpoint Method
Let's try using the midpoint method; this requires evaluation at half-time-steps
Let
Heun's Method
Let's use Gaussian Quadrature with .
Then