Prelecture review
Related rates
Cars and intersec2on
Conical shell
Carts and pulley
Applica2ons of simple differen2al equa2ons to aphids and ladybugs
Qualita2ve methods applied to a predator-‐prey system
Quiz 4:
This quiz was: (A) Sort of fun! (B) A learning experience (C) Too hard and/or too confusing (D) I did not like having to finish it aOer class (E) I see that a spreadsheet can be helpful
Quiz 4 Solu2ons: Pa2ents in the Emergency Room
Q1) [5 Pts] Pa2ent 1 lapses in and out of consciousness due to methanol poisoning. The nurse informs you that when admiVed, at t = 0, the level of methanol in the pa2ent’s blood was 44 mg/kg body weight. Two hours later, the level had dropped to 11 mg/kg. According to your toxicology handbook, methanol decays in the blood following a simple decay differen2al equa2on.
UBC Math 102
Quiz 4 [Q1]: Q1) [5 Pts] Pa2ent 1 lapses in and out of consciousness due to methanol poisoning. The nurse informs you that when admiVed, at t = 0, the level of methanol in the pa2ent’s blood was 44 mg/kg body weight. Two hours later, the level had dropped to 11 mg/kg. According to your toxicology handbook, methanol decays in the blood following a simple decay differen2al equa2on.
(a) Differen2al eqn and ini2al condi2on:
UBC Math 102
Quiz 4 [Q1]: Q1) [5 Pts] Pa2ent 1 lapses in and out of consciousness due to methanol poisoning. The nurse informs you that when admiVed, at t = 0, the level of methanol in the pa2ent’s blood was 44 mg/kg body weight. Two hours later, the level had dropped to 11 mg/kg. According to your toxicology handbook, methanol decays in the blood following a simple decay differen2al equa2on.
b) Half life: The level dropped by factor of 4=22 in 2h, so in 1 h it dropped by factor of 2, and the half-‐life is 1 hour. (We also find from this that k = ln(2)/1=ln(2) per h.
UBC Math 102
Quiz 4 [Q1], cont’d:
(c) The pa2ent has to be kept under observa2on un2l his blood methanol level is at or below 2mg/kg. What is the earliest 2me at which this pa2ent can be discharged from the hospital? c(t) = We must solve for t in the equa2on
UBC Math 102
Quiz 4 [Q2]:
Pa2ent 2 requires immediate treatment by heparin for a suspected blood clot in the pulmonary vein. The drug is given through a con2nuous intravenous (IV) drip. It is cleared from the blood by the kidneys. The heparin level H(t) (measured in ``Interna2onal Units'' per millilitre, IU/ml) at 2me t (in hours) sa2sfies a differen2al equa2on and ini2al condi2on
UBC Math 102
Quiz 4 [Q2]: Pa2ent 2 requires immediate treatment by heparin for a suspected blood clot in the pulmonary vein. The drug is given through a con2nuous intravenous (IV) drip. It is cleared from the blood by the kidneys. The heparin level H(t) (measured in ``Interna2onal Units'' per millilitre, IU/ml) at 2me t (in hours) sa2sfies a differen2al equa2on and ini2al condi2on
UBC Math 102
Rate of infusion of drug by IV
(IU/ml per hour)
Rate of decay (clearance by
kidneys) (1/hour)
Ini2al heparin level (IU/ml)
Quiz 4 [Q2], cont’d:
Euler solu2on: AOer 1 2me step with
UBC Math 102
Quiz 4 [Q2], Group Version:
(c) OPTIONAL: The pa2ent's IV is disconnected at t=12 hours. What is the heparin level in the blood at t=24 hours? Use your spreadsheet to compute and plot a single graph of H(t) over the en2re 24 hours (0≤t≤24). At t=24h, H(t) = 0.000635377
UBC Math 102
Solu2on:
UBC Math 102
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0 6 12 18 24
heparin H(t)
Semng up the spreadsheet
In this column, some fixed values that will be used
Ini2al 2me t=0
Ini2ally H(0)=0
Steps along 2me axis
Semng up the spreadsheet
Right hand side of Diff’l Eqn Updated H(t)
value (Euler step)
Euler’s Method on spreadsheet:
Drag row down to t=12 to generate first 12 hrs
UBC Math 102
Disconnect IV at t=12 hrs
Change Diff’l Eq in one cell! Drag down again from there.
UBC Math 102
Help with Homework
Assignment 11 is due this week
UBC Math 102
Assignment11: Problem 1*
Growth of cubic crystal V(t) = volume
x(t) = side length Determine how the size of the crystal will change and how large that crystal can get.
* This problem appeared on a midterm test some years ago and would be a great exam-‐type problem, as it tests mul2ple concepts: (a) related rates and (b,c) diff’l eqns.
Assignment11: Problem 1*
Growth of cubic crystal V(t) = volume = x3
x(t) = side length (a) Convert to diff’l eq with only 1 variable (x(t)):
careful to use chain rule on dV/dt !! – see our example for cell volume in Lecture 11.3!
(b) Determine what this diff’l eqn predicts for x(t). (c) What is its size when it is growing at half its
ini2al rate? set dx/dt = ½ and solve for x
V(t)
x(t)
Assignment11: Problem 2
Biochemical reac2on; c(t) = concentra2on of substance: = f ( c ) Michaelis-‐Menten kine2cs! This is a great exam-‐type ques2on, as it uses mul2ple concepts in new ways: ra2onal func2ons, differen2al equa2ons, op2miza2on!
Assignment11: Problem 2
Biochemical reac2on; c(t) = concentra2on of substance: = produc2on – decay (a,b) Q’s about the Michaelis-‐Menten produc2on term (based on early lectures in M102) (c,d) Q’s about this diff’l eqn and its steady states (recent material) (3) Q about maximiza2on of f(c) (the RHS) !!
Assignment11: Problem 4
Common model for fish popula2ons with harves2ng F(t) = fish popula2on (in thousands) at 2me t dF/d t = -‐
UBC Math 102
(Density dependent)
Rate of growth
Rate of removal Due to
harves2ng
Assignment11: Problem 4
Common model for fish popula2ons with harves2ng propor2onal to fish popula2on F(t) = fish popula2on (in thousands) at 2me t dF/d t = -‐
UBC Math 102
r F (K-‐F) K h F
Phase space: propor2onal harves2ng
The rate of change: dF/dt logis2c hF growth F
UBC Math 102 See our treatment of the aphid popula2on model for a similar idea.. Which may help you with this problem
Back to differen2al equa2ons
We will apply our methods to a problem that we studied (par2ally) before.
UBC Math 102
Example 3: aphid popula2on
Lect 5.3: aphids and their ladybug predators
C. S. “Buzz” Holling, UBC: Type I, II, III predator
response.
UBC Math 102
Example 3: Aphid popula2on
Let x(t) = popula2on size of aphids at 2me t. Aphids reproduce at constant per capita rate. They get eaten by ladybugs.
UBC Math 102
Number of aphids
Num
ber o
f aph
ids e
aten
/hr
(1) Preda2on rate:
• Each ladybug eats p(x) aphids per hour. • The number of ladybugs is y Then the rate at which aphids are removed is: (A) P(x)=p(x) x (B) P(x)=p(x) y (C) P(x)=p(y) y (D) P(x) = x y (E) Not sure
UBC Math 102
Aphids die due to preda2on
The preda2on mortality rate (number aphids removed per hour) is Aphids also reproduce like crazy. The number of new aphids that are produced per hour is
G(x) = r x UBC Math 102
Previously:
We have asked when growth rate matches preda2on mortality. Now we can answer the ques2on: what happens to the aphid popula2on when these do NOT match!
The aphid popula2on will change!
UBC Math 102
(2) Which differen2al equa2on describes the rate of change of
aphids? (A) dx/dt = P(x,y) + G(x) (B) dx/dt = P(x,y) -‐ G(x) (C) dx/dt = G(x) -‐ P(x,y) (D) dx/dt = rx – m x (E) Not sure
Net aphid popula2on growth rate:
growth rate preda2on mortality rate
Net Growth Rate F(x) = G(x)-‐P(x,y)
Rate of change of aphid popula2on
dx/dt = net growth rate = F(x) = G(x)-‐P(x,y) We can find out how the aphid popula2on will change by sketching the func2on F(x)!
Let us assume that there is y=1 ladybug. Then
(3) Sketch the func2on F(x)=G(x)-‐P(x,1)
• My sketch looks like (from Lect 5.3): (A) (B) (C) (D)
My sketch looks like:
• Both func2ons:
• Subtrac2ng:
UBC Math 102
Use the sketch of net growth rate to indicate how the
aphid popula2on changes
UBC Math 102
Aphid popula2on, x
Solu2on:
UBC Math 102
Aphid popula2on, x
+-‐
+
Alternate way:
We can also see this from the graphs of the growth rate G(x) and preda2on rate P(x)
+
-‐
+
Aphid popula2on, x
(4) What does this tell us?
(A) One ladybug can control the aphid popula2on (B) The aphid popula2on will always grow (C) The ladybug popula2on has a carrying capacity (D) If there are too many aphids ini2ally, then one ladybug will not be able to control their level (E) A large aphid popula2on cannot be sustained due to resource limita2ons.
For further study:
(1) Draw a slope field and some solu2on curves for the same system
(2) How would your conclusions change for a type II predator response?
UBC Math 102
What if..
The growth rate of aphids is really high (1) or really low (2)? (1) (2)
What if the predator popula2on also changes?
Aphids: dx/dt = rate of (birth –mortality) -‐rate of preda2on
Ladybugs: dy/dt = rate of birth – rate of mortality
UBC Math 102
What if the predator popula2on also changes?
Aphids: dx/dt = rate of (birth –mortality) -‐rate of preda2on
Ladybugs: dy/dt = rate of birth – rate of mortality
UBC Math 102
The more I eat, the more babies I
make
What if the predator popula2on also changes?
Aphids: dx/dt = r x – P(x, y) Ladybugs: dy/dt = k P(x, y) – d y The popula2ons are linked to one another! “Coupled system of differen2al equa2ons”
UBC Math 102
(aphids, ladybugs)=(x(t), y(t)) Given an ini2al value of x and y, we can find how x and y change: Known (x,y) à pick small step Δt, à calculate (Δx, Δy) directly from DE
UBC Math 102
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
(aphids, ladybugs)=(x(t), y(t))
Pick a point:
UBC Math 102
Aphids, x
ladybu
gs y
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
(aphids, ladybugs)=(x(t), y(t))
UBC Math 102
Aphids, x
ladybu
gs y
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
(x(t), y(t))
(aphids, ladybugs)=(x(t), y(t))
use diff’l eq to compute and draw an arrow:
UBC Math 102
Aphids, x
ladybu
gs y
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
(Δx, Δy)
(x(t), y(t))
(aphids, ladybugs)=(x(t), y(t))
Con2nue this at many points: Direc2on field
UBC Math 102
Aphids, x
ladybu
gs y
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
(x(t), y(t))
Direc2on field: y x
UBC Math 102
Aphids, x
dx/dt = r x – P(x) y dy/dt = k P(x) y – d y
ladybu
gs y
(Δx, Δy)
(aphids, ladybugs)=(x(t), y(t))
Using the direc2on field, draw solu2on curves:
UBC Math 102
Aphids, x
ladybu
gs y
dx/dt = r x – P(x,y) dy/dt = k P(x, y) – dy
Solu2on curve
UBC Math 102
dx/dt = r x – P(x) y dy/dt = k P(x) y – d y
ladybu
gs y
Aphids, x
Solu2on curve
UBC Math 102
dx/dt = r x – P(x) y dy/dt = k P(x) y – d y
Aphids, x
ladybu
gs y
Cycles of aphids and ladybugs!
UBC Math 102
Aphids x(t)
ladybugs y(t)
2me
The solu2on curves are now in 3D
Curve for (t,x(t),y(t)):
Time t à
x
y
Stereoscopic view
Demo of XPP ..
Evalua2on forms
Please complete a teaching evalua2on:
hVps://eval.ctlt.ubc.ca/science Thank you for par2cipa2ng in this important survey!
XPP code: #x=aphids #y=ladybugs dx/dt=r*x-‐y*b*x^2/(k^2+x^2) dy/dt=y*c*x^2/(k^2+x^2)-‐d*y init x=50,y=1 param r=0.5,k=20,b=30,c=5,d=2 @ xplot=t,yplot=y,zplot=x,axes=3d @ xmin=0,xmax=100,ymin=0,ymax=5,zmin=0,zmax=60 @ xlo=-‐2,ylo=-‐2,xhi=2,yhi=2 @ phi=60 done
XPP is free soOware wriVen by my friend
Bard Ermentrout. See me for more informa2on
Answers
• 1 B • 2 C • 3 B • 4 D
UBC Math 102
Prac2ce Problems
Similar to problems that could appear on an exam
UBC Math 102
(1) Slope fields
The following slope field correspond to which differen2al equa2on? (Assume r > 0.)
UBC Math 102
(2) Steady states
Based on the slope field, what are the steady states and which are stable? (assume r > 0.)
UBC Math 102
Newton’s Law of cooling
Sketch a slope field and solu2on curves for the differen2al equa2on for Newton’s Law of cooling Assume that k=0.2, E=10.
UBC Math 102
(3) Steady state
The steady state temperature is (A) 10 (B) 5 (C) 2 (D) 0.2 (E) 0
UBC Math 102
General case
UBC Math 102
Now sketch a slope field and solu2on curves in the general case shown above (assume k>0)
(4) The steady state is
(A) T=0, unstable (B) T=kE, stable (C) T=kE, unstable (D) T=E, stable (E) T=E, unstable
UBC Math 102