Introduction To ODE

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

Introduction to Ordinary

Differential Equations

Dr. C. E. Ebieto
Ordinary Differential Equations

◼ A differential equation is an
equation for a function that
relates the values of the function
to the values of its derivatives.

Slide number 2
Ordinary Differential Equations

◼ An ordinary differential equation


(ODE) is a differential equation
for a function of a single
variable, e.g., x(t), while a partial
differential equation (PDE) is a
differential equation for a
function of several variables,
e.g., v(x, y, z, t).

Slide number 3
Ordinary Differential Equations

◼ An ODE contains ordinary


derivatives and a PDE contains
partial derivatives. Typically,
PDE’s are much harder to solve
than ODE’s.

Slide number 4
Ordinary Differential Equations

◼ Where do ODEs arise?


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

Slide number 5
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 6
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 7
Notation and Definitions

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

Slide number 8
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 9
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 10
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 11
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 12
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 13
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 14
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 15
Example

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

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

Slide number 16
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 17
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 18
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 19
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 20
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 21
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 22
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 23
 y = Ae −cos(t )
Thank You

Slide number 24

You might also like