Ordinary Differential Equations Everything is ordinary about them

Download Report

Transcript Ordinary Differential Equations Everything is ordinary about them

Ordinary Differential Equations
Everything is ordinary about them
Popping tags means
gs
dr
u
c it
lli
gi
kin
Ta
so
fr
ta
g
ng
ng
i
Ch
a
.. .
ar
eg
ul
cr
fir
e
Us
in
g
gb
ub
bl
e
w
ac
ke
ra
p
rs
25% 25% 25% 25%
Po
pp
in
A. Popping bubble
wrap
B. Using firecrackers
C. Changing tags of
regular items in a
store with tags
from clearance
items
D. Taking illicit drugs
Physical Examples
How long will it take to cool the
trunnion?
d
mc
  hA(   a ),  (0)   room
dt
END
What did I learn in the ODE class?
In the differential equation
dy
 3 y  e  x , y ( 0)  6
dx
the variable x is the
variable
A. Independent
B. Dependent
0%
en
de
ep
D
In
de
p
en
de
n
t
nt
0%
In the differential equation
dy
 3 y  e  x , y ( 0)  6
dx
the variable y is the
variable
A. Independent
B. Dependent
0%
en
de
ep
D
In
de
p
en
de
n
t
nt
0%
Ordinary differential equations
can have these many dependent
variables.
33% 33% 33%
ge
r
an
y
po
si
tiv
e
in
te
tw
o
on
e
A. one
B. two
C. any positive integer
Ordinary differential equations can
have these many independent
variables.
ge
r
yp
os
it iv
ei
nt
e
tw
o
an
e
on
A. one
B. two
C. any positive integer
33% 33% 33%
A differential equation is
considered to be ordinary if it has
one dependent variable
more than one dependent variable
one independent variable
more than one independent variable
in
d
e
n
on
nd
e
m
or
e
th
a
pe
in
de
e
on
0%
e.
..
i..
.
nt
de
e
on
n
th
a
or
e
m
0%
va
r
pe
.
ri
a
va
nt
nd
e
pe
de
e
0%
..
bl
e
0%
on
A.
B.
C.
D.
Classify the differential equation
dy
x
2  4 y  e  3, y (0)  5
dx
r
te
rm
in
ab
nl
in
ea
de
no
ea
33%
le
...
33%
r
33%
un
linear
nonlinear
undeterminable to be linear
or nonlinear
lin
A.
B.
C.
Classify the differential equation
dy
x
2  xy  e  3, y (0)  5
dx
linear
nonlinear
linear with fixed constants
undeterminable to be linear
or nonlinear
0%
0%
0%
be
s.
..
le
to
co
n
un
de
te
rm
in
ab
ed
fix
w
ith
r
...
r
nl
in
ea
no
ea
lin
ea
r
0%
lin
A.
B.
C.
D.
Classify the differential equation
dy
2
x
2  y  e  3, y (0)  5
dx
linear
nonlinear
linear with fixed constants
undeterminable to be linear
or nonlinear
0%
0%
0%
be
s.
..
le
to
co
n
un
de
te
rm
in
ab
ed
fix
w
ith
r
...
r
nl
in
ea
no
ea
lin
ea
r
0%
lin
A.
B.
C.
D.
The velocity of a body is given by
v(t )  e2t  5, t  0
Then the distance covered by the body from t=0 to t=10
can be calculated by solving the differential equation for
x(10) for
B.
dx
 e 2t  5, x(0)  5
dt
C.
dx
 2e 2t , x(0)  0
dt
D.
dx e 2t

 5t , x(0)  0
dt
2
0%
.
A.
dx
.
 e 2t  5, x(0)  0
dt
0%
0%
0%
The form of the exact solution to 2 dy  3 y  e  x , y (0)  5 is
1.
Ae
2.
Ae 1.5 x  Bxe  x
3.
Ae1.5 x  Be  x
4.
Ae1.5 x  Bxe  x
1.5 x
 Be
x
dx
25%
1
25%
25%
2
3
25%
4
END
Euler’s
Method
Euler’s method of solving ordinary differential equations
dy
 f ( x, y ), y (0)  0 states
dx
A.
yi 1  yi  f ( x, y)h
B.
yi 1  yi  f ( xi , yi )h
C.
yi 1  yi  f ( xi , yi )
D.
yi 1  f ( xi , yi )h
25%
A.
25%
25%
B.
C.
25%
D.
To solve the ordinary differential equation
dy
3  5 y 2  sin x, y (0)  5,
dx
by Euler’s method, you need to rewrite the equation as
.
dy
 sin x  5 y 2 , y (0)  5
dx
B.
dy 1
 (sin x  5 y 2 ), y (0)  5
dx 3
C.
dy 1
5 y3
 ( cos x 
), y (0)  5
dx 3
3
D.
dy 1
 sin x, y (0)  5
