Beruflich Dokumente
Kultur Dokumente
Introduction to Ordinary
Differential Equations
Mr Peter Bier
Ordinary Differential Equations
Slide number 2
Where do ODEs arise
Slide number 3
Example Newtons 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
d 2q
q ml 2 mgl sin q
2
dt
rearrange and divide
through by ml 2
l
where
d q
2
2
g
2
2
sin q 0 l
dt
mg
This equation is very difficult to solve.
Slide number 5
Notation and Definitions
Order
Linearity
Homogeneity
Initial Value/Boundary value
problems
Slide number 6
Order
d 2 y dy
.
2
0 2nd order
dt dt
dx d 3x
x 3 3rd order
dt dt
Slide number 7
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 8
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 9
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 10
Linearity Special Property
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 11
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 12
Life is mostly linear!!!
Most ODEs that arise in engineering are linear with
constant coefficients.
In many cases they are approximate versions of more
complex nonlinear models but they are sufficiently
accurate for most purposes. Often they work OK for small
amplitude disturbances but for large amplitude behaviour
nonlinearities start to have some effect.
For linear systems the qualitative behaviour is
independent of amplitude.
The coefficients in the ODE correspond to system
parameters and are usually constant.
Sometimes nonlinearities are important and there have
been some important failures because nonlinearities
were not understood e.g. the collapse of the Tacoma
Narrows bridge.
Slide number 13
Approximately Linear
Swinging pendulum example
The accurate non-linear equation for a
swinging pendulum is:
d 2q
2
2
sin q 0
dt
But for small angles of swing this can be
approximated by the linear ODE:
d 2q
2
2
q 0
dt
Slide number 14
Homogeniety
Slide number 15
Initial Value/Boundary value
problems
Problems that involve time are represented
by an ODE together with initial values.
Slide number 16
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 17
Example
2nd order
d 2q
2
2
sin q 0 Nonlinear
dt
Homogeneous
dq
( 0 ) 0 , (0) 0 Initial value problem
dt
2nd order
d q
2
2
2
q 0 Linear
dt Homogeneous
dq
( 0 ) 0 , (0) 0 Initial value problem
dt
Slide number 18
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 19
Direct Integration
Slide number 20
Direct Integration Example
Slide number 22
Bending of a beam - Solution
d 2M
2
w
dx
Step 1: dM
Integrate
wx A
dx
Step 2:
Integrate again to 1 2
M wx Ax B
obtain the general 2
solution:
Slide number 23
Bending of a beam - Solution
Step 3:
Use the boundary conditions to obtain the
particular solution.
1 2
M wx Ax B
2
M (0) 0 1
0 w 02 A 0 B B 0
2
M (l ) 0 1 1
0 w l 2 A l B A wl
2 2
Step 4:
Substitute back the values for A and B
1 2 1 1
M wx wlx M wx(l x)
2 2 2
Slide number 24
Solution Methods - Separation
dy
g (t )h ( y )
dt
Slide number 25
Separation General Idea
First Separate:
dy
g (t )dt
h( y )
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 27
y Ae cos(t )
Cooling of a cup of coffee
Amount of heat in a cup of coffee:
heat volume specific heat
Q VcT
density temperature
Slide number 28
Cooling of a cup of coffee
Newtons law of cooling:
Heat lost to the surrounding air is
proportional to temperature difference
between the object and the air
Slide number 30
Cooling of a cup of coffee -
Solution
dT
(T TRoom )
dt
Step 1: dT
dt
Separate (T TRoom )
T TRoom e t c
t where
T TRoom Ae
A ec
Slide number 31
Cooling of a cup of coffee -
Solution
T TRoom Ae t T (0) TInitial
Step 3:
Use Initial TInitial TRoom Ae 0
Condition
A (TInitial TRoom )
Step 4:
Substitute T T t
Room (TInitial TRoom ) e
back to
obtain final
answer
Slide number 32
Solution Methods - Integrating
Factor
The integrating factor method is used for
nonhomogeneous linear 1st order equations
dy
y 1 y ( 0) 2
dt
Slide number 34
Integrating Factor Example
Product Rule:
d ( f . y) dy df
f y
dt dt dt
Slide number 35
Integrating Factor Example
f et
Slide number 36
Integrating Factor Example
Slide number 37
Integrating Factor Example
y 1 Ce t
y (0) 2 1 Ce 0 2
1 C 2
C 1
Substitute back to obtain the final solution
y 1 e t
Slide number 38
How do we calculate the
integrating factor?
Let us now pretend we do not know what
the integrating factor should be
Call it and use it to multiply the ODE
from the previous example
dy
y
dt
To make the LHS of this equation look
like the RHS of the Product Rule we
must choose
d
dt
Slide number 39
How do we calculate the
integrating factor?
Then the ODE becomes
dy d
y
dt dt
Now using the product rule in reverse the
LHS can be written as a single term (a
very clever trick)
d ( y )
dt
Slide number 40
How do we calculate the
integrating factor?
Now we can integrate once we know
We can separate to find
d d
dt
dt
ln t c e t c
Ae t
The convention is to put A = 1. It appears
in every term of the ODE, and therefore
can be divided out. This gives the
integrating factor:
et
Slide number 41
Finding the integrating
factor in general
Given the general form of a
nonhomogeneous 1st order
equation:
dy
g (t ) y f (t )
dt
y(0) y 0
Slide number 42
Finding the integrating
factor in general
Step 1: Multiply by :
dy
g (t ) y f (t )
dt
Step 2: Compare with the RHS of the
Product Rule and set up equation for :
d
g (t )
dt
Step 3: Use separation to solve for :
d
g (t )dt
ln g (t )dt
Slide number 44
Finding the integrating
factor in general
Notes:
After you have been through the process a
few times then skip some of the steps. For
example you can remember the formula for
the integrating factor, you do not have to re-
derive it every time.
e g ( t ) dt
1t2
e 2
Slide number 46
Solving an example using the
integrating factor method
Step 3: Multiply by the integrating factor:
1 2 dy 1 2 1 2
e 2 ty te 2
t t t
e2
dt
Step 4: Use the reverse Product Rule:
1 2
t
d [e y ]
2 1 2
te 2
t
dt
Step 5: Integrate and make explicit in y:
y te dt C e
1 2 1 2 1 2
C
t t t
e 2 2 2
12 t 2
y 1 Ce
Slide number 47
Solving an example using the
integrating factor method
Step 6: Use the initial conditions to find the
exact solution:
y (0) 0 1 Ce 0 0
1 C 0
C 1
Step 7: Substitute back into the original
equation:
12 t 2
y 1 e
Slide number 48
Exponential substitution
t
y Ce
Slide number 49
Characteristic Equations
Slide number 50
Exponential Trial - Example
y 5 y 0 Try y Aet
Ae t 5 Ae t 0
Cancelling out Aet gives the characteristic
equation
5 0 5
y Ae 5t
Slide number 51
Solving Guide
Slide number 52
Solving Guide
Slide number 53
Solving Guide
Slide number 54