Dif Eq S03

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Elementary Differential Equation

Session 3
2.3

Sahar Qajar
Sharif University of Technology

Spring 2024

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations

▶ Step 1: Construction of the Model.


▶ Step 2: Analysis of the Model.
▶ Step 3: Comparison with Experiment or
Observation.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

At time t = 0 a tank contains Q0 lb of salt dissolved


in 100 gal of water. Assume that water containing
1
lb of salt per gallon is entering the tank at a rate
4
of r gal/min and that the mixture is draining from
the tank at the same rate. Set up the initial value
problem that describes this flow process.
1. Find the amount of salt Q(t) in the tank at any
time, and also find the limiting amount QL that
is present after a very long time.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

2. If r = 3 and Q0 = 2QL , find the time T after


which the salt level is within 2% of QL .
3. Find the flow rate that is required if the value of
T is not to exceed 45 min.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

dQ
= rate in − rate out
dt
1
▶ rate in = lb/Gal times the flow rate r gal/min,
4
r
or lb/min.
4
rQ(t)
▶ rate out = lb/min.
100
(The concentration throughout the tank is the
Q(t)
same, namely, lb/gal.)
100
dQ r rQ(t)
= −
dt 4 100.
.
.
.
.
. . . . .
. . . .
. . . .
. . . .
. . . .
. . . . .
.
.
.
.
.
.
.
.
.
Modeling with First-Order Differential Equations
Mixing

dQ rQ(t) r
+ =
dt 100 4
Q(0) = Q0
The integrating factor is ert/100 . The general
solution is:

Q(t) = 25 + ce−rt/100

=⇒ c = Q0 − 25

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

Q(t) = 25 + (Q0 − 25)e−rt/100


=⇒ Q(t) = 25(1 − e−rt/100 ) + Q0 e−rt/100
=⇒ lim Q(t) = 25
t→∞
=⇒ QL = 25

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

Figure: Integral Solutions of the initial value problem


dQ/dt = r/4 − rQ/100. Q(0) = Q0 for r = 3 and several values of Q0 .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

r = 3, Q0 = 2QL = 50 =⇒ Q(t) = 25 + 25e−0.03t

2% of 25 is 0.5 =⇒ Q(T) = 25.5


=⇒ 25 + 25e−0.03T = 25.5 =⇒ e0.03T = 50
ln(50) ∼
=⇒ T = = 130.4 (min)
0.03

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Mixing

T = 45 =⇒ r =?
Q(t) = 25 + (Q0 − 25)e−rt/100
t := 45, Q0 := 50, Q(t) := 25.5
=⇒ 25.5 = 25 + 25e−0.45r
=⇒ e0.45r = 50
100
=⇒ r = ln(50) ∼
= 8.96 gal/min
45

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest

Suppose that a sum of money, S0 , is deposited in a


bank or money fund that pays interest at an annual
rate r. The value S(t) of the investment at any time
t depends on the frequency with which interest is
compounded as well as on the interest rate.
Financial institutions have various policies
concerning compounding: some compound monthly,
some weekly, and some even daily. Assume that
compounding takes place continuously. Set up an
initial value problem that describes the growth of
the investment.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest

dS
= rS
dt

▶ The rate of change of the value of the


dS
investment is .
dt
▶ The rate at which interest accrues is r.
▶ The corresponding initial condition is S(0) = S0

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest

dS
= rS
dt
S(0) = S0
The differential equation is both linear and
separable:
=⇒ S(t) = S0 ert

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest: extended to situations involving deposits or withdrawals in addition
to the accrual of interest, dividends, or annual capital gains.

If we assume that the posits or withdrawals take


place at a constant rate k, then
dS
= rS + k
dt
dS
− rS = k
=⇒
dt
where k is positive for deposits and negative for
withdrawals.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest: extended to situations involving deposits or withdrawals in addition
to the accrual of interest, dividends, or annual capital gains.

dS
− rS = k
dt
k
=⇒ S(t) = cert −
r
k
S(0) = S0 =⇒ c = S0 −
r
k
=⇒ S(t) = S0 ert + (ert − 1)
r

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest: extended to situations involving deposits or withdrawals in addition
to the accrual of interest, dividends, or annual capital gains.

Model of compounding occurs at finite time


intervals If interest is compounded once a year, then
after t years
S(t) = S0 (1 + r)t
If interest is compounded twice a year, then at the
end of 6 months the value of the investment is
S0 (1 + r/2), at the end of 1 year S0 (1 + r/2)2 and
at the end of t year

S(t) = S0 (1 + r/2)2t
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Compound Interest: extended to situations involving deposits or withdrawals in addition
to the accrual of interest, dividends, or annual capital gains.

In general, if interest is compounded m times per


year, then
r
S(t) = S0 (1 + )mt
m
The relation between two cases:
r
lim S0 (1 + )mt = S0 ert
m→∞ m

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

Consider a pond that initially contains 10 million


gallons of fresh water. Water containing an
undesirable chemical flows into the pond at the rate
of 5 million gallons per year, and the mixture in the
pond flows out at the same rate. The concentration
γ(t) of chemical in the incoming water varies
periodically with time according to the expression
γ(t) = 2 + sin(2t) g/gal. Construct a mathematical
model of this flow process and determine the
amount of chemical in the pond at any time. Plot
the solution and describe in words the effect of the
variation in the incoming concentration. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

