Title: Lecture 21 Ordinary Differential Equations IVP
1Lecture 21 - Ordinary Differential Equations -
IVP
2Lectures Goals
ODE Methods
- 4th order Runge-Kutta Method
- Multi-step Method
- Adam Bashforth
- Adam Moulton Method
- Predictor-Corrector Method
- Stability
3Runge-Kutta Methods
The Runge-Kutta methods are higher order
approximation of the basic forward integration.
These methods provide solutions which are
comparable in accuracy to Taylor series solution
in which higher order derivatives are retained.
It should be noted that the equations are not
need to be linear.
4Runge-Kutta Methods
5The 4th order Runge-Kutta
This is a fourth order function that solves an
initial value problems using a four step program
to get an estimate of the Taylor series through
the fourth order. This will result in a local
error of O(Dh5) and a global error of O(Dh4)
6The 4th order Runge-Kutta
The general form of the equations
74th-orderRunge-Kutta Method
f2
f4
f3
f1
xi
xi h/2
xi h
8Runge-Kutta Method (4th Order) Example
Consider Exact
Solution The initial condition is The step
size is
9The 4th order Runge-Kutta
The example of a single step
10Runge-Kutta Method (4th Order) Example
The values for the 4th order Runge-Kutta method
11Runge-Kutta Method (4th Order) Example
The values are equivalent to those of the exact
solution. If we were to go out to x5. y(5)
-111.4129 (-111.4132) The error is small relative
to the exact solution.
12Runge-Kutta Method (4th Order) Example
A comparison between the 2nd order and the 4th
order Runge-Kutta methods show a slight
difference.
13The 4th order Runge-Kutta
Higher order differential equations can be
treated as if they were a set of first-order
equations. Runge-Kutta type forward integration
solutions can be obtain. A more direct solution
can be obtained by repeating the whole process
used in first-order cases.
14The 4th order Runge-Kutta
The general form of the equations
15The 4th order Runge-Kutta
The step sizes are
The next step would be
16One Step Method
Up until this point we have dealt with These
methods are called single step methods, because
they use only the information from the previous
step.
- Euler Method
- Modified Euler/Midpoint
- Runge-Kutta Methods
17One Step Method
The techniques are defined as
- These methods allow us to vary the step size.
- Use only one initial value
- After each step is completed the past step is
forgotten We do not use this information.
18Multi-Step Methods
The principle behind a multi-step method is to
use past values, y and/or dy/dx to construct a
polynomial that approximate the derivative
function.
19Multi-Step Methods
The method comes from integrating the functions.
20Multi-Step Methods
The integral can be represented.
21Multi-Step Methods
The integral can be represented.
22Multi-Step Methods
These methods are known as explicit schemes
because the use of current and past values are
used to obtain the future step. The method is
initiated by using either a set of know results
or from the results of a Runge-Kutta to start the
initial value problem.
23Adam Bashforth Method (4th Point) Example
Consider Exact
Solution The initial condition is The step
size is
244 Point Adam Bashforth
From the 4th order Runge Kutta The 4 Point
Adam Bashforth is
254 Point Adam Bashforth
The results are Upgrade the values
264 Point Adam Bashforth Method - Example
The values for the Adam Bashforth
274 Point Adam Bashforth Method - Example
The explicit Adam Bashforth method gave solution
gives good results without having to go through
large number of calculations.
28Multi-Step Methods
There are second set of multi-step methods, which
are known as implicit methods. The implicit
methods use the future steps to modify the future
steps. What is used to do iterative method,
which will make an initial guess and use it until
stability is reached. The method is initiated by
using either a set of know results or from the
results of a Runge-Kutta to start the initial
value problem.
29Implicit Multi-Step Methods
The main method is Adam Moulton Method
30Implicit Multi-Step Methods
The method uses what is known as a
Predictor-Corrector technique. It uses the
explicit scheme to estimate the initial guess and
uses the value to guess the future y and dy/dx
f(x,y) values. Using these results, the Adam
Moulton method can be applied.
31Implicit Multi-Step Methods
Adams third order Predictor-Corrector
scheme. Use the Adam Bashforth three point
explicit scheme for the initial guess. Use
the Adam Moulton three point implicit scheme to
take a second step.
32Adam Moulton Method (3th Point) Example
Consider Exact
Solution The initial condition is The step
size is
334 Point Adam Bashforth
From the 4th order Runge Kutta The 3 Point
Adam Bashforth is
343 Point Adam Moulton Predictor-Corrector Method
The results of explicit scheme is The
functional values are
353 Point Adam Moulton Predictor-Corrector Method
The results of implicit scheme is The
functional values are
363 Point Adam Moulton Predictor-Corrector Method
The values for the Adam Moulton
373 Point Adam Moulton Predictor-Corrector Method
The implicit Adam Moulton method gave solution
gives good results without using more than a
three points.
38Numerical Stability
- Amplification or decay of numerical errors
- A numerical method is stable if error incurred at
one stage of the process do not tend to magnify
at later stages - Ill-conditioned differential equation
- -- numerical errors will be magnified
regardless - of numerical method
- Stiff differential equation
- -- require extremely small step size to
achieve - accurate results
39Stability
40Explicit Euler Method
- Stability criterion
- Region of absolute stability
41Stability
- Explicit Euler method
- Second-order Adams-Bashforth
- Second-order Adams-Moulton
42Summary
- 4th order Runge-Kutta Method
- Higher order Runge-Kutta Methods
- Explicit Multi-Step Methods
- Implicit Multi-Step Methods
- Stability
43Homework
- Check the Homework webpage