First order linear differential equations and the integrating factors

advertisement
LECTURE 5: FIRST ORDER LINEAR DIFFERENTIAL EQUATION AND THE EXACT
EQUATIONS
MINGFENG ZHAO
September 18, 2015
First order linear differential equations and the integrating factors
Let’s solve y 0 + p(x)y = f (x). Multiply r(x) on the both sides, we get r(x)y 0 + r(x)p(x)y = r(x)f (x). We are looking
for an integrating factor r(x), that is, r(x)y 0 + r(x)p(x)y = [r(x)y]0 = r(x)y 0 + r0 (x)y, then r0 (x) = r(x)p(x), which
implies that r(x) = e
R
p(x) dx
. So we have
[r(x)y]0 = r(x)f (x).
Z
Hence we have r(x)y =
r(x)f (x) dx, that is,
1
r(x)
y=
Z
r(x)f (x) dx = e−
R
p(x) dx
Z R
e p(x)
dx
f (x) dx.
1
y 0 + xy = 3, y(0) = 0.
x2 + 1
Rewrite the equation, we have y 0 + x(x2 + 1)y = 3(x2 + 1). Multiply r(x) on the both sides, we get r(x)y 0 + x(x2 +
Example 1. Solve
1)r(x)y = 3(x2 + 1)r(x). We are look for an integrating factor r(x), that is r(x)y 0 + x(x2 + 1)r(x)y = [r(x)y]0 =
r(x)y 0 + r0 (x)y, then r0 (x) = x(x2 + 1)r(x), which implies that r(x) = e
h
e
x4
4
2
+ x2
y
i0
= 3(x2 + 1)e
x4
4
2
x4
4
+ x2
. So we get
2
+ x2
.
So we get
e
x4
4
Z
2
+ x2
y=
2
3(x + 1)e
x4
4
Z
2
+ x2
dx = 3
x
t4
t2
e 4 + 2 3(t2 + 1) dt + C.
0
So we have
y = e−
x4
4
Z
2
− x2
·
x
t4
t2
e 4 + 2 3(t2 + 1) dt + Ce−
x4
4
2
− x2
.
0
Since y(0) = 0, then C = 0. Therefore, the solution to
4
y=e
Z
2
− x4 − x2
·
x2
x
1
y 0 + xy = 3, y(0) = 0 is:
+1
t4
t2
e 4 + 2 3(t2 + 1) dt .
0
1
2
MINGFENG ZHAO
Example 2 (Mixing Model). A 100 liter tank contains 10 kilograms of salt dissolved in 60 liters of water. Solution of
water and salt with concentration of 0.1 kg/L is flowing in at rate of 5 L/min. The solution in the tank is well stirred
and flows out at a rate of 3 L/min. How much salt is in the tank when the tank if full?
Let y(t) be the amount of the salt in the tank at time t minutes (starting t = 0), then y(0) = 10. At time t, we know
that
• there are 60 + (5 − 3)t = 60 + 2t liter water in the tank
y(t)
• the concentration of salt at time t is
60 + 2t
• the changing rate of salt in the tank at time t is y 0 (t)
• the changing rate of salt flowing into the tank at time t is 0.1 × 5 =
• the changing rate salt flowing out the tank at time t is
1
2
3y
y(t)
×3=
.
60 + 2t
60 + 2t
At time t, we know that
Rate of change of salt in the tank= Rate of salt flowing into the tank- Rate of salt flowing out the tank.
So we have the following initial value problem:


 y0 +
3y
1
= ,
60 + 2t
2

 y(0) = 10.
