0% found this document useful (0 votes)
12 views

Math366 Lectures Lab3

Uploaded by

Charl Barangan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Math366 Lectures Lab3

Uploaded by

Charl Barangan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Math 366 - Differential Equations

Material Covering Lab 3

Compartmental Analysis
We now learn how to model some physical phonomena through DE.
General steps for modeling (you are encouraged to find your own):
- Fix the variables and decide which variable(s) are dependent and which are independent.
- Determine whether any rate of change is interesting to study the phenomenon.
- Look for any possible relation between the variables, this step may be useful to reduce the number of
variables.
- Look for any relation involving the rates of change of the variables (that is to say their derivatives).
A relation of this kind is a DE.
- Look for initial conditions.
- Solve the IVP.
- Graph the function. Comment on the result.
In this section we study simple systema with only one compartment (or block).

Mixing Problems
Let x t be the amount of substance dissolved in a fluid contained in a tank at time t. We usually
know the initial amount of the dissolved substance x0 .
Let V t be the volume of the fluid in the tank at time t.
Assumption: the solution in the tank is kept well stirred so the concentration of the substance is
uniform. This means that the concentration at time t is given by
x t
V t
Let Rin be the rate at which the substance enters the tank and Rout be the rate at which the substance
exits the tank.
[See picture on the board]
We have the following relation
dx
= Rin KRout
dt
Example: A large tank is filled to capacity with 500 gallons of pure water. Brine containing 2
pounds of salt per gallon is pumped into the tank at a rate of 5 gal/min. The well-mixed solution is
pumped out at the same rate. Find the mass x t of salt in the tank at time t. Do not forget to define a
suitable interval.
Sulution: on the board.

Let us check on Maple

d x t
ode d x t = 10 K
dt 100
d 1
x t = 10 K x t (1.1.1)
dt 100
ics d x 0 = 0
x 0 =0 (1.1.2)
dsolve ode, ics
1
K t
100
x t = 1000 K 1000 e (1.1.3)
1
K t
100
plot 1000 K 1000 e , t = 0 ..1000
1000

800

600

400

200

0
0 200 400 600 800 1000
t
Reading: Examples 1 and 2 on the textbook.

Population Models
Let p t be the population at time t.
Assumption: even if the population is always an integer we assume that p t is a continuous and
differentiable function.
dp
We also assume that the growth rate is proportional to the population present at time t.
dt
So we get the following DE
dp
= kp.
dt
[see the board for general solution]
We get
p t = p0 $ek$t .
This is called the Malthusian model.
Example: The population of a town grows according to the Malthausian model. The initial
population of 500 increases to 575 in 10 years. What will be the population in 30 years? How fast is
the population growing at t = 30 years?
Solution: on the board plus computations on Maple.

Read example 3 Section 3.2.

A more sophisticated model is the logistic model. We make the assuption that the growth rate is
negatively affected by some constrains which can be taken into account by assuming that there is a
upper bound p1 for the population. More precisely we get an equation of the form
dp
= A$p$ p1 Kp
dt
[General solution on the board]
We get
p1
p t = KA$p $t
1
1 C c$e
p1
In case we have an initial population p0 we get that c = K 1.
p0
Example: Suppose a student carrying a flu virus returns to an isolated college campus of 1000
students. If it is assumed that the rate at which the virus spreads is proportional not only to the
number p of infected students but also to the number of students not infected, determine the number
of infected students after 6 days if it is further observed that after 4 days x 4 = 50.
Solution: on the board.

Heating and Cooling (of Buildings)


Newton's law of Cooling
Let T t be the temperature inside a building at time t and let M t the temperature outside the building
at time t.
Empirical law: the rate of change of the temperature inside the building is proportional to the
difference between the temperature outside the building and the temperature inside the bulding.
The corresponding DE is
dT t
= K$ M t K T t
dt
Remark: notice that the constant K must be positive (see Exam 1) and it is the reciprocal of the time
1
constant .
K
The above DE can be refining by taking into account the following components.
- People, lights, and machines contribute to increase the rate of change of the temperature, we label this
contribution H t . Notice that H t will always be positive.
- Heater (or cooler) contribute to increase (or decrease) the rate of change of T. We label this
contribution U t . Notice that U t will be positive if we have a heating system or negative if we have
a cooling system.
The modified DE equation is:
dT t
= K$ M t K T t C H t C U t .
dt
However, no matter what DE we are using, we can always rewrite it as
dT t
C K$T t = Q t .
dt
[Solve the g
eneral equation on the board]
Final solution is
T t = eKKt $ eKt $Q t dt C C .
Read examples 1, 2, and 3 on your textbook (especially example 2 which is useful for exercise 6 on
Lab 3).
Example: On a mild Saturday morning while people are working inside, the furnace keeps the
temperature inside the building at 21 + C. At noon the furnace is turned off and the people go home. The
temperature outside is a constant 12 + C for the rest of the afternoon. If the time constant for the building
is 3hr, when will the temperature inside the building reach 16 + C ? If some windows are left open and
the time constant drop to 2hr, when will the temperature inside reach 16 + C ?
Solution: with reference to the above equation, we have Q t = K$M t C H t C U t . Since
during the period we are considering, the bulding is empty and everything is turned off, we have
H t = 0 and U t = 0, moreover M t = 12 + C is constant. So we can write
Q t d 12$K1
t/12 K1 (2.1)
In the first case we have
1
K1 d
3
1
(2.2)
3
and we have the general solution
T1 t d eKK1$t $ int eK1$t $Q t , t C C
t/eKK1 t eK1 t Q t dt C C (2.3)