dQ
= rate in − rate out
dt

▶ rate in = (5 × 106 ) gal/yr(2 + sin(2t))g/gal


▶ rate out = (5 × 106 ) gal/yr(Q(t)/107 )g/gal =
Q(t)/2 g/yr
dQ Q(t)
= (5 × 106 )(2 + sin(2t)) −
dt 2
where each term has the units of g/yr.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

Q(t)
q(t) =
106
dq 1
=⇒ + q = 10 + 5 sin(2t)
dt 2
Originally, there is no chemical in the pond, so the
initial condition is

q(0) = 0

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

dq 1
+ q = 10 + 5 sin(2t)
dt 2
q(0) = 0
Equation is linear, the coefficient of q is a constant.
Thus the integrating factor is et/2 .
Multiplying equation by this factor and integrating
the resulting equation, we obtain the general
solution:
40 10
q(t) = 20 − cos(2t) + sin(2t) + ce−t/2
17 17
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

dq 1
+ q = 10 + 5 sin(2t)
dt 2
300
q(0) = 0 =⇒ c = −
17
40 10 300 −t/2
q(t) = 20 − cos(2t) + sin(2t) − e
17 17 17

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chemicals in a Pond

Figure: Solution of the initial value problem dq/dt + q/2 = 10 + 5 sin(2t),


q(0) = 0.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

A body of constant mass m is projected away from


the earth in a direction perpendicular to the earth’s
surface with an initial velocity v0 . Assuming that
there is no air resistance, but taking into account
the variation of the earth’s gravitational field with
distance, find an expression for the velocity during
the ensuing motion. Also find the initial velocity
that is required to lift the body to a given maximum
altitude Amax above the surface of the earth, and
find the least initial velocity for which the body will
not return to the earth; the latter is the escape
velocity. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

Figure: A body in the earth’s gravitational field is pulled towards the


center of the earth.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

The gravitational force acting on the body (that is,


its weight) is inversely proportional to the square of
the distance from the center of the earth and is
given by:
k
w(x) = −
(x + R)2
k
w(0) = −mg =⇒ −mg = − 2
=⇒ k = mgR2
(0 + R)
mgR2
=⇒ w(x) = −
(x + R)2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

mgR2
w(x) = −
(x + R)2
dv mgR2
=⇒ m = −
dt (x + R)2
dv gR2
=⇒ =−
dt (x + R)2
v(0) = v0

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

dv dv dx dv
= =v
dt dx dt dx
dv gR2
=⇒ v = −
dx (x + R)2
Equation is separable but not linear, so by
separating the variables and integrating, we obtain
v2 gR2
=⇒ = +c
2 x+R
v(0) = v0
(Since x = 0 when t = 0, v = v0 when x = 0)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

v2 gR2
= +c
2 x+R
v(0) = v0
v20
=⇒ c = − gR
2

2gR2
v = ± v0 − 2gR +
2
x+R
The plus sign must be chosen if the body is rising,
and the minus sign must be chosen if it is falling
back to earth. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Escape Velocity

To determine the maximum altitude Amax :


v = 0 x = Amax

v20 R
=⇒ Amax =
2gR − v20

Amax
=⇒ v0 = 2gR
Amax + R
The escape velocity ve is:

ve = lim v0 = 2gR ∼ = 6.9 mi/s or 11.1km/s
Amax →∞

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

Find the shape assumed by a flexible chain


suspended between two points and hanging under
its own weight.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

▶ Let the y-axis pass through the lowest point of


the chain.
▶ Let s be the arc length from this point to a
variable point (x, y)
▶ Let w(s) be the linear density of the chain.

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

▶ The horizontal tension T0 at the lowest point


▶ The variable tension T at (x, y), which acts
along the tangent because of the flexibility of
the chain.
▶ Equating the horizontal component of T to T0
and the vertical component of T to the weight
of the chain gives:
∫ s
T cos θ = T0 , T sin θ = w(z)dz
0
dy
=⇒ T sin θ = T0 tan θ = T0
dx
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

∫ s

T0 y = w(z)dz
0
by differentiating with respect to x:
∫ s ∫ s
d d ds
T0 y′′ = w(z)dz = w(z)dz
dx 0 ds 0 dx

= w(s) 1 + (y′ )2

T0 y′′ = w(s) 1 + (y′ )2

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

We shall solve the equation for the case in which


w(s) is a constant w0 so that
√ w0
y′′ = a 1 + (y′ )2 , a =
T0
Let p = y′ , then y′′ = dp/dx and:
dp
√ = adx
1 + p2

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Modeling with First-Order Differential Equations
Chain

Integrating and use the fact that p = 0 when x = 0:



ln(p + 1 + p2 ) = ax
Solving for p
dy 1 ax
p= = (e − e−ax )
dx 2
1 1
=⇒ y = (eax + e−ax ) + C = cosh ax + C
2a a
1
Since if x = 0, y = and
a
1
y = cosh ax
a . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .

You might also like