Multiply r(t) on the both sides of y 0 +
1
3y
= , then
60 + 2t
2
r(t)y 0 +
3
1
r(t)y = r(t).
60 + 2t
2
LECTURE 5: FIRST ORDER LINEAR DIFFERENTIAL EQUATION AND THE EXACT EQUATIONS
We are looking for an integrating factor r(t), that is, r(t)y 0 +
3
r(t), which implies that
60 + 2t
r(t) = e
3
2t+60
R
dt
3
3
r(t)y = [r(t)y]0 = r(t)y 0 + r0 (t)y, then r0 (t) =
60 + 2t
3
3
= e 2 ln(t+30) = (t + 30) 2 .
So we have
h
i0
3
3
1
(t + 30) 2 y = (t + 30) 2 .
2
Then we have
Z
3
2
(t + 30) y =
3
5
1
1
(t + 30) 2 dt = (t + 30) 2 + C.
2
5
Hence we get
y=
3
1
(t + 30) + C(t + 30)− 2 .
5
3
3
Since y(0) = 10, then 10 = 6 + C30− 2 , which implies that C = 4 · 30 2 . Hence we know that
y(t) =
3
3
1
(t + 30) + 4 · 30 2 · (t + 30)− 2 .
5
At time t, there are 60 + 2t liter water in the tank, since the volume of the tank is 1000, then after 20 minutes, the
tank will be full. So
y(20) =
3
3
1
(20 + 30) + 4 · 30 2 · (20 + 30)− 2 ≈ 11.86.
5
Therefore,
There are 11.86 liter salt in the tank when the tank is full.
Remark 1. Another way to get the differential equation in Example 2:
Let y(t) be the amount of the salt in the tank at time t minutes (starting t = 0), then y(0) = 10 and
• y(t + ∆t) be the amount of the salt in the tank at time t + ∆t
• there are 60 + (5 − 3)t = 60 + 2t liter water in the tank
y(t)
• the concentration of salt at time t is
60 + 2t
• during the period from time t to time t + ∆t, we know that
– there are new 5∆t liter water coming to the tank
– there are new 5∆t × 0.1 kilograms salt coming to the tank
– there are 3∆t liter water going out of the tank
y(t)
– there are 3∆t ×
going out of the tank
60 + 2t
4
MINGFENG ZHAO
So we have
y(t + ∆t) = y(t) + 5∆t × 0.1 − 3∆t ×
y(t)
3y(t)
= y(t) + 0.5∆t −
· ∆t.
60 + 2t
60 + 2t
That is,
3y(t)
y(t + ∆t) − y(t)
= 0.5 −
∆t
60 + 2t
Take ∆t & 0, we get
y 0 = 0.5 −
3y
.
60 + 2t
Exact equations
For the function φ(x, y), if y is a function of x, then by the chain rule, we have
d
∂φ
∂φ
dy
φ(x, y) =
(x, y) +
(x, y) .
dx
∂x
∂y
dx
Let M (x, y) = φx (x, y) and N (x, y) = φy (x, y), if y is a solution to M (x, y) + N (x, y)
dy
d
= 0, then
φ(x, y(x)) = 0,
dx
dx
which implies that
φ(x, y) = C .
Remark 2. Notice that the following two statements hold:
• For any function φ(x, y), let M (x, y) = φx (x, y) and N (x, y) = φy (x, y), we have
∂ 2 φ(x, y)
∂ 2 φ(x, y)
∂ ∂φ(x, y)
∂ ∂φ(x, y)
=
=
=
,
∂x
∂y
∂x∂y
∂y∂x
∂y
∂x
that is, My (x, y) = Nx (x, y).
• Conversely, if we have two functions M (x, y) and N (x, y) satisfy My (x, y) = Nx (x, y), then there exists some
function φ(x, y) such that
φx (x, y) = M (x, y),
and φy (x, y) = N (x, y).
Definition 1. Consider the differential equation M (x, y)+N (x, y)y 0 = 0, we say that the differential equation M (x, y)+
N (x, y)y 0 = 0 is exact if
My (x, y) = Nx (x, y).
As a summary of the previous discussion, if the differential equation M (x, y) + N (x, y)y 0 = 0 is exact, that is,
My (x, y) = Nx (x, y), then there exists a function φ(x, y) such that
• φx (x, y) = M (x, y).
LECTURE 5: FIRST ORDER LINEAR DIFFERENTIAL EQUATION AND THE EXACT EQUATIONS
5
• φy (x, y) = N (x, y).
• The solution to M (x, y) + N (x, y)y 0 = 0 is given by φ(x, y) = C .
Remark 3. We are going to use φx (x, y) = M (x, y) and φy (x, y) = N (x, y) to compute φ(x, y), hence we can get the
solution to M (x, y) + N (x, y)y 0 = 0.
Problems you can do:
Lebl’s Book [2]: All exercises on Page 30 and Page 31.
Braun’s Book [1]: Exercises 4-15 on Page 80, and 17-19 on Page 81, and all Exercises from Page 8 to Page 10.
Read all materials in Section 1.2.
References
[1] Martin Braun. Differential Equations and Their Applications: An Introduction to Applied Mathematics. Springer, 1992.
[2] Jiri Lebl. Notes on Diffy Qs: Differential Equations for Engineers. Createspace, 2014.
Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C.
Canada V6T 1Z2
E-mail address: mingfeng@math.ubc.ca
Download