Unlock access to all the studying documents.
View Full Document
Differential Equations
for Engineers:
the Essentials
Class 16 notes
Agenda: Class 16
Review of Computing Project #2
Lectures:
Systems of First Order ODEs
Nomenclature
Homework Assignment 16
Systems of First Order ODEs
Nomenclature
Nomenclature
=
−
)(
)(
...
)(
)(
)(
1
2
1
tx
tx
tx
tx
tx
n
n
=
−
−−
−
−
),,…,,,(
),,…,,,(
…
),,…,,,(
),,…,,,(
),(
121
1211
1212
1211
nnn
nnn
nn
nn
xxxxtf
xxxxtf
xxxxtf
xxxxtf
xtf
Systems of First Order ODEs
Numerical Methods
Objective
Provide a basic understanding of methods employed in numerical
Iterative Numerical Integration
To solve
we break the integration into small, sequential time steps. Let
Euler Method
The simplest method is due to Euler:
Example:
Euler Method (2)
We have
0
2
1112
0001
)1()1(
)1(
xhxhhxxx
xhhxxx
−=−=−=
−=−=
Euler Method (3)
The exact solution is so the Euler Method converges to the
exact solution as the number of time steps increases
(equivalently, as the time step is reduced).
Runge – Kutta Method
In the widely-used Runge –Kutta Method, the integral equation
is approximated by
+
++= ht
t
nn
n
n
dtxtfxx ),(
1
Runge – Kutta Method (2)
Note that if does not depend on then the Runge –Kutta
Method reduces to
++++
+=
+6
))())2/((4)(
1
htfhtftf
hxx nnn
nn
Runge – Kutta Method (3)
For this example
Runge – Kutta Method (4)
where
Note the similarity with the exponential power series.
432 )(
24
1
)(
6
1
)(
2
1hhhh
−+−=
Accuracy Evaluation
We can use these expressions to determine the accuracy of the numerical
integrations as a function of the number of steps N(equivalently, step size h ).
For the case , the next chart presents the accuracy figures.
Fractional Error Calculation
steps
Fractional error in
Euler Method
Fractional error in
Runge –Kutta
Method
2 3.21 x 10-1 7.92 x 10-4
3 1.95 x 10-1 1.36 x 10-4
T
T
N
e
e
N
T
−
−
−
−1
( )
T
T
N
e
e
−
−
−−1
Adams – Moulton Method
The Adams –Moulton Method is also widely used.
It is called a multi-step program because it uses information from
past time steps to approximate
Variable Step Size
A computer program for the trajectory of a sounding rocket is a good
example where a variable step size is needed.
At the beginning, when the rocket is thrusting, the derivatives of mass,
velocity and altitude are high and the variables change rapidly. The
time step must be small to keep up with the action. When the rocket
Euler Method: Example
Problem: Using Euler’s method, compute the first three time steps
of the solution to the following system:
+−
−
=
)2/3exp(
)2cos(
ZVt
ZVt
dV
dt
dZ
Euler Method: Example (2)
Advice: At the start of the solution, write the algorithm for Euler’s
method as applied to the specific problem:
First time step: