You are on page 1of 12

ORDINARY

DIFFERENTIAL
EQUATIONS
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
What is differential equations?
An equation involving derivatives of one or more dependent
variables with respect to one or more independent variables.
2
2
2
0
d y dy
xy
dx dx
| |
+ =
|
\ .
4 2
4 2
5 3 sin
d x d x
x t
dt dt
+ + =
2 2 2
2 2 2
0
u u u
x y z
c c c
+ + =
c c c
Ordinary differential equations
Partial differential equations
A differential equation involving
ordinary derivatives of one or
more dependent variables with
respect to a single independent
variable.
2
2
2
0
d y dy
xy
dx dx
| |
+ =
|
\ .
4 2
4 2
5 3 sin
d x d x
x t
dt dt
+ + =
A differential equation involving
partial derivatives of one or
more dependent variables with
respect to a more than one
independent variable.
2 2 2
2 2 2
0
u u u
x y z
c c c
+ + =
c c c
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
ORDINARY DIFFERENTIAL EQUATIONS
Standard notations
Example: x is independent variable and y is function of x.
First order differentiation:
Second order differentiation :
nth order differentiation :
dy
dx
2
2
d y
dx
y
'
y
''
n
n
d y
dx
( ) n
y
Order
Order of the highest ordered derivative involved in a differential
equations.
3 2
3 2
4 tan
d x d x
t
dt dt
+ = ( )
2
0 y y
' '
+ =
Third order First order
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
We have Need to solve for y
Initial Value Problem (IVP)

Associated to first-order ODE
Boundary Value Problem (BVP)
-
Associated to second-order ODE
-----------------------------------------------------------------------------------------
Initial Value Problem
(IVP)
Taylor series
Runge-Kutta
( , ) y f x y
'
=
One-step method
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Taylor series
Eulers method
(1
st
order Taylor series)
2
nd
order Taylor series
method
) (
!
) (
! 2
) ( ) ( ) (
) (
2
1 i
n
n
i i i i
x y
n
h
x y
h
x y h x y x y + +
' '
+
'
+ =
+

i i i
y h y y
'
+ =
+1
i
0
1

n
i
x
i
y
exact |error|
given
0
y
i
0
1

n
i
x
i
y
exact |error|
given
0
y
2
1
2!
i i i i
h
y y hy y
+
' ''
= + +
1. Find
i
y
' '
Example: (Taylor series)
2.
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Runge-Kutta
2
nd
order
4
th
order
-----------------------------------------------------------------------------------------
Improved Euler Method
(Midpoint method)
Heuns Method
Modified Euler Method
Table
i
i
x
i
y
1
k
2
k exact |error|
0
1

n
given
0
y
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
where
where
Improved Euler Method
(Midpoint method)
where
Heuns Method
Example: (2
nd
RK)
1 2 i i
y y k
+
= +
1
( , )
i i
k hf x y =
1
2
( , )
2 2
i i
k h
k hf x y = + +
1 1 2
1 3
4 4
i i
y y k k
+
= + +
1
( , )
i i
k hf x y =
2 1
2 2
( , )
3 3
i i
k hf x h y k = + +
1 1 2
1 1
2 2
i i
y y k k
+
= + +
1
( , )
i i
k hf x y =
2 1
( , )
i i
k hf x h y k = + +
Modified Euler Method
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Table
i
i
x
i
y
1
k
2
k
exact |error|
0
1

n
given
0
y
3
k
4
k
4
th
order
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Classical 4
th
order
Runge-Kutta method
where
1 1 2 3 4
1
( 2 2 )
6
i i
y y k k k k
+
= + + + +
1
1
2
2
3
4 3
( , )
( , )
2 2
( , )
2 2
( , )
i i
i i
i i
i i
k hf x y
k h
k hf x y
k h
k hf x y
k hf x h y k
=
= + +
= + +
= + +
Example: (4
th
RK)
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Boundary Value Problem
(BVP)
Without differentiation
With differentiation
Solve these two problems using finite-difference
1 1
'
2
i i
i
y y
y
h
+

~
1 1
2
2
"
i i i
i
y y y
y
h
+
+
~
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
Without differentiation
1 Change the problem to finite difference form
x and substitute value of h. Rearrange.
3 Substitute i = 1,2,,n - 1
Rewrite in matrix form and solve for system
of linear equations.
Example: (Without differentiation)
2
h
DEPARTMENT OF MATHEMATICS AND STATISTICS, FSTPi
2 Change the problem to finite difference form
x and substitute value of h. Rearrange.
2
h
4 Substitute i = 0,1,2,,n
Rewrite in matrix form and solve for system
of linear equations.
Example: (With differentiation)
1 Change the boundary conditions to finite difference form
With differentiation

You might also like