Exponential growth and decay (Part 16): Logistic growth model

In this series of posts, I provide a deeper look at common applications of exponential functions that arise in an Algebra II or Precalculus class. In the previous posts in this series, I considered financial applications, radioactive decay, and Newton’s Law of Cooling.

Today, I discuss the logistic growth model, which describes how an infection (like a disease, a rumor, or advertise) spreads in a population. In yesterday’s post, I described an in-class demonstration that engages students while also making the following formula believable:

A(t) = \displaystyle \frac{Ly_0}{y_0+ (L-y_0)e^{-rt}}.

I’d like to discuss some observations about this somewhat complicated function that will make producing its graph easier. The first two observations are within reach of Precalculus students.

1. Let’s figure out the y-intercept:

A(0) = \displaystyle \frac{Ly_0}{y_0+ (L-y_0)e^{-r \cdot 0}} = \displaystyle \frac{Ly_0}{y_0+ L-y_0} = y_0.

In other words, the number y_0 represents the initial number of people who have the infection.

2. Let’s figure out the limiting value as t gets large:

\displaystyle \lim_{t \to \infty} A(t) = \displaystyle \frac{Ly_0}{y_0+ (L-y_0) \cdot 0} = \displaystyle \frac{Ly_0}{y_0} = L.

As expected, all L people will get the infection eventually. (Of course, Precalculus students won’t be familiar with the $\displaystyle \lim$ notation, but they should understand that e^{-rt} decays to zero as t gets large.

3. Let’s now figure out the point of inflection. Ordinarily, points of inflection are found by setting the second derivative equal to zero. Though this can be done for the function A(t) above, it would be a somewhat daunting exercise!

The good news is that the points of inflection can be found quite simply using the governing differential equation, which is

A' = r A [ L - A] = r L A - r A^2

Let’s take the derivative of both sides, remembering that r and L are constants:

A'' = r L A' - 2 r A A'

A'' = A' (r L - 2 r A)

So the second derivative is equal to zero when either A' = 0 or else r L - 2 r A = 0. The first case corresponds to the trivial cases A(t) \equiv 0 and A(t) \equiv L; these constants are called the equilibrium solutions. The second case is the more interesting one:

r L - 2 r A = 0

r L = 2 r A

\displaystyle \frac{L}{2} = A

This suggests that, as the infection spreads throughout a population, the curve changes concavity at the time that half of the population becomes infected. In other words, the infection spreads fastest throughout the population at the time when half of the population has been infected.

The time at which the point of inflection occurs can be found by setting A(t) = \displaystyle \frac{L}{2} and solving for t:

\displaystyle \frac{L}{2} = \displaystyle \frac{Ly_0}{y_0+ (L-y_0)e^{-rt}}.

\displaystyle \frac{1}{2} = \displaystyle \frac{y_0}{y_0+ (L-y_0)e^{-rt}}.

y_0 + (L-y_0) e^{-rt} = 2y_0

(L-y_0) e^{-rt} = y_0

e^{-rt} = \displaystyle \frac{y_0}{L-y_0}

-rt = \displaystyle \ln \left( \frac{y_0}{L-y_0} \right)

t = \displaystyle - \frac{1}{r} \ln \left( \frac{y_0}{L-y_0} \right)

This technique for finding the points of inflection directly from the differential equation is possible whenever the differential equation is autonomous, which loosely means that the independent variable does not appear on the right-hand side.

 

Exponential growth and decay (Part 15): Logistic growth model

In this series of posts, I provide a deeper look at common applications of exponential functions that arise in an Algebra II or Precalculus class. In the previous posts in this series, I considered financial applications, radioactive decay, and Newton’s Law of Cooling.

Today, I introduce the logistic growth model, which describes how an infection (like a disease, a rumor, or advertise) spreads in a population. For example:

or

Sources: http://www.xkcd.com/1220/ and http://www.xkcd.com/1235/

In yesterday’s post, I described an in-class demonstration that engages students while also making the following formula believable:

A(t) = \displaystyle \frac{L}{1 + (L-1)e^{-rt}}.

Where does this formula come from? Suppose that a disease is spreading in a population of size L. It stands to reason that the rate at which the disease spreads is proportional to the number of possible contacts between those who have the disease and those who don’t. If A(t) is the number of people who have the disease, then L-A(t) is the number of people who don’t have the disease. Therefore, the product A(t) [ L - A(t) ] is the number of possible contacts between those who have the disease and those who don’t. This leads to the governing differential equation

A'(t) = c A(t) [ L - A(t) ],

where c is the constant of proportionality. This is often rewritten by letting c = \displaystyle \frac{r}{L}, or r = cL:

A'(t) = \displaystyle \frac{r}{L} A(t) [ L - A(t) ]

A'(t) = r A(t) \displaystyle \left[1 - \frac{A(t)}{L} \right]

The good news is that this differential equation can be solved using separation of variables, just like the governing differential equations for continuous compound interest, paying off credit card debt, radioactive decay, and Newton’s Law of Cooling. The bad news is that it’s a lot harder to calculate the required integrals! After all, the right-hand side, after distributing, has a term containing A^2, which makes this differential equation non-linear.

Solving this differential equation is a bit tedious, and I don’t feel particularly obligated to re-invent the wheel since it can be found several places on the Internet. Suffice it to say that integration by partial fractions and some very tricky algebra is necessary to solve for A(t) and obtain the solution above. Among several different sources (which likely use different letters than the ones I’m using here):

  1. http://www.math.usu.edu/powell/ysa-html/node8.html
  2. http://www.youtube.com/watch?v=vsYWMEmNmZo
  3. http://www.math24.net/population-growth.html
  4. http://www.ugrad.math.ubc.ca/coursedoc/math101/notes/moreApps/logistic.html
  5. https://www.google.com/search?q=logistic+curve&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a#q=logistic+curve+%22partial+fraction%22&rls=org.mozilla:en-US:official

Wikipedia: http://en.wikipedia.org/wiki/Logistic_function#In_ecology:_modeling_population_growth

MathWorld: http://mathworld.wolfram.com/LogisticEquation.html

 

 

 

Exponential growth and decay (Part 14): Logistic growth model

In this series of posts, I provide a deeper look at common applications of exponential functions that arise in an Algebra II or Precalculus class. In the previous posts in this series, I considered financial applications, radioactive decay, and Newton’s Law of Cooling.

Today, I introduce the logistic growth model, which describes how an infection (like a disease, a rumor, or advertise) spreads in a population. Before I actually present the formula to my students, I usually perform a 8- to 10-minute demonstration to convince students that the formula actually works. This demonstration works well with between 15 and 45 students; I have personally not attempted this demo with a class larger than 45.

I wish I could take credit for the idea behind this demonstration. I’m afraid I can’t remember who told me the idea behind this demo about 15 years ago, but I’m thankful to him or her for this idea, as I’ve used it with great success over the years when teaching Precalculus and even when teaching Differential Equations.

Here’s the demonstration:

1. The class period before the demo, I ask my students to bring their calculators to class.

2. On the day of the demo, I prepare slips of paper with the numbers 1, 2, 3, etc. I hand these to my students as they take their seats before class starts (and, as needed, to students who arrive late).

3. I tell the class that we’re going to model how a rumor gets spread. On the chalkboard, I write down the numbers 0, 1, 2, …, up to N, the number of students in the class that day. Invariably, I get asked, “What’s the rumor?” In response, I’ll playfully point to someone in the front row and say, “The rumor is about him.”

4. I point out that, at time 0, only one person has heard the rumor…. me. I’m person number 0 (confirming the popular belief of my students). So I’ll cross out the 0 on the board and mark on a table that only one person has heard the rumor so far. (Here’s the spreadsheet that I’ve used to keep track of this information while simultaneously making a graph of the data: logisitic).

5. I begin to spread the rumor. To spread the rumor, I use my calculator to get a random number between 0 and N. This can be done by just using the built-in random number generator found on many calculators and then multiplying by N+1. (After all, there are L= N+1 people in the room: N students plus one instructor.) The part after the decimal point is not important; the number before the decimal point represents the next person to hear the rumor.

For example, in the figure below, I would tell that person #35 of my class of 37 students was the next to hear the rumor. (If my random number is 0, I’ll privately cheat and get until I get a random number other than 0. I only permit the possibility of cheating on the first step so that the data fits the predicted curve as accurately as possible.)

randomnumber6. At this point, I’ll X out the number of the next person to hear the rumor (in this case, 35), and I then ask how many people have heard the rumor. Obviously, two people have heard the rumor. So I’ll note on the table that two people have heard the rumor after one step.

7. Now we repeat the process. I get a new random number, and I ask the first student to pull out his/her calculator to get a random number too. But there’s an important rule: if you get a number that’s already been called, that’s OK. This models what really happens when a rumor (or disease) spreads in a population — it’s perfectly possible to hear the rumor twice.

8. We repeat the process — X’ing out numbers that have been previously called and students calling out the next person to hear the rumor — until the entire class hears the rumor. At some point, it becomes easiest to ask students to only call out if they get a number that hasn’t been called yet. Invariably, there’s always one person at the end who hasn’t heard the rumor yet, and this student is often the subject of some good-natured ribbing. Eventually, a chart like the following is produced.

logistic1

9. Students immediately see that this is a different type of function than pure exponential growth. It actually does start off looking like exponential growth, but at some point the curve levels off. This makes sense because there’s a limiting value of L=N+1 (in this case, 38), which can’t happen for a model like A = A_0 e^{rt}

10. The punchline is that the spreadsheet secretly computes the actual curve predicted by the logistic growth model. The numbers are actually located in column C, which is conveniently hidden beneath the graph. The function is

A = \displaystyle \frac{L}{1 + (L-1)e^{-rt}},

where r = \ln 2. (Had each person the rumor to two different people at each step, then r would have been equal to r = \ln 3.) Here’s the graph, superimposed upon the data collected from class. I can do this pretty quickly in class because the curve is actually already drawn in the figure above… but it’s drawn in gray, the same color as the background. By changing the color to black, the graph becomes clear:

logistic2

I never expect the curve to exactly fit the data, but it should come pretty close. After this fairly dramatic revelation, my students are completely sold that the mathematics that I’m about to show them actually works.

 

 

 

Exponential growth and decay (Part 13): Newton’s Law of Cooling

In this series of posts, I provide a deeper look at common applications of exponential functions that arise in an Algebra II or Precalculus class. In the previous posts in this series, I considered financial applications. In today’s post, I’ll discuss Newton’s Law of Cooling, which describes how quickly a hot object cools in a room at constant temperature. (This law is not to be confused with Newton’s Three Laws of Motion.)

While Newton’s Law of Cooling is easy to state, not many high school teachers are aware of the physical principles from which they arise. The basic idea is that the rate at which a hot object cools is proportional to the difference between its current temperature and the surrounding temperature. After solving the appropriate differential equation, the temperature T(t) of the object is found to be

T = S + (T_0 - S) e^{-kt},

where t is the time, S is the constant surrounding temperature, and k is a constant that depends on the object.

Of course, students in Algebra II or Precalculus (or high school physics) are usually not ready to understand this derivation using calculus. Instead, they are typically given the final formula and are expected to use this formula to solve problems. Still, I think it’s important for the teacher of Algebra II or Precalculus to be aware of how the origins of this formula, as it only requires mathematics that’s only a year or two away in these students’ mathematical development.

This is the third application of exponential functions considered in this series; the previous two were continuous compound interest and radioactive decay. Unlike these previous two applications, Newton’s Law of Cooling can actually be demonstrated in class to engage students. All that’s required is the appropriate classroom technology and a standard-issue temperature probe.This stands in sharp contrast to the previous applications of exponential functions considered in this series. While students can easily envision making money via compound interest, no one will actually give them the money during class. And certainly I don’t encourage performing a real demonstration of radioactive decay with, say uranium-235, during class time! (There are ways of simulating radioactive decay using M&Ms or other manipulatives, however.)

A simple Google search yields thousands of webpages describes multiple classroom activities for Newton’s Law of Cooling. Some activities merely require collecting data and performing a regression fit to an exponential curve; such an activity would be appropriate for middle-school students. Other activities are more explicit about using Newton’s Law of Cooling. Here’s a sampling:

  1. Texas Instruments TI-Nspire: http://education.ti.com/en/us/activity/detail?id=807CCDFC77B74AC093C38E9228235057&ref=/en/us/activity/search/subject?s=75FE5490E95144559647544901BAF03C&sa=F42399B372FE47E9AFDD4B725E6E6690&t=0FFA852BE3A54A5C949F5552EE003E98
  2. Vernier: http://www2.vernier.com/sample_labs/EZ-TMP-17-newton_cooling.pdf
  3. PBasic: http://gk12.poly.edu/amps-cbri/pdf/TELesson-Newton%27s%20Law%20of%20Cooling.pdf
  4. TI-83/TI-84: http://education.ti.com/en/us/activity/detail?id=934E66B83D2B4D8E93B89D36A87863C7
  5. TI CBL: http://www-tc.pbs.org/teachers/mathline/lessonplans/pdf/hsmp/penniespressure.pdf
  6. Casio: http://www.casioeducation.com/resource/pdfs/cooling.pdf

These links are aimed at a students at a variety of levels. Indeed, it’s possible to use a graphing calculator to plot the numerical derivative T'(t) as a function of time, use linear regression to solve for the constant k, and then produce the exponential curve using this value of k. Several years ago, I saw an effective demonstration of this idea at the Joint Mathematics Meetings in which the presenters covered these aspects of Newton’s Law of Cooling in less than 10 minutes. (Naturally, additional time is needed when students perform these activities for themselves.)

Exponential growth and decay (Part 12): Newton’s Law of Cooling

In this series of posts, I provide a deeper look at common applications of exponential functions that arise in an Algebra II or Precalculus class. In the previous posts in this series, I considered financial applications. In today’s post, I’ll discuss Newton’s Law of Cooling, which describes how quickly a hot object cools in a room at constant temperature. (This law is not to be confused with Newton’s Three Laws of Motion.)

While Newton’s Law of Cooling is easy to state, not many high school teachers are aware of the physical principles from which they arise. The basic idea is that the rate at which a hot object cools is proportional to the difference between its current temperature and the surrounding temperature. In other words, in a room at a temperature of $70^\circ$F, a very hot object at $270^\circ$F will cool twice as fast than when its temperature drops to $170^\circ$F.

The above paragraph can be rewritten as a differential equation. Let $T(t)$ be the temperature of the object at time t, and let S be the (constant) surrounding temperature that surrounds the object. Since the rate at which the substance decays is dT/dt, we find that

\displaystyle \frac{dT}{dt} = - k (T - S),

where k is a constant that depends on the object. The negative sign on the right-hand side isn’t strictly necessary, but it’s a reminder that amount present decreases as time increases.

This differential equation can be solved in several ways, including separation of variables (below, I’ll be sloppy with the constant of integration for the sake of simplicity):

\displaystyle \frac{dT}{T-S} = -k

\displaystyle \int \frac{dT}{T-S} = - \displaystyle \int k \, dt

ln |T-S| = -k t + C

|T-S| = e^{-kt+C}

|T-S| = e^{-kt} e^C

T-S = \pm e^C e^{-kt}

T-S = C e^{-kt}

T = S + C e^{-kt}

To solve for the constant, we usually use the initial condition T(0) = T_0, a number that must be given in the problem:

T(0) = S + C e^{-k \cdot 0}

T_0 =S + C \cdot 1

T_0 - S = C

Plugging back in, we obtain the final answer

T = S + (T_0 - S) e^{-kt}

Of course, students in Algebra II or Precalculus (or high school physics) are usually not ready to understand this derivation using calculus. Instead, they are typically given the final formula and are expected to use this formula to solve problems. Still, I think it’s important for the teacher of Algebra II or Precalculus to be aware of how the origins of this formula, as it only requires mathematics that’s only a year or two away in these students’ mathematical development.

The careful reader will notice that this derivation essentially parallels the previous derivations for continuous compound interest and for radioactive decay. In other words, these phenomena from apparently different realms of life have similar solutions because the governing differential equations are very similar.

The Doppler shift and Flight 370

The following report from CNN (http://www.cnn.com/2014/03/24/world/asia/malaysia-airlines-satellite-tracking/index.html?hpt=hp_t1; the video from CNN can be found at http://www.cnn.com/video/data/2.0/video/world/2014/03/24/lead-foreman-satellite-data-mh370.cnn.html) discusses in layman’s terms how applied mathematicians were able to track the final moments of Flight 370. Here are the relevant paragraphs:

The mathematics-based process used by Inmarsat and the UK’s Air Accidents Investigation Branch (AAIB) to reveal the definitive path was described by McLaughlin as “groundbreaking.”

“We’ve done something new,” he said.

Here’s how the process works in a nutshell: Inmarsat officials and engineers were able to determine whether the plane was flying away or toward the satellite’s location by expansion or compression of the satellite’s signal.

What does expansion or compression mean? You may have heard about something called the Doppler effect.

“If you sit at a train station and you listen to the train whistle — the pitch of the whistle changes as it moves past. That’s exactly what we have,” explained CNN Meteorologist Chad Myers,who has studied Doppler technology. “It’s the Doppler effect that they’re using on this ping or handshake back from the airplane. They know by nanoseconds whether that signal was compressed a little — or expanded — by whether the plane was moving closer or away from 64.5 degrees — which is the latitude of the orbiting satellite.”

Each ping was analyzed for its direction of travel, Myers said. The new calculations, McLaughlin said, underwent a peer review process with space agency experts and contributions by Boeing.

It’s possible to use this analysis to determine more specifically the area where the plane went down, Myers said. “Using trigonometry, engineers are capable of finding angles of flight.”

My understanding is that even though the pings from a satellite to the plane and back were occurring, even though the plane’s location was not being transmitted. From the Doppler shift of those pings, the plane’s trajectory could be reconstructed.

Someday, for teaching purposes, I hope that a formal write-up of this procedure is published. The details will probably be over the heads of most students, but this is a eye-catching, though indescribably tragic, example of how mathematics can be creatively used to solve a mystery.

Gravity wells

xkcdgravity_wells

This is one of most creative diagrams that I’ve ever seen: the depth of various solar system gravity wells. A large version of this image can be accessed at http://xkcd.com/681_large/.

From the fine print:

Each well is scaled so that rising out of a physical well of that depth — in constant Earth surface gravity — would take the same energy as escaping from that planet’s gravity in reality.

Depth = \displaystyle \frac{G M}{g r}

It takes the same amount of energy to launch something on an escape trajectory away from Earth as it would to launch is 6,000 km upward under a constant 9.81 \hbox{m}/\hbox{s}^2 Earth gravity. Hence, Earth’s well is 6,000 km deep.

Here’s some more details about the above formula.

Step 1. The escape velocity from the surface of a spherical planet is

v = \displaystyle \sqrt{ \frac{2GM}{r} },

where G is the universal gravitational constant, M is the mass of the planet, and r is the radius of the planet. Therefore, the kinetic energy needed for a rocket with mass m to achieve this velocity is

E = \displaystyle \frac{1}{2} m v^2 = \frac{GMm}{r}

Step 2. Suppose that a rocket moves at constant velocity upward near the surface of the earth. Then the force exerted by the rocket exactly cancel the force of gravity, so that

F = mg,

where g is the acceleration due to gravity near Earth’s surface. Also, work equals force times distance. Therefore, if the rocket travels a distance d against this (hypothetically) constant gravity, then

E = mgd

The depth formula used in the comic is then found by equating these two expressions and solving for d.