Example. Solve the differential equation2(1 )(1 ) 0y x y′− + + =
Example. Solve the differential equation2(1 )(1 ) 0y x y′− + + =
Solution: This equation is separable, and by separating the variables, we get 2(1 )(1 ) so (1 )
21
dy dyx y x dxdx y
= + + = ++
Example. Solve the differential equation2(1 )(1 ) 0y x y′− + + =
Solution: This equation is separable, and by separating the variables, we get
thus
2tan
2xy x C
= + +
so
21(1 ) or tan ( )2 2(1 )
dy xx dx y x Cy
−= + = + +∫ ∫+
2(1 )(1 ) so (1 )21
dy dyx y x dxdx y
= + + = ++
Example. Solve the differential equation
3tan sec 0dyy xdx
− =
Example. Solve the differential equation
3tan sec 0dyy xdx
− =
Solution: 3tan sec 0dyy xdx
− = is equivalent with
sec 3tan or cot 3cosdy x y ydy xdxdx
= =
Example. Solve the differential equation
3tan sec 0dyy xdx
− =
Solution:
thus
so
3tan sec 0dyy xdx
− = is equivalent with
sec 3tan or cot 3cosdy x y ydy xdxdx
= =
ln sin 3siny x C= +
3sinsin xy Ce=
This is an implicit solution.
3sinsin xy e=
A first order equation is linear if it can be expressed in the following way:
where p(x) and q(x) are continuous functions.
( ) ( )dy p x y q xdx
+ =
A first order equation is linear if it can be expressed in the following way:
where p(x) and q(x) are continuous functions.
( ) ( )dy p x y q xdx
+ =
Examples:
2dy xx y edx
+ = 3(sin ) 0dy x y xdx
+ + = 5 2dy ydx
+ =
To solve a linear first order equation, we define a function µ(x) by
( )( ) p x dxx eµ ∫=
To solve a linear first order equation, we define a function µ(x) by
( )( ) p x dxx eµ ∫=
Then ( )( ) ( )p x dxd p x e p xdxµ µ∫= =
By the product formula and chain rule, we have
To solve a linear first order equation, we define a function µ(x) by
( )( ) p x dxx eµ ∫=
Then ( )( ) ( )p x dxd p x e p xdxµ µ∫= =
By the product formula and chain rule, we have
( ) ( ) ( ) (1)dyd y dy d dyy p x y p x ydxdx dx dx dx
µ µµ µ µ µ = + = + = +
To solve a linear first order equation, we define a function µ(x) by
( )( ) p x dxx eµ ∫=
Then ( )( ) ( )p x dxd p x e p xdxµ µ∫= =
By the product formula and chain rule, we have
( ) ( ) ( ) (1)dyd y dy d dyy p x y p x ydxdx dx dx dx
µ µµ µ µ µ = + = + = +
( ) ( )dy p x y q xdx
+ =Now multiply the DE by µ. We get
( ) ( )dy p x y q xdx
µ µ + =
or by (1), ( ) ( )d y q xdxµ µ=
( ) ( )d y q xdxµ µ=Since we can integrate both sides to get:
1( ) ( ) or ( ) ( )y x q x dx C y x q x dx Cµ µ µµ
= + = + ∫∫ To summarize, we have
( ) ( )d y q xdxµ µ=Since we can integrate both sides to get:
1( ) ( ) or ( ) ( )y x q x dx C y x q x dx Cµ µ µµ
= + = + ∫∫ To summarize, we have
The Method of Integrating FactorsStep 1. Calculate
This is called the integrating factor. We can take the constant of integration to be 1.
Step 2. Write
and perform the required integration, including a constant of integration.
Step 3. Solve for y.
( ) ( )y x q x dxµ µ=∫
( )( ) p x dxx eµ ∫=
Example. Solve the DE 4 1dy y
dx− =
Example. Solve the DE 4 1dy y
dx− =
Solution: Here p(x) = − 4 and q(x) = 1.
Then 4 4( ) dx xx e eµ −∫ −= =
Example. Solve the DE 4 1dy y
dx− =
Solution: Here p(x) = − 4 and q(x) = 1.
Then 4 4( ) dx xx e eµ −∫ −= =
14 4( ) ( )4
x xy x q x dx e dx e Cµ µ − −= = =− +∫ ∫
Example. Solve the DE 4 1dy y
dx− =
Solution: Here p(x) = − 4 and q(x) = 1.
Then 4 4( ) dx xx e eµ −∫ −= =
14 4( ) ( )4
x xy x q x dx e dx e Cµ µ − −= = =− +∫ ∫
1 11 14 44 44 4 4
x xx xy e C e e C Ceµ − −= − + = − + =− +
Example. Solve the Initial Value Problem:
2 ; (0) 2dy xy x ydx
+ = =
Example. Solve the Initial Value Problem:
2 ; (0) 2dy xy x ydx
+ = =
Solution: Here p(x) = 2x and q(x) =x.
Then 22( ) xdx xx e eµ ∫= =
Example. Solve the Initial Value Problem:
2 ; (0) 2dy xy x ydx
+ = =
Solution: Here p(x) = 2x and q(x) =x.
Then 22( ) xdx xx e eµ ∫= =2 21( ) ( )
2x xy x q x dx xe dx e Cµ µ= = = +∫ ∫
Example. Solve the Initial Value Problem:
2 ; (0) 2dy xy x ydx
+ = =
Solution: Here p(x) = 2x and q(x) =x.
Then 22( ) xdx xx e eµ ∫= =2 21( ) ( )
2x xy x q x dx xe dx e Cµ µ= = = +∫ ∫
22 221 1 112 2 2
xx xxy e C e e C Ceµ
− − = + = + = +
Since y(0) = 2, we substitute y = 2, x = 0 and get
201 122 2
Ce C − = + = +
Since y(0) = 2, we substitute y = 2, x = 0 and get
201 122 2
Ce C − = + = +
Thus we have C = 3/2, and so
21 32 2
xy e
− = +
Example. Solve the DE: 1 0
1
dy yxdx e
+ − =+
Example. Solve the DE: 1 0
1
dy yxdx e
+ − =+
Solution: Here p(x) = 1 and q(x) =1/(1 + ex).
Then ( ) dx xx e eµ ∫= =
Example. Solve the DE: 1 0
1
dy yxdx e
+ − =+
Solution: Here p(x) = 1 and q(x) =1/(1 + ex).
Then ( ) dx xx e eµ ∫= =
( )( ) ( ) ln 11
xe xy x q x dx dx e Cxeµ µ = = = + +∫ ∫
+
Example. Solve the DE: 1 0
1
dy yxdx e
+ − =+
Solution: Here p(x) = 1 and q(x) =1/(1 + ex).
Then ( ) dx xx e eµ ∫= =
( )( ) ( ) ln 11
xe xy x q x dx dx e Cxeµ µ = = = + +∫ ∫
+
( ) ( ) ( )1 ln 1 ln 1 ln 1x x x x xxy e C e e C e e Ceµ
− − −= + + = + + = + +
Example. A tank initially contains 200 gal of pure water. Then at time t = 0, brine containing 5 lb of salt per gallon of brine is allowed to enter the tank at the rate of 10 gal/min andthe mixed solution is drained from the tank at the same rate.
(a) How much salt is in the tank at an arbitrary time?(b) How much salt is in the tank after 30 minutes?
Brine in at 10 gal/min
Mixture out at 10 gal/min
200 gal
Brine in at 10 gal/min
Mixture out at 10 gal/minLet Q(t) be the number of lbs of salt in the tank at
time t.Then salt runs in at the rate of (5 lb/gal)(10 gal/min) = 50 lb/min.Salt is running out at the rate of (Q(t) lb/200 gal)(10 gal/min) = Q /20 lb/min.at any time t.
200 gal
Brine in at 10 gal/min
Mixture out at 10 gal/minLet Q(t) be the number of lbs of salt in the tank at
time t.Then salt runs in at the rate of (5 lb/gal)(10 gal/min) = 50 lb/min.Salt is running out at the rate of (Q(t) lb/200 gal)(10 gal/min) = Q /20 lb/min.at any time t. This means that Q satisfies the initial value problem:
50 ; (0) 020
dQ Q Qdt
= − =
200 gal
Brine in at 10 gal/min
Mixture out at 10 gal/min
5020
dQ Qdt
= −The equation is linear, so we can use the method
of integrating factors; p(t) = 1/20 and q(t) = 50.Thus
20 20( )dt t
t e eµ ∫= =
200 gal
Brine in at 10 gal/min
Mixture out at 10 gal/min
5020
dQ Qdt
= −The equation is linear, so we can use the method
of integrating factors; p(t) = 1/20 and q(t) = 50.Thus
20 20( )dt t
t e eµ ∫= = 20 20( ) ( ) 50 1000t t
t q t dt e dt e Cµ = = +∫ ∫
200 gal
20( ) ( ) 1000t
t Q t e Cµ = +Thus
20 20 20 201( ) [1000 ] [1000 ] 1000t t t t
Q t e C e e C Ceµ
− −= + = + = +
20( ) ( ) 1000t
t Q t e Cµ = +Thus
20 20 20 201( ) [1000 ] [1000 ] 1000t t t t
Q t e C e e C Ceµ
− −= + = + = +
We also know that Q(0) = 0, so 0 = 1000 + C, and C = −1000.
Thus
20( ) 1000[1 ]t
Q t e−
= −
20( ) ( ) 1000t
t Q t e Cµ = +Thus
20 20 20 201( ) [1000 ] [1000 ] 1000t t t t
Q t e C e e C Ceµ
− −= + = + = +
We also know that Q(0) = 0, so 0 = 1000 + C, and C = −1000.
Thus
20( ) 1000[1 ]t
Q t e−
= −
After 30 minutes, we have
3020(30) 1000[1 ] 776.86Q e
−= − ≈ lbs of salt.
20( ) ( ) 1000t
t Q t e Cµ = +Thus
Example. A tank with 1000 gal capacity initially contains 500 gal of water that is polluted with 50 lb. of particulate matter.At time t = 0, pure water is added at a rate of 20 gal/min and the mixed solution is drained off at a rate of 10 gal/min. How much particulate matter is in the tank when it reaches the pointof overflowing?
Water in at 20 gal/min
Mixture out at 10 gal/min
500 gal
Water in at 20 gal/min
Mixture out at 10 gal/min
500 gal
Let Q(t) be the number of lbs of particulate matter in the tank at time t, and let V(t) be the volume of the solution at time t. Clearly V(t) = 500 + 10t.
Water in at 20 gal/min
Mixture out at 10 gal/min
500 gal
Let Q(t) be the number of lbs of particulate matter in the tank at time t, and let V(t) be the volume of the solution at time t. Clearly V(t) = 500 + 10t.Particulate matter is running out at the rate of (Q(t) lb/V(t) gal)(10 gal/min) = 10Q /V lb/min.at any time t. This means that Q satisfies the initial value problem:
10 ; (0) 5050
dQ Q Q Qdt V t
=− =− =+
50dQ Qdt t
=−+
For the linear equation we have:
1( ) ; ( ) 050
p t q tt
= =+ ( )( ) exp exp ln(50 ) 50
50dtt t t
tµ = = + = +∫ +
50dQ Qdt t
=−+
For the linear equation we have:
1( ) ; ( ) 050
p t q tt
= =+ ( )( ) exp exp ln(50 ) 50
50dtt t t
tµ = = + = +∫ + ( ) ( ) 0t q t dt dt Cµ = =∫ ∫
Thus we have 1( )50
CQ t Ctµ
= =+
50dQ Qdt t
=−+
For the linear equation we have:
1( ) ; ( ) 050
p t q tt
= =+ ( )( ) exp exp ln(50 ) 50
50dtt t t
tµ = = + = +∫ + ( ) ( ) 0t q t dt dt Cµ = =∫ ∫
Thus we have 1( )50
CQ t Ctµ
= =+
Since Q(0) = 50, we have 50 = C/50, or C = 2500. Thus
2500( )50
Q tt
=+
50dQ Qdt t
=−+
For the linear equation we have:
1( ) ; ( ) 050
p t q tt
= =+ ( )( ) exp exp ln(50 ) 50
50dtt t t
tµ = = + = +∫ + ( ) ( ) 0t q t dt dt Cµ = =∫ ∫
Thus we have 1( )50
CQ t Ctµ
= =+
Since Q(0) = 50, we have 50 = C/50, or C = 2500. Thus
2500( )50
Q tt
=+
The tank fills in 50 minutes, at which time the amount of matter is 2500(50) 25 lbs
100Q = =
Example. An object has mass m and is dropped from a plane with an initial velocity of v0. We assume that as it falls through the air, it experiences a drag proportional to its velocity. Describe its motion.
Example. An object has mass m and is dropped from a plane with an initial velocity of v0. We assume that as it falls through the air, it experiences a drag proportional to its velocity. Describe its motion.
Solution. The force on the object at any time t (if we take up as the positive direction) is −mg − cv(t), where g is the acceleration dur to gravity and c is the ‘drag coefficient’. By Newton’s second law, F = ma, that is
( ) dvmg cv t mdt
− − =
Thus we see that the velocity satisfies the linear DE
Example. An object has mass m and is dropped from a plane with an initial velocity of v0. We assume that as it falls through the air, it experiences a drag proportional to its velocity. Describe its motion.
Solution. The force on the object at any time t (if we take up as the positive direction) is −mg − cv(t), where g is the acceleration dur to gravity and c is the ‘drag coefficient’. By Newton’s second law, F = ma, that is
( ) dvmg cv t mdt
− − =
Thus we see that the velocity satisfies the linear DE
( )dv c v t gdt m
+ =−
In this case, we also have the initial condition v(0) = v0.
For the equation we see that ( )dv c v t gdt m
+ =− ( ) , ( ) .cp t q t gm
= =−
In this case, we also have the initial condition v(0) = v0.
For the equation we see that ( )dv c v t gdt m
+ =− ( ) , ( ) .cp t q t gm
= =−
Thus
( ) ; ( ) ( )ctc ct ctdt mm m mgmt e e t q t dt ge dt e C
cµ µ∫ −= = = − = +∫ ∫
In this case, we also have the initial condition v(0) = v0.
For the equation we see that ( )dv c v t gdt m
+ =− ( ) , ( ) .cp t q t gm
= =−
Thus
( ) ; ( ) ( )ctc ct ctdt mm m mgmt e e t q t dt ge dt e C
cµ µ∫ −= = = − = +∫ ∫
ct ctm mgmve e C
c−= + so ( )
ctct ctmm m mgmgv t e e C Ce
cc
−− −− = + = +
In this case, we also have the initial condition v(0) = v0.
For the equation we see that ( )dv c v t gdt m
+ =− ( ) , ( ) .cp t q t gm
= =−
Thus
( ) ; ( ) ( )ctc ct ctdt mm m mgmt e e t q t dt ge dt e C
cµ µ∫ −= = = − = +∫ ∫
ct ctm mgmve e C
c−= + so ( )
ctct ctmm m mgmgv t e e C Ce
cc
−− −− = + = +
0mgv Cc
− = +
so .0
mgC vc
= + Thus
( ) 0
ctmg mgmv t e vc c
− = + −
( ) 0
ctmg mgmv t e vc c
− = + −
Notice that as t increases, the first term tends to 0, and the object tends to ‘terminal velocity’ −mg/c.
( ) 0
ctmg mgmv t e vc c
− = + −
Notice that as t increases, the first term tends to 0, and the object tends to ‘terminal velocity’ −mg/c.
For a 240 lb human, terminal velocity is about 120 ft/sec.