CISE301_Topic8L1 1
SE301: Numerical Methods
Topic 8
Ordinary Differential Equations (ODEs)
Lecture 28-36
KFUPM
(Term 101)
Section 04
Read 25.1-25.4, 26-2, 27-1
CISE301_Topic8L1 2
Objectives of Topic 8
 Solve Ordinary Differential Equations
(ODEs).
 Appreciate the importance of numerical
methods in solving ODEs.
 Assess the reliability of the different
techniques.
 Select the appropriate method for any
particular problem.
CISE301_Topic8L1 3
Outline of Topic 8
 Lesson 1: Introduction to ODEs
 Lesson 2: Taylor series methods
 Lesson 3: Midpoint and Heun’s method
 Lessons 4-5: Runge-Kutta methods
 Lesson 6: Solving systems of ODEs
 Lesson 7: Multiple step Methods
 Lesson 8-9: Boundary value Problems
CISE301_Topic8L1 4
Lecture 28
Lesson 1: Introduction to ODEs
CISE301_Topic8L1 5
Learning Objectives of Lesson 1
 Recall basic definitions of ODEs:
 Order
 Linearity
 Initial conditions
 Solution
 Classify ODEs based on:
 Order, linearity, and conditions.
 Classify the solution methods.
CISE301_Topic8L1 6
Partial Derivatives
u is a function of
more than one
independent variable
Ordinary Derivatives
v is a function of one
independent variable
Derivatives
Derivatives
dt
dv
y
u


CISE301_Topic8L1 7
Partial Differential Equations
involve one or more
partial derivatives of
unknown functions
Ordinary Differential Equations
involve one or more
Ordinary derivatives of
unknown functions
Differential Equations
Differential
Equations
1
6
2
2

 tv
dt
v
d
0
2
2
2
2






x
u
y
u
CISE301_Topic8L1 8
Ordinary Differential Equations
)
cos(
)
(
2
)
(
5
)
(
)
(
)
(
:
2
2
t
t
x
dt
t
dx
dt
t
x
d
e
t
v
dt
t
dv
Examples
t





Ordinary Differential Equations (ODEs) involve one or
more ordinary derivatives of unknown functions with
respect to one independent variable
x(t): unknown function
t: independent variable
CISE301_Topic8L1 9
Example of ODE:
Model of Falling Parachutist
The velocity of a falling
parachutist is given by:
velocity
v
t
coefficien
drag
c
mass
M
v
M
c
t
d
v
d
:
:
:
8
.
9 

CISE301_Topic8L1 10
Definitions
v
M
c
dt
dv

 8
.
9
Ordinary
differential
equation
CISE301_Topic8L1 11
Definitions (Cont.)
v
M
c
t
d
v
d

 8
.
9 (Dependent
variable)
unknown
function to be
determined
CISE301_Topic8L1 12
Definitions (Cont.)
v
M
c
t
d
v
d

 8
.
9
(independent variable)
the variable with respect to which
other variables are differentiated
CISE301_Topic8L1 13
Order of a Differential Equation
1
)
(
2
)
(
)
(
)
cos(
)
(
2
)
(
5
)
(
)
(
)
(
:
4
3
2
2
2
2
















t
x
dt
t
dx
dt
t
x
d
t
t
x
dt
t
dx
dt
t
x
d
e
t
x
dt
t
dx
Examples
t
The order of an ordinary differential equation is the order
of the highest order derivative.
Second order ODE
First order ODE
Second order ODE
CISE301_Topic8L1 14
A solution to a differential equation is a function that
satisfies the equation.
Solution of a Differential Equation
0
)
(
)
(
:

 t
x
dt
t
dx
Example
0
)
(
)
(
)
(
:
Proof
)
(












t
t
t
t
e
e
t
x
dt
t
dx
e
dt
t
dx
e
t
x
Solution
CISE301_Topic8L1 15
Linear ODE
1
)
(
)
(
)
(
)
cos(
)
(
2
)
(
5
)
(
)
(
)
(
:
3
2
2
2
2
2
















t
x
dt
t
dx
dt
t
x
d
t
t
x
t
dt
t
dx
dt
t
x
d
e
t
x
dt
t
dx
Examples
t
An ODE is linear if
The unknown function and its derivatives appear to power one
No product of the unknown function and/or its derivatives
Linear ODE
Linear ODE
Non-linear ODE
CISE301_Topic8L1 16
Nonlinear ODE
1
)
(
)
(
)
(
2
)
(
)
(
5
)
(
1
))
(
cos(
)
(
:
ODE
nonlinear
of
Examples
2
2
2
2







t
x
dt
t
dx
dt
t
x
d
t
x
dt
t
dx
dt
t
x
d
t
x
dt
t
dx
An ODE is linear if
The unknown function and its derivatives appear to power one
No product of the unknown function and/or its derivatives
CISE301_Topic8L1 17
Solutions of Ordinary Differential
Equations
0
)
(
4
)
(
ODE
the
to
solution
a
is
)
2
cos(
)
(
2
2



t
x
dt
t
x
d
t
t
x
Is it unique?
solutions.
are
constant)
real
a
is
(where
)
2
cos(
)
(
form
the
of
functions
All
c
c
t
t
x 

CISE301_Topic8L1 18
Uniqueness of a Solution
b
x
a
x
t
x
dt
t
x
d




)
0
(
)
0
(
0
)
(
4
)
(
2
2

In order to uniquely specify a solution to an nth
order differential equation we need n conditions.
Second order ODE
Two conditions are
needed to uniquely
specify the solution
CISE301_Topic8L1 19
Auxiliary Conditions
Boundary Conditions
 The conditions are not at
one point of the
independent variable
Initial Conditions
 All conditions are at one
point of the independent
variable
Auxiliary Conditions
CISE301_Topic8L1 20
Boundary-Value and
Initial value Problems
Boundary-Value Problems
 The auxiliary conditions are
not at one point of the
independent variable
 More difficult to solve than
initial value problems
5
.
1
)
2
(
,
1
)
0
(
2 2




 
x
x
e
x
x
x t



Initial-Value Problems
 The auxiliary conditions
are at one point of the
independent
variable
5
.
2
)
0
(
,
1
)
0
(
2 2




 
x
x
e
x
x
x t




same different
CISE301_Topic8L1 21
Classification of ODEs
ODEs can be classified in different ways:
 Order
 First order ODE
 Second order ODE
 Nth order ODE
 Linearity
 Linear ODE
 Nonlinear ODE
 Auxiliary conditions
 Initial value problems
 Boundary value problems
CISE301_Topic8L1 22
Analytical Solutions
 Analytical Solutions to ODEs are available
for linear ODEs and special classes of
nonlinear differential equations.
CISE301_Topic8L1 23
Numerical Solutions
 Numerical methods are used to obtain a
graph or a table of the unknown function.
 Most of the Numerical methods used to
solve ODEs are based directly (or
indirectly) on the truncated Taylor series
expansion.
CISE301_Topic8L1 24
Classification of the Methods
Numerical Methods
for Solving ODE
Multiple-Step Methods
Estimates of the solution
at a particular step are
based on information on
more than one step
Single-Step Methods
Estimates of the solution
at a particular step are
entirely based on
information on the
previous step

SE301 Numerical Methods Topic 8 Ordinary Differential Equations