MATH 219
Fall 2024
Lecture 3
Lecture notes by Özgür Kişisel
Content: Modeling with first order equations. (section 2.3)).
Suggested Problems: (Boyce, Di Prima, 10th edition)
§2.3: 4, 5, 6, 8, 12, 14, 18, 21, 23, 26, 29
1 Modeling with first order equations
The subject of differential equations is as old as calculus, with Newton, Leibniz and
mathematicians from the Bernoulli family among the first contributors. The growth
of the subject went hand in hand with applications. It is fair to say that the subject
of differential equations was among the key mathematical tools for the scientific
discoveries that took place before and during the industrial revolution. It retains its
prominence today.
We will discuss several different problems below that can be modeled by first order
ODE’s. There are some common features of the process of modeling a problem by
a differential equation. Among these are:
determining the dependent and independent variables,
relating the rates of change in the problem to the variables,
finding the initial conditions
Once the ODE and the initial conditions are set, the next step is to solve the initial
value problem.
Example: The position of a particle moving in space can be described using three
coordinate functions, each depending on a time parameter, say (x(t), y(t), z(t)). For
simplicity, let us assume that only one of these three functions is changing during
the motion of the particle, for instance we may imagine that the particle is moving
1
along the x-axis. The first derivative of x(t) is the velocity of the particle, and the
second derivative is its acceleration. In other words,
v(t) = x′ (t), a(t) = v ′ (t) = x′′ (t)
Newton’s second law of motion indirectly describes how x(t) changes. It implies, for a
particle of constant mass, that the acceleration of the particle is directly proportional
to the total force applied to it. The corresponding equation is the famous
F = ma.
Rewriting this law in terms of v(t) or x(t), we obtain the differential equations
v ′ (t) = F/m, x′′ (t) = F/m.
Of course, the actual nature of these equations highly depend on the function F
which may in principle depend on any of t, v, x or all of them. As a first case, let
us assume that F is constant. This happens, for instance, for a freely falling object
which is close to the surface of the earth. If F is constant, then a = a(t) will be a
constant. We get
v ′ (t) = a
Z t
v(t) = v(t0 ) + a · dτ
t0
v(t) = v(t0 ) + a · (t − t0 )
Now we can solve for x(t):
x′ (t) = v(t)
Z t
x(t) = x(t0 ) + v(τ )dτ
t
Z 0t
x(t) = x(t0 ) + v(t0 ) + a · (τ − t0 )dτ
t0
a · (t − t0 )2
x(t) = x(t0 ) + v(t0 ) · (t − t0 ) +
2
In this example, the differential equations were very easy to solve since their right
hand sides depended only on t. Integration is sufficient for solving the problem.
2
Example: Let us now assume that we are in the setting of the previous example, but
besides a constant force, there is an additional force on the object proportional to its
velocity. Such a model may be valid, for instance, for a freely falling object subject
to air resistance. An object that moves faster would collide with more air molecules
per unit time, so we can imagine that the restraining force will be increased when
velocity is increased. It is a strong assumption that the relation between this force
and the velocity is linear - actually, in many problems of aerodynamics, a non-linear
relation would be more realistic. However, we assume that the linear relation holds
for the sake of simplicity. Therefore the total force on the object is a function of the
form F0 − kv(t), where F0 and k are positive constants. The differential equation
for the velocity is
F0 − kv(t)
v ′ (t) =
m
As opposed to the previous example, the right hand side contains the dependent
variable now, so we cannot directly integrate. However, the equation is separable.
Suppose that v(t0 ) = v0 .
Z v Z t
dν dτ
=
F0 − kν t0 m
v0
1 F0 − kv t − t0
− ln =
k F0 − kv0 m
F0 − kv = (F0 − kv0 )e−k(t−t0 )/m
F0 F0 −k(t−t0 )/m
v = + v0 − e
k k
Notice that for t = t0 the formula indeed gives back v0 , which is a quick check on
the computation. The resulting function for v is the sum of a constant term and a
decaying exponential. Therefore, for t large enough we expect the velocity v to get
close to a “limiting velocity” whose value is equal to F0 /k.
Example: Understanding the population dynamics of a given species is a problem
of great interest in biological and environmental sciences. As a simplest possible
model, suppose that the rate of growth of the population of the species is directly
proportional to the existing population. This model could be valid in a case where
the number of offsprings per unit time is proportional to the population and there
are no other restraining factors such as a competing species or scarcity of food.
Then, the differential equation for the population P (t) at time t should be of the
3
form:
P ′ (t) = kP (t)
for a certain positive constant k. This is a separable equation again. Assume that
P (t0 ) = P0 .
Z P Z t
dρ
= kdτ
P0 ρ t0
P
ln = k(t − t0 )
P0
P (t) = P0 ek(t−t0 )
Since k > 0, the resulting function P (t) grows exponentially. Since, in a real life
situation, a population cannot increase indefinitely, this model could only be valid
for a limited time interval. When the population becomes large, possibly other
factors (such as scarcity of food or space) will be more dominant than the rate of
reproduction and this will cause an opposite trend. Such a model can be formed by
introducing a restraining factor proportional to the square of the population. Then
the new differential equation is
P ′ (t) = kP (t) − ℓP (t)2
where k and ℓ are positive constants. Since this equation is separable, we can solve
it by the usual methods. Instead of solving it, let us sketch its direction field and
comment on the qualitative behaviour of solutions. We took k = 2 and ℓ = 3 for
the figure below. Notice that the solutions are asymptotically decaying towards
0.66. In general, all solutions such that P0 > 0 will exponentially decay towards the
equilibrium solution P = k/ℓ.
It is not difficult to interpret the results in terms of population dynamics. If the pop-
ulation is initially below the critical value of k/ℓ, then the growth term is dominant
and the population begins to increase. Upon approaching k/ℓ, the restraint term
becomes more and more dominant. The population is monotone increasing, but it
cannot go above the critical value. Likewise, if the initial population is above the
critical value, then the restraining term is dominant and the population decreases.
This time, it decays exponentially to the critical value, but it cannot go below it.
Example: Suppose that a savings account initially contains 1000 TL 1 . Assume
that money is compounded continuously with the same interest rate, which implies
1
This was a significant amount of money when these notes were first written.
4
that the rate of change of money is proportional to the money in the account at
that time. If the amount of money in the savings account is 2000 TL at the end of
the second year, what will it be at the end of the fifth year?
Solution: Let M (t) denote the amount of money in the account at the end of year
t. We have M (0) = 1000. The assumption says
dM
= kM
dt
for some constant k. This is a separable equation and the solutions are
M (t) = cekt .
5
Since M (0) = 1000, we deduce that c = 1000. In order to find the value of k, use
the equation M (2) = 2000. Then,
2000 = 1000e2k
k = (ln 2)/2
Therefore the amount of money at the end of year t is given by the formula
M (t) = 1000e(ln 2)t/2 = 1000(2t/2 )
Finally, M (5) = 1000(25/2 ) = 5656.85 TL.
Example: At time t = 0 a tank contains 50 kg of salt dissolved in 1000 liters of
water. Assume that water containing 100 g of salt per liter is entering the tank at
a rate of 30ℓ/min and that the well-stirred mixture is leaving the tank at the same
rate. Find the amount of salt in the tank at any given time, and the limiting amount
of salt that is present in the tank after a very long time.
Solution: Let Q(t) denote the amount of salt (in kilograms) in the tank at time
t. Then the rate of change of Q(t) can be computed as the difference of the rate of
incoming salt and the rate of outgoing salt. The incoming rate is constant, namely
0.1kg/ℓ × 30ℓ/min = 3kg/min. However, the outgoing rate is not constant. It
changes with the concentration. The concentration of salt at time t is Q(t)/1000.
Therefore the outgoing rate must be 30Q/1000.
dQ 3Q
= 3−
Z dt Z 100
dQ dt
=
300 − 3Q 100
1 t
− ln |300 − 3Q| = +c
3 100
300 − 3Q = ce−3t/100
Q(t) = 100 + ce−3t/100
Since Q(0) = 50kg, we deduce that c = −50. Hence,
Q(t) = 100 − 50e−3t/100 .
The answer to the final question is limt→∞ Q(t) = 100kg.
6
Example: A tank initially contains 60 liters of pure water. A solution containing 1
g of salt per liter enters the tank at 2ℓ/min, and the perfectly mixed solution leaves
the tank at 3ℓ/min, therefore the tank is empty after 1 hour.
(a) Express the volume of solution in the tank in terms of t and write a differential
equation for the amount of salt in the tank at time t.
(b) Find the amount of salt in the tank after t minutes for t ≤ 60.
(c) What is the maximum amount of salt ever in the tank?
Solution: (a) V (t) = 60 − t. Let Q(t) denote the amount of salt in the tank at
time t.
dQ 3Q
=2− .
dt 60 − t
(b) Let us rewrite the equation as
dQ 3Q
+ = 2.
dt 60 − t
R
This is a first order linear equation with integrating factor µ(t) = exp( 3(60 −
t)−1 dt) = (60 − t)−3 . Multiplying the ODE by µ(t), we get
d((60 − t)−3 Q)
= 2(60 − t)−3
dt
(60 − t)−3 Q = (60 − t)−2 + c
Q(t) = 60 − t + c(60 − t)3 .
Since Q(0) = 0 we have c = −60−2 . So
(60 − t)3
Q(t) = 60 − t −
602
(c) At t = 0 and t = 60 we have Q = 0 therefore Q attains its maximum at an
interior point t∗ of the interval [0, 60]. At that point, we must have Q′ (t∗ ) = 0, so
3(60 − t∗ )2
−1 + 2
= 0
60
√
∗
60 − t = 1200 = 34.64
t∗ = 25.36
Q(t∗ ) = 23.09g