dx 3
0%
.
A.
0%
0%
0%
The order of accuracy for a
single step in Euler’s method is
25%
25%
25%
h4
)
O(
h3
)
O(
h2
)
O(
h)
O(h)
O(h2)
O(h3)
O(h4)
O(
A.
B.
C.
D.
25%
The order of accuracy from
initial point to final point while
using more than one step in
Euler’s method is
25%
25%
25%
O(
h4
)
O(
h3
)
O(
h2
)
O(h)
O(h2)
O(h3)
O(h4)
O(
h)
A.
B.
C.
D.
25%
END
Do you know how Runge- Kutta
th
4 Order Method works?
50%
No
Yes
No
Maybe
I take the 5th
Ye
s
A.
B.
C.
D.
50%
RUNGE-KUTTA 4TH ORDER
METHOD
Runge-Kutta
th
4
Order Method
dy
 f ( x, y ), y (0)  y0
dx
1
yi 1  yi  k1  2k2  2k3  k4 h
6
k1  f xi , yi 
1
1


k2  f  xi  h, yi  k1h 
2
2 

1
1


k3  f  xi  h, yi  k2 h 
2
2


k4  f xi  h, yi  k3h
26
END
Physical Examples
Ordinary Differential Equations
Problem:
The trunnion initially at room temperature is put in a
bath of dry-ice/alcohol. How long do I need to keep
it in the bath to get maximum contraction (“within
reason”)?
Assumptions
The trunnion is a lumped mass system.
a. What does a lumped system mean? It
implies that the internal conduction in the
trunnion is large enough that the
temperature throughout the ball is
uniform.
b. This allows us to make the assumption
that the temperature is only a function of
time and not of the location in the
trunnion.
Energy Conservation
Heat In – Heat Lost = Heat Stored
Heat Lost
Rate of heat lost
due to convection= hA(T-Ta)
h = convection coefficient (W/(m2.K))
A = surface area, m2
T= temp of trunnion at a given time, K
Heat Stored
Heat stored by mass = mCT
where
m = mass of ball, kg
C = specific heat of the ball, J/(kg-K)
Energy Conservation
Rate at which heat is gained
– Rate at which heat is lost
=Rate at which heat is stored
0- hA(T-Ta) = d/dt(mCT)
0- hA(T-Ta) = m C dT/dt
Putting in The Numbers
Length of cylinder = 0.625 m
Radius of cylinder = 0.3 m
Density of cylinder material  = 7800 kg/m3
Specific heat, C = 450 J/(kg-C)
Convection coefficient, h= 90 W/(m2-C)
Initial temperature of the trunnion, T(0)= 27oC
Temperature of dry-ice/alcohol, Ta = -78oC
The Differential Equation
Surface area of the trunnion
A = 2rL+2r2
= 2**0.3*0.625+2**0.32
= 1.744 m2
Mass of the trunnion
M=V
=  (r2L)
= (7800)*[*(0.3)2*0.625]
= 1378 kg
The Differential Equation
dT
 hA(T  Ta )  mC
dt
dT
 90 1.744  (T  78)  1378  450
dt
dT
 2.531104 (T  78)),
dt
T (0)  27
Solution
Exact and Approximate Solution of the ODE by Euler's Method
40
Exact
Approximation
Temperature in Celcius
20
0
-20
-40
-60
-80
0
1000
2000
3000
4000 5000 6000
Time in seconds
7000
8000
9000 10000
Time
(s)
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
Temp
(oC)
27
0.42
-19.42
-34.25
-45.32
-53.59
-59.77
-64.38
-67.83
-70.40
-72.32
END
If assigned HW every class for a
grade, you predict that you would
get a
33%
33%
33%
A. better overall grade
B. same overall grade (would
not make a difference)
C. lower overall grade
A.
B.
C.
If I had given you a choice of taking the
class online or in-class, and class attendance
was not mandatory for in-class section,
what would have been your choice? (you
would have the same graded assignments
and had to come to campus to take the
tests for either section)
50%
50%
nl
in
e
O
In
-c
la
s
s
A. In-class
B. Online
If I had given you a choice of taking the
class online or in-class but required 80%
attendance for in-class section, what would
have been your choice? (you would have
the same graded assignments and had to
come to campus to take the tests for either
section)
50%
50%
nl
in
e
O
In
-c
la
s
s
A. In-class
B. Online
How likely are you to watch the YouTube
videos for the topics that were presented in
the class you missed?
25%
25%
l
al
at
No
t
lik
el
el
y
y
25%
No
t
ta
i
nl
y
25%
Lik
Certainly
Likely
Not likely
Not at all
Ce
r
A.
B.
C.
D.
How likely are you to watch the YouTube
videos for the topics that were presented in
the class you attended?
25%
25%
l
al
at
No
t
lik
el
el
y
y
25%
No
t
ta
i
nl
y
25%
Lik
Certainly
Likely
Not likely
Not at all
Ce
r
A.
B.
C.
D.
If based on your background such as
learning patterns, GPA, etc, you were
recommended to register for the online
section or in-class section, how likely are
you going to accept the recommendation?
25%
25%
l
al
at
No
t
lik
el
el
y
y
25%
No
t
ta
i
nl
y
25%
Lik
Certainly
Likely
Not likely
Not at all
Ce
r
A.
B.
C.
D.
Given
d2y
dx 2
2
d y
2

6
x

0
.
5
x
, y (0)  0, y (12)  0, The
2
dx
value of
at y(4) using finite difference method and a step size of
h=4 can be approximated by
B.
C.
D.
.
y (8)  y (0)
8
y (8)  2 y (4)  y (0)
16
y (12)  2 y (8)  y (4)
16
y ( 4)  y ( 0 )
4
0%
.
A.
0%
0%
0%