T1 t
1 1
K t t
3 3
e 12 e CC (2.4)
Let us redefine the function
1 1
K t t
3 3
T1 t d e $ 12 e CC
1 1
K t t
3 3
t/e 12 e C C (2.5)
We need to make sure that the initial condition T 0 = 21 is satisfied so we need to solve:
solve T1 0 = 21, C
9 (2.6)
So the solution to the IVP is
1 1
K t t
3 3
T1 t d e $ 12 e C9
1 1
K t t
3 3
t/e 12 e C9 (2.7)
simplify expand T1 t
1
K t
3
12 C 9 e (2.8)
Remark: exponential term will eventually "die off".

Finally we need to solve


solve T1 t = 16, t
4
K3 ln (2.9)
9
at 5 digits

2.4328 (2.10)
+
If the time constant is 3hr, the building reaches 16 C at 2:26pm.

In the second case we have


Q t d 12$K2
t/12 K2 (2.11)
1
K2 d
2
1
(2.12)
2
and we have the general solution
T2 t d eKK2$t $ int eK2$t $Q t , t C C
t/eKK2 t eK2 t Q t dt C C (2.13)

T2 t
1 1
K t t
2 2
e 12 e CC (2.14)
Let us redefine the function
1 1
K t t
2 2
T2 t d e $ 12$e CC
1 1
K t t
2 2
t/e 12 e C C (2.15)
We need to make sure that the initial condition T 0 = 21 is still satisfied so we need to solve:
solve T2 0 = 21, C
9 (2.16)
So the solution to the IVP is
1 1
K t t
2 2
T2 t d e $ 12 e C9
1 1
K t t
2 2
t/e 12 e C9 (2.17)
simplify expand T2 t
1
K t
2
12 C 9 e (2.18)

Finally we need to solve


solve T2 t = 16, t
4
K2 ln (2.19)
9
at 5 digits

1.6219 (2.20)

If the time constant is 2hr, the building reaches 16 + C at 1:37pm.

Let us plot the two graphs together for comparison:


plot T1 t , T2 t , 12 , t = 0 ..5
21

20

19

18

17

16

15

14

13

12
0 1 2 3 4 5
t
T1(t) T2(t) Outside Temperature
Newtonian Mechanics
For simplicity's sake, we consider motions of a point along a linear path with coordinate x. We express
Newton's second law of motion as
dp
= F t, x, v
dt
where
dx
p is the momentum of the point which is m$v (where m is the mass and v = is the velocity)
dt
F represents the net sum of all the forces acting on the point, F may depend on time t, position x, and
velocity v.
Remark 1: we need to be careful in considering all the forces acting on the point.
dp d dv
Remark 2: = m$v = m$ = m$a since the mass m is considered constant.
dt dt dt
Read Examples 1, 2, 3, and 4 Sec. 3.5 on you textbook.
Example: An object of mass 5 kg is given an initial downward velocity of 50 m/sec and then allowed
to fall under the influence of gravity. Assume the force in newtons due to air resistance is K10 v, where
v is the velocity of the object in m/sec. Assume the object is initially 500m above the ground.
a) Write a DE describing the motion.
b) Determine the terminal velocity of the object.
c) Solve the IVP.
d) Determine when the object will strike the ground.
e) Plot the graph of motion from the beginning till the object hits the ground.
Solution: to be done in class.

Electrical Circuits
We consider two simple circuits.
RL-circuits
dI
L$ C R$I = E t
dt
where
E is the voltage (unit: volt, V),
I is the current (unit: ampere, A),
L is the inductance (unit: henry, H)),
R is the resistance (unit: ohm, Ω).
General solution: to be done in class.

RC-circuits
dq q
R$ C =E t
dt C
where
dq
we used the identity I =
dt
q is the charge (unit: coulomb C)
C is the capacitance (unit: farad F)
General solution: to be done in class.

Remark: in case E t is constant, the problems can be solve by separation of variables.

Read Examples 1 and 2 Sec. 3.5 on your textbook.

You might also like