Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Introduction to Ordinary

Differential Equations

DR. ALI A ATI


Ordinary Differential Equations

◼ Where do ODEs arise?


◼ Notation and Definitions
◼ Solution methods for 1st order
ODEs

Slide number 2
Where do ODE’s arise

◼ All branches of Engineering


◼ Economics
◼ Biology and Medicine
◼ Chemistry, Physics etc
Anytime you wish to find out how
something changes with time (and
sometimes space)

Slide number 3
Example – Newton’s Law of
Cooling
◼ This is a model of how the
temperature of an object changes as
it loses heat to the surrounding
atmosphere:
Temperature of the object: TObj Room Temperature: TRoom

Newton’s laws states: “The rate of change in the temperature of an


object is proportional to the difference in temperature between the object
and the room temperature”
Form
dTObj
ODE = − (TObj − TRoom )
Solve dt
ODE TObj = TRoom + (Tinit − TRoom )e −t
Where Tinit is the initial temperature of the object.
Slide number 4
Notation and Definitions

◼ Order
◼ Linearity
◼ Homogeneity
◼ Initial Value/Boundary value
problems

Slide number 5
Order

◼ The order of a differential


equation is just the order of
highest derivative used.

d 2 y dy
.
2
+ =0 2nd order
dt dt

dx d 3x
=x 3 3rd order
dt dt

Slide number 6
Linearity
◼ The important issue is how the
unknown y appears in the equation.
A linear equation involves the
dependent variable (y) and its
derivatives by themselves. There
must be no "unusual" nonlinear
functions of y or its derivatives.
◼ A linear equation must have constant
coefficients, or coefficients which
depend on the independent variable
(t). If y or its derivatives appear in the
coefficient the equation is non-linear.

Slide number 7
Linearity - Examples

dy
+ y = 0 is linear
dt
dx
+ x 2 = 0 is non-linear
dt
dy 2
+t = 0 is linear
dt
dy 2
y + t = 0 is non-linear
dt

Slide number 8
Linearity – Summary

Linear Non-linear

2y y2 or sin( y )

dy dy
y
dt dt

(2 + 3 sin t) y (2 − 3 y 2 ) y
2
dy  dy 
t  
dt  dt 

Slide number 9
Linearity – Special Property

If a linear homogeneous ODE has solutions:

y = f (t ) and y = g (t )

then:

y = a  f (t ) + b  g (t )
where a and b are constants,

is also a solution.

Slide number 10
Linearity – Special Property

Example:
d2y
2
+ y = 0 has solutions y = sin t and y = cos t
dt
2
d (sin t )
Check
2
+ sin t = − sin t + sin t = 0
dt
d 2 (cos t )
2
+ cos t = − cos t + cos t = 0
dt
Therefore y = sin t + cos t is also a solution:

d 2 (sin t + cos t )
Check
2
+ sin t + cos t
dt
= − sin t − cos t + sin t + cos t = 0
Slide number 11
Homogeniety

◼ Put all the terms of the equation


which involve the dependent variable
on the LHS.
◼ Homogeneous: If there is nothing
left on the RHS the equation is
homogeneous (unforced or free)
◼ Nonhomogeneous: If there are
terms involving t (or constants) - but
not y - left on the RHS the equation
is nonhomogeneous (forced)

Slide number 12
Example

dv ◼ 1st order
= g ◼ Linear
dt ◼ Nonhomogeneous
v(0) = v0 ◼ Initial value problem

◼ 2nd order
d 2M
2
=w ◼ Linear
dx ◼ Nonhomogeneous
M (0) = 0 ◼ Boundary value
and problem
M (l ) = 0

Slide number 13
Example

◼ 2nd order
d 2
2
+  2
sin  = 0 ◼ Nonlinear
dt
◼ Homogeneous
d
θ( 0 ) = θ0 , (0) = 0 ◼ Initial value problem
dt

◼ 2nd order
d 
2

2
+  2
 =0 ◼ Linear
dt ◼ Homogeneous
d
θ( 0 ) = θ0 , (0) = 0 ◼ Initial value problem
dt

Slide number 14
Solution Methods - Direct
Integration
◼ This method works for equations
where the RHS does not depend on
the unknown:
◼ The general form is:
dy
= f (t )
dt
d2y
2
= f (t )
dt

dny
n
= f (t )
dt
Slide number 15
Direct Integration

◼ y is called the unknown or


dependent variable;
◼ t is called the independent variable;
◼ “solving” means finding a formula for
y as a function of t;
◼ Mostly we use t for time as the
independent variable but in some
cases we use x for distance.

Slide number 16
Direct Integration – Example

Find the velocity of a car that is


accelerating from rest at 3 ms-2:
dv
=a=3
dt
 v = 3t + c

If the car was initially at rest we


have the condition:
v ( 0) = 0  0 = 3  0 + c  c = 0
 v = 3t
Slide number 17
Solution Methods - Separation

The separation method applies only to


1st order ODEs. It can be used if the
RHS can be factored into a function of t
multiplied by a function of y:

dy
= g (t )h ( y )
dt

Slide number 18
Separation – General Idea

First Separate:
dy
= g (t )dt
h( y )

Then integrate LHS with


respect to y, RHS with respect
to t.
dy
 h( y ) =  g (t )dt + C
Slide number 19
Separation - Example

dy
= y sin(t )
dt
Separate:
1
dy = sin(t )dt
y
Now integrate:
1
 y dy =  sin(t )dt
 ln( y ) = − cos(t ) + c
 y = e −cos(t ) + c

Slide number 20
 y = Ae −cos(t )

You might also like