Title: Lecture 23 Systems of Ordinary Differential Equations IVP
1Lecture 23 - Systems of Ordinary Differential
Equations - IVP
2Systems of Ordinary Differential Equations - IVP
- Higher order differential equations
- Systems of equations
- Taylor series
- Euler Method
- Runge Kutta
- Stiff Equations
3Higher order differential equations
Higher order initial value problems can be
transformed from a higher order equation into a
system of first-order differential equations.
4Higher order differential equations
Rewrite the equation so x is form
5Higher-order Differential Equations
Rewrite the equations in the form of series of
first order differential equations
6Higher-order Differential Equations
Consider a simple second order differential
equation for a vibrating spring mass
system. The initial conditions are x(0) x0
and x(0) 0.
7Higher-order Differential Equations
Rewrite the equation The first derivative can
be written as
8Higher-order Differential Equations
The equation can be written as a set of two first
order equations. The boundary conditions,
x(0) x0 and v(0) 0.
9Higher-order Differential Equations
The first order equations can be solved using the
techniques we developed in one dimensional
initial value problems.
- Taylor Series
- Euler
- Runge-Kutta
- Adam Bashforth
10System of Initial Value Problems
The equations can be defined as
11System of Initial Value Problems
The single step, Euler
12Higher-order Differential Example Problem
Consider a simple second order differential
equation for a vibrating spring mass
system. The initial conditions are x(0) 0.2,
x(0) 0 and Dt 0.02. (Exact solution 0.2
cos(2t))
13Example Problem
The equation can be written as a set of two first
order equations. The boundary conditions,
x(0) 0.2 and v(0) 0.
14Example Problem
The breakdown of the Euler method.
15Example Problem
- The example
- There is problem with the step sizes causing an
instability.
16Example Problem
The problem is that an instability is created by
the delay in the update of the velocity step. An
alternative is to use a more accurate scheme such
as the fourth order Runge Kutta.
17Example Problem
The equations are defined as functions. The
boundary conditions, x(0) 0.2 and v(0) 0.
18Example Problem
The components of the Runge-Kutta ki,j
where i is the step and j is the function.
19Example Problem
The upgraded single step Use the initial
values x(0) 0.02 and v(0) 0
204th Order Runge-Kutta Method Example
The values for the step size where,
214th Order Runge-Kutta Method Example
- The points are not delayed as the Euler method.
- Accuracy is dependent on the step size of the
problem.
22Multi-step Methods
The principle behind a multi-step method is to
use past values, t, y , dn-1y/dxn-1 to construct
a polynomial that approximate the derivative
function.
23Multi-step Methods
The three point Adam Bashforth
24Multi-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.
25Example Problem
The equations are defined as functions. The
boundary conditions, x(0) 0.2 and v(0) 0.
26Example Problem
The equations are defined as functions..
27Adam Bashforth 3 Point Example
The values for the step size
28Adam Bashforth 3 Point Example
- The program is initialized by a 4th order
Runge-Kutta. - Accuracy is dependent on the step size of the
problem.
29Implicit 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.
30Implicit Multi-step Methods
Adams third order Predictor-Corrector
scheme. Use the Adam Bashforth three point
explicit scheme for the initial guess.
31Implicit Multi-step Methods
Adams third order Predictor-Corrector
scheme. Use the Adam Moulton three point
implicit scheme to take a second step.
32Systems of ODE - Initial Value Problems
These techniques can work on large systems of
equations to do series of integration of the
problem. The equations can be solved as a series
of ODEs.
33Systems of ODE - Initial Value Problems
Given a set of initial values, y1,y2,y1 and y2.
34Systems of ODE - Initial Value Problems
The problem is constructed of 4 first order ODEs
with four variables and initial conditions.
35Systems of ODE - Initial Value Problems
The problem can be written in matrix format and
solved accordingly.
36Systems of ODE - Initial Value Problems
Forcing functions can be added and setup to solve
the equations.
37Stiff Differential Equation
All the methods for approximating the solution
to initial value problems have error terms that
involve higher order derivative of the solution.
If the derivatives can be reasonably bounded, the
method will give a predicable error bound that
can be used to estimate the accuracy of the
technique.
38Stiff Differential Equation
Problems arise when the magnitude of the
derivative increases but the solution does not.
The error will grow so large and it will dominate
the calculation. For initial value problems for
which this is likely to occur are called Stiff
Equations. Stiff equations are characterized as
those whose exact solution have an exponential
and the higher order derivatives do not decay
quickly.
391-D Stiffness Equation
Use a step size of Dt 0.1 and y(0) 1/3.
Exact solution is y (1/3) exp(-30t).
40Summary
- Systems of ODEs
- Taylor Series
- Euler
- Runge Kutta
- Adam Bashforth
- Predictor Corrector
- Stiff Differential Equations
41Homework
- Check the homework webpage