Professional Documents
Culture Documents
Lecture 4 Ordinary Differential Equations
Lecture 4 Ordinary Differential Equations
Differential equation
An equation relating a dependent variable to one
or more independent variables by means of its
differential coefficients with respect to the
independent variables is called a differential
equation.
d 3 y dy 2
x
(
)
4
y
4
e
cos x
3
dx
dx
T
2T 2T 2T Partial differential equation --------------C p
k ( 2 2 2 ) more than one independent variable involved: x, y, z,
x
y
z
d y dy 2
x
(
)
4
y
4
e
cos x
3
dx
dx
Linear or non-linear
Differential equations are said to be nonlinear if any products exist between the
dependent variable and its derivatives, or
between the derivatives themselves.
d 3 y dy 2
x
(
)
4
y
4
e
cos x
3
dx
dx
Product between two derivatives ---- non-linear
dy
4 y 2 cos x
dx
Product between the dependent variable themselves ---- non-linear
Exact equations
Exact?
M ( x, y )dx N ( x, y )dy 0
F
F
dx
dy dF
x
y
General solution: F (x,y) = C
For example
dy
x y sin x (cos x 2 y )
0
dx
3
Separable-variables equations
In the most simple first order differential
equations, the independent variable and its
differential can be separated from the
dependent variable and its differential by
the equality sign, using nothing more than
the normal processes of elementary algebra.
For example
dy
y
sin x
dx
Homogeneous equations
Homogeneous/nearly homogeneous?
A differential equation of the type,
dy
y
f
dx
x
k1 = 8 k2 ; k2 = 30 k3
C6H6+Cl2 C6H5Cl +HCl
C6H5Cl+Cl2 C6H4Cl2 + HCl
C6H4Cl2 + Cl2 C6H3Cl3 + HCl
dq
d
dr
d
ds
k 2 pr k3 ps V
d
dt
k3 ps V
d
k1 pq k 2 pr V
u = r/q
dr k 2 r
( ) 1
dq k1 q
dy
R yRP RQ
dx
dy
dR d
R y
(Ry )
dx
dx dx
R exp Pdx
Example
2
dy
3
x
4
Solve xy
y exp
dx
2
Let z = 1/y3
dz
3
4
dy
y
dz
3 dy
4
dx
y dx
3x 2
dz
3xz
3 exp
dx
2
integral factor
3x 2
1
3x C
exp
y3
2
3x 2
3x 2 dz
3x 2
exp
3
3xz exp
2
dx
2
3x 2
z exp
2
3x C
3x 2
d
z exp
dx
2
h1 A(T Tw )
Ts 0.326T 0.674t
t
Ts
T
Tw
0 h2 A(Ts t ) Vs
dT
d
dT
0.0235T 0.235 0.235 cos( / 12)
d
B.C.
= 0 , T = 95
Second O.D.E.
Purpose: reduce to 1st O.D.E.
Likely to be reduced equations:
Non-linear
Equations where the dependent variable does not occur explicitly.
Equations where the independent variable does not occur explicitly.
Homogeneous equations.
Linear
The coefficients in the equation are constant
The coefficients are functions of the independent variable.
Solve
Let
d2y
dy
x
ax
2
dx
dx
dy
p
dx
and therefore
dp d 2 y
dx dx 2
dp
xp ax
dx
integral factor
1
exp x 2
2
1 2
1 2
x
x
dp 12 x 2
2
2
e xpe axe
dx
d
( pe
dx
1 2
x
2
) axe
1 2
x
2
1
y ax C exp x 2 dx
2
x
y ax Aerf
B
2
error function
dy
dx
d 2 y dp dp dy
dp
2
p
dx
dx dy dx
dy
Solve
Let
d2y
dy 2
y 2 1 ( )
dx
dx
dy
p
dx
and therefore
d2y
dp
p
dx 2
dy
dp
yp
1 p2
dy
Separating the variables
dy
(a 2 y 2 1)
dx
p
1
dp
dy
2
p 1
y
x
ln y ln a
1
ln( p 2 1)
2
dy
(a 2 y 2 1)
x 1 sinh 1 (ay ) b
a
dx
x
f
can be expressed in a form analogous to dx x , viz.
2
d y
y dy
f
,
dx 2
x
dx
Assuming u = y/x
2
du
2 d u
x
f
u
,
x
dx 2
dx
Assuming x = et
d 2u du
du
f
u
,
dt 2
dt
dt
Solve
2
2 d y
2
2 dy
2x y 2 y x
dx
dx
Dividing by 2xy
d 2 y 1 y 1 x dy
x 2
dx
2 x 2 y dx
homogeneous
Let
d2y
y dy
f
,
2
dx
x dx
y ux
2
du
2 d u
2 du
2ux
2ux
x
2
dx
dx
dx
Let
2
2u
y Ax
Singular solution
y x( B ln x C ) 2
General solution
x et
d u du
2
dt
dt
du
dt
2up
dp
p2
du
kT A
dT
dT d
dT
(kT A )x DU (T T0 )x 0
kT A
dx
dx dx
dx
where
U = overall heat transfer coefficient from the electrode to the surroundings
D = electrode diameter
d
dT
DU
k
(T T0 )x
T
dx
dx
A
d
dT
(k 0 T )
(T T0 ) 0
dx
dx
2
d 2T
dT
(k0 T ) 2
(T T0 ) 0
dx
dx
T0
T
x
(k0 T ) p
dT
dx
dp d 2T
dT dx 2
dp
p 2 (T T0 ) 0
dT
(k0 T ) p
dp
p 2 (T T0 ) 0
dT
p2 z
[(k0 T ) y ]
y (T T0 )
dz
2z 2 y 0
dy
2dy
k0 T0 y 2
k0 T0 y
(k0 T )dT
[C (k0 T )(T T0 ) 2 2 3 (T T0 )3 ]
Q
Ry ( x )
dx 2
dx
d 2u
du
d 2v
dv
P
Ru
Rv
( x)
2
2
dx
dx
dx
dx
d 2u
du
P
Ru
0
2
dx
dx
The general solution of the linear differential equation will be the sum of
a complementary function and a particular solution.
purpose
Q
Ry 0
2
dx
dx
Let the solution assumed to be: y Am e
mx
dy
Am me mx
dx
Am e mx ( Pm 2 Qm R ) 0
auxiliary equation (characteristic equation)
Unequal roots
Equal roots
Real roots
Complex roots
d2y
2 mx
A
m
e
m
2
dx
y A2 e m2 x
Solve
d2y
dy
5
6y 0
2
dx
dx
auxiliary function
m 2 5m 6 0
m1 2
m2 3
y Ae 2 x Be 3 x
y Ve
mx
dy
mx dV
e
mVe mx
dx
dx
where V is a function of x
2
d2y
mx d V
mx dV
2
mx
2
me
m
Ve
dx 2
dx 2
dx
d2y
dy
P
Q
Ry 0
2
dx
dx
y (Cx d )e mx
d 2V
0
2
dx
V Cx D
Solve
d2y
dy
6
9y 0
2
dx
dx
auxiliary function
m 2 6m 9 0
m1 m2 3
y ( A Bx)e 3 x
Solve
d2y
dy
4
5y 0
2
dx
dx
auxiliary function
m 2 4m 5 0
m 2i
y Ae
( 2i ) x
Be
( 2 i ) x
y e ( E cos x F sin x)
2x
Particular integrals
Two methods will be introduced to obtain
the particular solution of a second linear
O.D.E.
The method of undetermined coefficients
confined to linear equations with constant
coefficients and particular form of (x)
Q
Ry ( x )
2
dx
dx
d2y
dy
Q
Ry ( x )
2
dx
dx
d2y
dy
Q
Ry ( x )
2
dx
dx
Solve
d2y
dy
4
4 y 4 x 8x3
2
dx
dx
y p qx rx 2 sx 3
d2y
2r 6 sx
dx 2
auxiliary equation
m 2 4m 4 m 0
dy
q 2rx 3sx 2
dx
y p 7 10 x 6 x 2 2 x 3
yc ( A Bx)e 2 x
y general yc y p
dy
dx
d2y
D ( Dy ) D y
dx 2
...
2
But,
dy
( Dy )
dx
dny
D y
dx n
n
d2y
dy
3
2y
2
dx
dx
D 2 y 3Dy 2 y ( D 2 3D 2) y ( D 1)( D 2) y
The basic laws of algebra thus apply to the pure operators, but the
relative order of operators and variables must be maintained.
( D 2 3D 2)e px ( p 2 3 p 2)e px
...
D n e px p n e px
f ( D)e px f ( p )e px
D ( ye px ) e px Dy yDe px e px ( D p ) y
D 2 ( ye px ) e px ( D p ) 2 y
...
D n ( ye px ) e px ( D p ) n y
f ( D)( ye ) e f ( D p ) y
px
px
More convenient!
Differential operator to
trigonometrical functions
D n (sin px) D n Im eipx Im D n e ipx Im(ip ) n e ipx
where Im represents the imaginary part of the function which follows it.
D f ( x)dx f ( x)
f ( x)dx D 1 f ( x)
Solve
dy
4 y e2 x
dx
differential operator
( D 4) y e 2 x
1
y
e2x
( D 4)
f ( D )e px f ( p )e px
p2
1
e2 x
1
4(1 D )
4
binomial expansion
1 2x
1
1
1
e [1 ( D ) ( D ) 2 ( D ) 3 ...]1
4
4
4
4
=2
1
1
1
1
y e 2 x [1 ( ) ( ) 2 ( ) 3 ...]
4
2
2
2
1
y e2x
2
1
e2 x
( 2 4)
1
y
e2x
( D 4)
f ( D)e px f ( p )e px
p2
1
e2 x
( 2 4)
1
1
px
e
e px
f ( D)
f ( p)
f(p) = 0,
1
1
px
e px
e
f ( D)
( D p) n ( D)
f ( D)e px f ( p )e px
px
f ( D) ye
1
e
1
px
e
f ( D)
( p ) ( D p ) n y = 1, p = 0,
px
1
e px x n
px
e
f ( D)
( p ) n!
e px f ( D p ) y
D-p D
integration
1
e px 1
px
e
f ( D)
( p) D n
1
e px
px
e
D n
f ( D)
( p)
Solve
d2y
dy
4x
16
y
6
xe
dx 2
dx
m 2 8m 16 0
differential operator
( D 2 8D 16) y ( D 4) 2 y 6 xe 4 x
yp
6
4x
xe
( D 4) 2
yc ( A Bx)e 4 x
y = yc + yp
f(p) = 0
f ( D)e px e px f ( D p )
y p 6 xe 4 x D 2
integration
y p 6 xe 4 x
x2
2!
y p 3 x 3e 4 x
Solve
d 2 y dy
3
2
6
y
4
x
3
x
dx 2 dx
m2 m 6 0
differential operator
( D 2 D 6) y ( D 3)( D 2) y 4 x 3 3 x 2
yp
yc Ae 3 x Be 2 x
1
(4 x 3 3x 2 )
( D 3)( D 2)
y = yc + yp
1
1
1
3
2
yp
(
4
x
3
x
)
5 (3 D) ( 2 D )
1 D D 2 D3
1 D D 2 D3
...
...
8 16
3 9 27 81
2 4
4 x 3 3x 2 12 x 2 6 x 7(24 x 6) 13 24
yp
0...
6
36
216
1296
3
2
(4 x 3 x )
L
u
C0
Ce
u
C
x
section
x
x
Bulk flow of A
uC
Diffusion of A
dC
D
dx
x+x
dC
x
dx
dC d
dC
D
D
x
dx dx
dx
uC u
A material balance can be taken over the element of length x at a distance x fom the inlet
uC D dC
dx
dC
dC d
dC
uC u
x D
D
x kCx 0
dx
dx dx
dx
uC
dC
dx
dC
dC d
dC
uC
x kCx 0
dx
dx dx
dx
dividing by x
dC d
dC
u
D
dx
dx
dx
kC 0
rearranging
d 2C
dC
D 2 u
kC 0
dx
dx
auxillary function
d 2C
dC
D 2 u
0
dx
dx
auxillary function
Dm 2 um k 0
Dm 2 um 0
ux
C A exp
1 a B exp ux 1 a
2D
2D
ux
C exp
D
1 4kD / u
2
ux
C exp
D
ux
1 a B exp ux 1 a
2D
2D
C A exp
B. C.
B. C.
dC dC
x0
dx dx
dC
xL
0
dx
x C C0
x0 C C
C
2
ux
ua
L x a 1 exp ua L x
exp
a 1 exp
C0 K
2D
2D
2D
C0 C
kx
1 exp
C0
u
1.017 kg/s of a tallow fat mixed with 0.286 kg/s of high pressure hot water is fed into
the base of a spray column operated at a temperature 232 C and a pressure of
4.14 MN/m2. 0.519kg/s of water at the same temperature and pressure is sprayed
into the top of the column and descends in the form of droplets through the rising fat
phase. Glycerine is generated in the fat phase by the hydrolysis reaction and is extracted
by the descending water so that 0.701 kg/s of final extract containing 12.16% glycerine
is withdrawn continuously from the column base. Simultaneously 1.121 kg/s of fatty
acid raffinate containing 0.24% glycerine leaves the top of the column.
If the effective height of the column is 2.2 m and the diameter 0.66 m, the glycerine
equivalent in the entering tallow 8.53% and the distribution ratio of glycerine between
the water and the fat phase at the column temperature and pressure is 10.32, estimate
the concentration of glycerine in each phase as a function of column height. Also find
out what fraction of the tower height is required principally for the chemical reaction.
The hydrolysis reaction is pseudo first order and the specific reaction rate constant is
0.0028 s-1.
Raffinate
L kg/s
L kg/s
xH
zH
x+x
z+z
h
Tallow fat
x
z
G kg/s
yH
y+y
h
y
Hot water
G kg/s
Extract
x0
z0
y0
Lx L x
h
dh
dy
G y
h Gy KaS y y *h
dh
A glycerine balance between the element and the base of the tower is:
Lz Lz 0
0
w
w
L kg/s
xH
zH
x+x
z+z
G kg/s
yH
y+y
h
x
z
y* mx
x0
z0
y0
kS 2 Ka mz0 mG
kS KaS
dy KaS dy d 2 y
KaSm dy
0
LG w
L
L G
dh G dh dh 2
L dh
kS
L
mG
L
KaS
(r 1)
G
d2y
dy
pq
mz0
(
p
q
)
pqy
ry
dh 2
dh
r 1
w
Complementary function
m 2 ( p q)m pq 0
Particular solution
Constant at the right hand side, y p = C/R
yp
mz0
pq
ry0
/ pq
r 1
w
1
mz0
ry0
r 1
w
B.C.
We dont know y0, either
h 0, x 0
h H, y 0
h 0, y y0
h H, y 0
mx y
r 1
pA exp( ph) qB exp(qh)
q
y (ve qH re pH )
q rp p
v
q
r 1 dy
q dh
1
mz
qH
pH
(e pH v)e qh ve qH re pH
ry0 0 (r e )e
r 1
w
Substitute y0 in terms of other variables
h 0, y y0
mz0 pH e pH v qH ve qH re pH
e
y
e
qH
qH
w(r v)
r
e
r
1.017 1.121
1.069
2
0.286 0.519
G~
0.403
2
0.701 0.1216 0.276
y0 ~
0.165
0.701 0.286
m 10.32
k 0.0028
L~
0.66 2
4
730
Simultaneous differential
equations
These are groups of differential equations
containing more than one dependent
variable but only one independent variable.
In these equations, all the derivatives of the
different dependent variables are with
respect to the one independent variable.
Our purpose: Use algebraic elemination of the variables until only
one differential equation relating two of the variables remains.
Elimination of variable
Independent variable or dependent variables?
dx
f1 ( x, y )
Elimination of independent variable
dt
dy
f 2 ( x, y )
dt
dx f1 ( x, y )
dy f 2 ( x, y )
( D 3)( D 2) y ( D 3) 2 z 0
and
( D 2)( D 5) y ( D 2)( D 1) z 0
( D 5)
( D 3)
( D 3)(11D 13) z 0
( D 3) ( D 2 8 D 15) ( D 2 3D 2) z 0
( D 3)(11D 13) z 0
z Ae
13
x
11
Be 3 x
( D 2 D 6) y ( D 2 6 D 9) z 0
13
13 2 6 13
x
( D D 6) y
9 Ae 11
11
11
13
x
1
yp 2
Ee 11
( D D 6)
=E
yc He Je
2x
f ( D)e px f ( p )e px
yp
3 x
y = yc + y p
13
11
1
13
13
(( ) 2 ( ) 6)
11
11
13
121 11 x
yp
Ee
700
Ee
13
x
11
Tank 1
80 C
40 C
Tank 2
20 C
0.96 kg/s
88 C
1.25 kg/s
45 C
174 C
Heat transfer area A1
Fwater 0.96kg / s
Tmiddle 40 C
ln
(
88
40
)
Note:
T
ln
(
88
40
)
When water fails for 1 hour, heat balance for tank 1 and tank 2:
Tank 1
Tank 2
dT1
dt
dT
MCT1 MCT2 VC 2
dt
MCT0 MCT1 VC
dT1
dt
dT2
dt
T0 T1
T1 T2
174 86e t T2
B.C.
t = 0, T1 = 88
T1 174 86e t
t = 1, T1=142.4 C
t = 1, T2 = 94.9 C
When water supply restores after 1 hour, heat balance for tank 1 and tank 2:
Tank 1
Tank 2
dt
WCwt3 MCT1 WCwt2 MCT2 VC dT2
dt
t1
t2
T0
T1
t3
2
T2
(T1 t1 ) (T1 t 2 )
ln(T1 t1 ) ln(T1 t 2 )
(T2 t 2 ) (T2 t3 )
WCw (t 2 t3 ) U 2 A2
ln(T2 t 2 ) ln(T2 t3 )
WCw (t1 t 2 ) U1 A1
4 equations have to be
solved simultaneously
dt
WCwt3 MCT1 WCwt2 MCT2 VC dT2
dt
(T1 t1 ) (T1 t 2 )
ln(T1 t1 ) ln(T1 t 2 )
(T2 t 2 ) (T2 t3 )
WCw (t 2 t3 ) U 2 A2
ln(T2 t 2 ) ln(T2 t3 )
WCw (t1 t 2 ) U1 A1
U1 A1
WC w
T1 (1 ) t1 t 2
U 2 A2
WC w
T2 (1 ) t 2 t3
..
d 2T2
dT2
6.08
7.75T2 309
2
dt
dt
B.C. t = 0, T2 = 94.9 C
T1
Check exact
Separate variables
homogenous equations, u = y/x
equations solvable by an integrating factor
2nd order O.D.E
Non-linear O.D.E.
Linear O.D.E.
constant coefficients