Ordinary Differential Equations Dr. Marco A Roque Sol 12/01/2015 First Order Differential Equations

advertisement
First Order Differential Equations
Ordinary Differential Equations
Dr. Marco A Roque Sol
12/01/2015
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
First Order Differential Equations
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Now, to set up the IVP that we will need to solve to get Q(t) we
will need the flow rate of the water entering, the concentration of
the salt in the water entering, the flow rate of the water leaving
(weve got that) and the concentration of the salt in the water
exiting (we dont have this )
Since we are assuming a uniform concentration of salt in the tank
the concentration at any point in the tank and hence in the water
exiting is given by,
Concentration = (Amount of salt in the tank at any time t) / (
Volume of water in the tank at any time t)
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
The amount at any time t is easy it’s just Q(t). The volume is
also pretty easy. We start with 600 gallons and every hour 9
gallons enters and 6 gallons leave. So, if we use t in hours, every
hour 3 gallons enters the tank, or at any time t there is 600 + 3t
gallons of water in the tank.
So, the IVP for this situation is,
1
Q(t)
0
Q (t) = (9)
(1 + cos(t)) − 6
Q(0) = 5
5
600 + 3t
Q(t)
9
0
Q (t) = (1 + cos(t)) −
Q(0) = 5
5
200 + t
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
This is a linear differential equation. We will show most of the
details, but leave the description of the solution process out.
Q(t)
9
Q 0 (t) +
= (1 + cos(t))
200 + t
5
Now find the integrating factor:
µ(t) = e
R
2
dt
200+t
2
= e 2ln(200+t) = e ln(200+t) = (200 + t)2
Now, multiply the rewritten differential equation by the integrating
factor.
Q(t)
9
2 0
2
(200 + t) Q (t) + (200 + t)
= (200 + t)2 (1 + cos(t))
200 + t
5
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
0
9
(200 + t)2 Q(t) = (200 + t)2 (1 + cos(t))
5
Integrate both sides and solve for the solution.
Z
Z
0
9
2
(200 + t)2 (1 + cos(t)) dt
(200 + t) Q(t) dt =
5
9 1
(200 + t)2 Q(t) = [ (200 + t)3 + (200 + t)2 sin(t) + ...
5 3
... + 2(200 + t)cos(t) − 2sin(t)] + c
9 1
2cos(t)
2sin(t)
c
2
Q(t) =
(200 + t) + sin(t) +
−
+
5 3
200 + t
(200 + t)2
(200 + t)2
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
And applying initial conditions
2
c
9 1
(200) +
+
5 = Q(0) =
5 3
200
(200)2
c = −4600720
The solution is then,
2cos(t)
2sin(t)
4600720
9 1
2
Q(t) =
(200 + t) + sin(t) +
−
−
2
5 3
200 + t
(200 + t)
(200 + t)2
Now, the tank will overflow at t = 300hrs. The amount of salt in
the tank at that time is.
Q(300) = 279.80lbs
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Example 15
A 1000 gallon holding tank that catches runoff from some chemical
process initially has 800 gallons of water with 2 ounces of pollution
dissolved in it. Polluted water flows into the tank at a rate of 3
gal/hr and contains 5 ounces/gal of pollution in it. A well mixed
solution leaves the tank at 3 gal/hr as well. When the amount of
pollution in the holding tank reaches 500 ounces the inflow of
polluted water is cut off and fresh water will enter the tank at a
decreased rate of 2 gal/hr while the outflow is increased to 4gal/hr.
Determine the amount of pollution in the tank at any time t.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Solution
The pollution in the tank will increase as time passes. If the
amount of pollution ever reaches the maximum allowed there will
be a change in the situation.
This will necessitate a change in the differential equation
describing the process as well. In other words, we’ll need two IVP’s
for this problem. One will describe the initial situation when
polluted runoff is entering the tank and one for after the maximum
allowed pollution is reached and fresh water is entering the tank.
Here are the two IVPs for this problem.
Q1 (t)
0
Q1 (t) = (3)(5) − 3
Q(0) = 2
800
Dr. Marco A Roque Sol
0 ≤ t ≤ tm
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Q20 (t)
= (2)(0) − 4
Q2 (t)
800 − 2(t − tm )
Q(tm ) = 500 tm ≤ t ≤ te
The first one is fairly straight forward and will be valid until the
maximum amount of pollution is reached. We’ll call that time tm .
Also, the volume in the tank remains constant during this time so
we dont need to do anything fancy with that this time in the
second term as we did in the previous example.
We will need a little explanation for the second one. First notice
that we do not start over at t = 0. We start this one at tm , the
time at which the new process starts. Next, fresh water is flowing
into the tank and so the concentration of pollution in the incoming
water is zero. This will drop out the first term, and thats okay so
don’t worry about that.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Now, notice that the volume at any time looks a little funny.
During this time frame we are losing two gallons of water every
hour of the process so we need the − 2 in there to account for
that. However, we cant just use t as we did in the previous
example. When this new process starts up there needs to be 800
gallons of water in the tank and if we just use t there we won’t
have the required 800 gallons that we need in the equation. So, to
make sure that we have the proper volume we need to put in the
difference in times. In this way once we are one hour into the new
process (i.e t - tm = 1) we will have 798 gallons in the tank as
required.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Finally, the second process can’t continue forever as eventually the
tank will empty. This is denoted in the time restrictions as te. We
can also note that te = tm + 400 since the tank will empty 400
hours after this new process starts up.
Well, it will end provided something doesn’t come along and start
changing the situation again.
Okay, now that we’ve got all the explanations taken care of here’s
the simplified version of the IVP’s that we’ll be solving.
3Q1 (t)
0
Q1 (t) = 15 −
Q(0) = 2 0 ≤ t ≤ tm
800
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Q20 (t)
=− 2
Q2 (t)
400 − (t − tm )
Q(tm ) = 500 tm ≤ t ≤ te
The first IVP is a fairly simple linear differential equation so we will
leave the details of the solution to you to check.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
3t
Q1 (t) = 4000 − 3998e − 800
Now, we need to find tm . We need to do is determine when the
amount of pollution reaches 500. So we need to solve.
3t
Q1 (t) = 4000 − 3998e − 800 = 500
tm = 35.475
So, the second process will pick up at 35.475 hours. For
completeness sake here is the IVP with this information inserted
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Q20 (t)
=− 2
Q2 (t)
435.475 − t
Q(35.475) = 50035.475 ≤ t ≤ 435.475
This differential equation is both linear and separable and I will
leave the details to you again to check that we should get.
Q2 (t) =
(435.476 − t)2
320
Now, notice that the volume at any time looks a little funny.
During this time frame we are losing two gallons of water every
hour of the process so we need the − 2 in there to account for that.
However, we can’t just use t as we did in the previous example.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
When this new process starts up there needs to be 800 gallons of
water in the tank and if we just use t there we won’t have the
required 800 gallons that we need in the equation. So, to make
sure that we have the proper volume we need to put in the
difference in times. In this way once we are one hour into the new
process (i.e t − tm = 1) we will have 798 gallons in the tank as
required.
Finally, the second process cant continue forever as eventually the
tank will empty. This is denoted in the time restrictions as te. We
can also note that te = tm + 400 since the tank will empty 400
hours after this new process starts up. Well, it will end provided
something doesn’t come along and start changing the situation
again.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Okay, now that we’ve got all the explanations taken care of here’s
the simplified version of the IVP’s that we’ll be solving
3Q1 (t)
0
Q1 (t) = 15 −
Q(0) = 2 0 ≤ t ≤ tm
800
Q2 (t)
0
Q2 (t) = − 2
Q(tm ) = 500 tm ≤ t ≤ te
400 − (t − tm )
The first IVP is a fairly simple linear differential equation so we will
leave the details of the solution to you to check.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
3t
Q1 (t) = 4000 − 3998e − 800
Now, we need to find tm . We need to do is determine when the
amount of pollution reaches 500. So we need to solve.
3t
Q1 (t) = 4000 − 3998e − 800 = 500
tm = 35.475
So, the second process will pick up at 35.475 hours. For
completeness sake here is the IVP with this information inserted
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Q20 (t)
=− 2
Q2 (t)
435.475 − t
Q(35.475) = 50035.475 ≤ t ≤ 435.475
This differential equation is both linear and separable and again
isn’t terribly difficult to solve so I’ll leave the details to you again
to check that we should get.
Q2 (t) =
(435.476 − t)2
320
So, a solution that encompasses the complete running time of the
process is
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
(
Q(t) =
3t
4000 − 3998e − 800
(435.476−t)2
320
Dr. Marco A Roque Sol
0 ≤ t ≤ 35.475
35.475 ≤ t ≤ 435.4758
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Example 16
Escape Velocity
The model of constant gravitation only works when were close to
the surface of the earth, and the distances we’re dealing with are
small relative to the radius of the earth. If we start to deal with
larger distances, then we must take into account that acceleration
from gravity is weaker the farther we are away from the earth.
Newton’s law of universal gravitation tells us that the force from
gravity experienced a distance r from the center of the earth will
be:
GmM
F =− 2
r
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
where m is the mass of the object, M is the mass of the earth, and
G is Newtons gravitational constant G = 6.671011 Nm2 /kg 2 . We
can use this relation to calculate an objects escape velocity on
the surface of the earth. This is the speed at which an object must
be moving away from the earth at the earths surface if it is to
break free from the gravitational attraction of the earth and
continue to move away forever.
Well, we note that if we move away from the earth along a line that
goes through the earths center, then Newtons second law tells us:
m
GmM
d 2r
=− 2
2
dt
r
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
dv dr
By the chain rule we have v dv
dt = dr dt , and if we note v =
we can transform this relation into
mv
dv
GmM
=− 2
dr
r
If we integrate both sides with respect to r we get:
1 2 GmM
mv =
+c
2
r
And applying initial conditions, v (R) = v0 , we obtain:
1
1
2
2
v = v0 + 2GM
−
r
R
Dr. Marco A Roque Sol
Ordinary Differential Equations
dr
dt
then
First Order Differential Equations
Modeling
Modeling
If the object is to escape from the graviational action of the earth,
then its velocity must always be positive as r → ∞. This will be
the case if
r
2GM
v0 ≥
R
For the earth the escape velocity is v0 = 11, 180m/s
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Example 17
Escape Velocity
Suppose that you are stranded -your rocket engine has failed- on
an asteroid of diameter 3 miles, with density equal to that of the
earth with radius 3960 miles. If you have enough spring in your
legs to jump 4 feet straight up on earth while wearing your space
suit, can you blast off from this asteroid using leg power alone ?
Solution
The escape velocity for the Earth is
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
s
vE =
2GME
RE
Solving for ME in this equation we get:
ME =
vE2 RE
2G
The density of the earth is its mass divided by its volume
3vE2
ME
=
4
3
8πGRE2
3 πRE
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
A similar calculation can be done for the asteroid, and given both
the asteroid and the Earth have the same density we get:
3vE2
3vA2
=
8πGRE2
8πGRA2
With a little algebra from this we can deduce the ratio:
vA2
RA2
=
vE2
RE2
So, the escape velocity from the asteroid is
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
vA = vE
RA
RE
= 11, 180
1.5
3960
= 4.24m/s
At the begining of the jump, all the energy is initially kinetic,
1
2
2 mv , and at the top of the jump all that energy is converted into
potential energy, mgh. So, the final height is given by the equation:
p
v = 2gh
Plugging 4 feet in for h we get:
p
v = 2(9.8)(4ft)(1m/3.28ft) = 4.89m/s > 4.24m/s
So, yes, you can get off the asteroid !!!!
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Example 18
Compound Interest
Let S be an initial sum of money. Let r represent an interest rate.
We can model the growth of an initial deposit with respect to the
interest rate r with differential equations. Let’s assume that the
initial deposit is compounded continuously. If t represents time,
then the rate of change of the initial deposit is dS
dt , this quantity is
equal to the rate at which interest accrues, which is the interest
rate r times the current value of the investment S(t). Thus
dS
= rS(t)
dt
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Suppose that we also know the value of the investment at some
particular time, say,
S(0) = S0
Integrating this separable IVP
dS
= rS(t)
dt
1
dS = rdt
S
Z
Z
1
dS = rdt
S
ln|S| = rt + K
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
S(t) = ce rt
and using the initial condition that S(0) = S0 , we have that the
constant of integration is c = S0 . Therefore the solution to this
initial value problem is:
S(t) = S0 e rt
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
Example 19
Compound Interest
Let S be an initial sum of money. Let r represent an interest rate.
Assume that the initial deposit is compounded continuously. Let’
suppose that there may be deposits or withdrawals in addition to
the accrual of interest, dividends, or capital gains and the deposits
or withdrawals take place at a constant rate k. So the IVP is
dS
= rS(t) + k S(0) = S0
dt
( k > 0 for deposits and k < 0 for withdrawals)
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Modeling
Modeling
The above differential equation is a linear one, with integrating
factor e −rt , so its general solution is:
S(t) = ce rt −
k
r
and using the initial condition that S(0) = S0 , we have that the
constant of integration is c = S0 + kr . Therefore the solution to
this initial value problem is:
S(t) = S0 e rt +
k rt
e −1
r
Dr. Marco A Roque Sol
Ordinary Differential Equations
Download