Back to the on-screen lesson ·

First-order models: mixing, cooling and growth

Turning a situation into $\frac{dA}{dt} = \text{rate in} - \text{rate out}$: a stirred tank, Newton's law of cooling, and exponential against logistic growth.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to turn a described situation into a first-order differential equation by writing its rate in and rate out, give the outflow of a stirred tank the tank's own concentration, apply Newton's law of cooling to the gap rather than to the temperature, tell exponential growth from logistic growth and name the capacity a logistic model approaches, and check a model by the units of its terms before solving it.

2. What you already have

You can solve separable and linear first-order equations, and you know that a linear equation with a constant coefficient settles to a steady state. This lesson is about the step before all of that: reading a situation described in words and writing down the equation it obeys, which is the part no method can check for you.

3. Words for this lesson

TermWhat it means
CompartmentWhatever the quantity is counted in: a tank, a room, a population.
Rate in, rate outAmounts per unit time entering and leaving; the model is always their difference.
ConcentrationAn amount per unit volume, so concentration times flow rate is a rate.
Well stirredThe assumption that the concentration is the same throughout, so what leaves carries the tank's concentration.
Newton's law of coolingThe rate of change of temperature is proportional to the difference from the surroundings.
Logistic growthExponential growth multiplied by the fraction of the capacity still unused.
Carrying capacityThe value logistic growth approaches: its stable equilibrium.

4. Rate in minus rate out

Every model in this lesson is the same sentence:

$$\frac{d(\text{amount})}{dt} = (\text{rate in}) - (\text{rate out}).$$

The work is in writing the two rates, and each of them has to be an amount per unit time or the equation is not an equation.

A mixing tank. Brine at $c_{\text{in}}$ grams a litre enters at $r$ litres a minute, and the well-stirred mixture leaves at the same rate from a tank holding $V$ litres. Then

$$S' = c_{\text{in}}r - \frac{S}{V}r.$$

The second term is the one that has to be thought about: what leaves is the tank's own mixture, so its concentration is $S/V$ — the amount dissolved divided by the volume — and never the incoming concentration.

Cooling. $T' = -k(T - T_{\text{room}})$. Writing $u = T - T_{\text{room}}$ turns it into $u' = -ku$, so it is the gap that decays exponentially. The temperature does not: it approaches the room's temperature and stops.

Growth. $P' = kP$ is exponential and unlimited. Multiplying by the fraction of room left gives

$$P' = kP\left(1 - \frac{P}{M}\right),$$

which behaves like exponential growth while $P$ is small and flattens as $P$ approaches the capacity $M$.

The cheapest check on any of this is units. Every term must have the units of the left-hand side, and a term that does not is wrong before any solving starts.

Another way: picture

Picture the compartment as a bath with a tap and a plug hole. The tap is under your control and usually runs at a fixed rate. The plug hole is not: what goes down it depends on what is in the bath, which is why the outflow term almost always contains the unknown and the inflow term usually does not. That single asymmetry is what makes these equations first-order linear rather than trivial.

Another way: steps

  1. Name the quantity and its units, and say what $t$ is measured in.
  2. Write the rate in, as an amount per unit time.
  3. Write the rate out, as an amount per unit time — and ask what concentration or proportion it really uses.
  4. Check that both terms have the units of the derivative.
  5. Add the initial condition, solve, and read the answer back into the situation.

5. Why the gap cools and the temperature does not

Newton's law is stated about a difference, and every consequence of it is about that difference. With $u = T - T_{\text{room}}$ the equation is $u' = -ku$, so $u$ halves over some fixed stretch of time and halves again over the next one of the same length. The temperature itself is $T_{\text{room}} + u$, and a sum of a constant and an exponential is not an exponential.

This matters because the wrong version is so easy to apply and gives answers that look reasonable for a while. A drink at $80$ degrees in a $20$ degree room that reaches $50$ after ten minutes has a gap of $60$ falling to $30$: another ten minutes takes the gap to $15$ and the drink to $35$. Halving the temperature instead would give $25$, and the step after that would give $12.5$ — a drink colder than the room it is sitting in, which no amount of cooling achieves.

The same reasoning runs in reverse for something warming up, and the same constant $k$ describes both. The law has no preferred direction; the sign of the gap supplies it.

Temperature in degrees against time in minutes for a drink starting at 80 in a 20 degree room. It reads 50 at 10 minutes, 35 at 20 and 27.5 at 30: the gap above the room halves each 10 minutes, so the curve flattens toward 20 and never drops below it.
Temperature in degrees against time in minutes for a drink starting at 80 in a 20 degree room. It reads 50 at 10 minutes, 35 at 20 and 27.5 at 30: the gap above the room halves each 10 minutes, so the curve flattens toward 20 and never drops below it.

The chart follows that drink: 80, 50, 35 and 27.5 degrees at ten-minute steps, flattening toward the room and never below it.

6. Reading a model back, and what it is not

A model is an argument about a situation, not a description of it, and the final step of every problem here is saying what the answer means and where it stops being believable.

The steady state is usually the useful number. A mixing tank settles at the incoming concentration; a cooling drink settles at room temperature; a logistic population settles at its capacity. In each case the value can be found by setting the derivative to zero, without solving anything.

The assumptions are visible in the terms. Well-stirred is what lets the outgoing concentration be $S/V$ rather than something that depends on where the outlet is. Equal flow rates is what keeps $V$ constant; unequal rates make $V$ a function of $t$ and the equation harder.

A fitted constant is not a law. The $k$ in a cooling problem is measured from data, and a model that matches two measurements will still drift from a third. That is not a failure of the mathematics but the ordinary situation, and the honest report of a model always says which observations fixed it.

7. Building a model, step by step, and checking it

Every model in this lesson is built from the same four moves, and most errors come from skipping one.

  1. Name the quantity and its units. Salt in grams, temperature in degrees, population in individuals, time in minutes or hours. The derivative then has units of quantity per time, and every term of the equation must have those same units. This is the cheapest check there is.
  2. Write the balance. For a quantity that flows, the rate of change is the rate in minus the rate out. For cooling, the rate is proportional to the gap from the surroundings. For growth, the rate is proportional to the population, reduced as it nears capacity. Say the sentence first, then turn each phrase into a term.
  3. Fill in each term from the situation. A rate out of a well-stirred tank is the outflow in litres a minute times the concentration, $\frac{S}{V}$ grams a litre. If the flows differ, $V$ changes with time and must be written as a function of $t$ before anything else.
  4. Add the initial condition from the words: pure water means $S(0) = 0$; a dish taken from an oven gives its starting temperature.

Then solve with the method the equation calls for. A balance with constant coefficients is linear and separable; a volume that changes gives a variable coefficient and needs an integrating factor; a logistic equation separates by partial fractions but can usually be answered without solving at all.

How to check a model and its answer.

If any of these fails, the fault is almost always in step 3: a rate out written with the inflow's concentration instead of the tank's, or a volume assumed constant when the flows differ.

8. In the world: the time of death

Forensic pathologists estimate the time of death with Newton's law of cooling, and the calculation is this lesson's method with the unknown run backwards.

A body is found in a room at $20$ degrees. At 9:00 its temperature is $30$ degrees, and at 10:00 it is $28$. Work with the gap above the room: $10$ at 9:00, $8$ at 10:00. The gap obeys $u' = -ku$, so it is multiplied by $e^{-k}$ each hour, and $e^{-k} = \frac{8}{10}$, which gives $k = \ln\frac{10}{8} = \ln 1.25 \approx 0.223$ per hour.

At death the body was at about $37$ degrees, a gap of $17$. The gap fell from $17$ to $10$ in some unknown time $t$ before 9:00: $10 = 17e^{-kt}$, so $t = \frac{\ln(17/10)}{k} = \frac{0.531}{0.223} \approx 2.38$ hours, about 2 hours 23 minutes. The estimate is 6:37.

The model's assumptions show in the method's limits. A body is not a well-mixed object: its surface cools first, and for the first hours after death the core barely changes (the plateau), so pathologists correct Newton's law for it. A room whose temperature changed overnight breaks the constant $T_{\text{room}}$. And two readings an hour apart fix $k$ only as well as the thermometer allows: a reading off by half a degree moves the estimate by about twenty minutes. The honest report gives a window, not a minute.

9. In the world: how long a polluted lake takes to recover

A lake of volume $V$ fed by clean rivers at $r$ cubic metres a year, and drained at the same rate, is a well-stirred tank. Once a factory stops discharging, the pollutant $S$ in the lake obeys $S' = -\frac{r}{V}S$, and $S = S_0e^{-rt/V}$.

The number $\frac{V}{r}$ is the lake's residence time, the time the inflow takes to replace the whole volume, and it sets everything. Reducing the pollution to a tenth takes $\frac{V}{r}\ln 10 \approx 2.3\frac{V}{r}$. For a lake with a residence time of $3$ years that is about $6.9$ years; for Lake Superior, with a residence time of about $190$ years, it is about four and a half centuries. That single ratio is why the smaller Great Lakes recovered from the pollution of the 1960s within decades and the largest will not recover within a lifetime.

The model is the mixing tank of this lesson with zero concentration coming in, and its weakness is the same assumption: well stirred. A real lake is layered in summer, pollutants settle into sediment and are released again, and bays exchange water slowly with the main body. Each of those adds a term to the balance, which is how the simple model grows into the ones environmental agencies actually run.

10. The outflow uses the tank's concentration, not the tap's

The single most expensive slip in these problems is writing the outflow term with the incoming concentration in it, or with no concentration at all. Both come from the same place: the inflow is given in the question as a pair of numbers, and it is tempting to treat the outflow as its mirror image. It is not. What leaves is the mixture that is in the tank now, so its concentration is the unknown divided by the volume — and that is exactly why the unknown appears in the equation. A model whose outflow term contains no $S$ is not a differential equation about $S$ at all; it is arithmetic, and it predicts a tank that empties of salt at a fixed rate for ever. The units are the quickest way to catch it: the rate out must come to grams a minute, and a concentration in grams a litre times a flow in litres a minute is the only combination of the available quantities that does.

11. A mixing tank, from words to answer

  1. A $200$ litre tank of pure water takes brine at $3$ grams a litre and $4$ litres a minute; the stirred mixture leaves at $4$ litres a minute. Fix the volume first.

    $\text{in} = \text{out} = 4 \text{ L/min} \quad\Rightarrow\quad V = 200 \text{ L always}$

    Equal flow rates keep the volume constant.

  2. Write the rate in and the rate out, both in grams a minute.

    $\text{in} = 3 \times 4 = 12, \qquad \text{out} = \dfrac{S}{200} \times 4 = \dfrac{S}{50}$

    The mixture leaving carries the tank's concentration, $S/200$.

  3. Rate of change is rate in minus rate out.

    $S' = 12 - \dfrac{S}{50} \quad\Rightarrow\quad S' + \dfrac{S}{50} = 12, \quad S(0) = 0$

    It is linear with constant coefficients, in standard form.

  4. Find the steady state and check it against the situation.

    $S' = 0 \;\Rightarrow\; S = 12 \times 50 = 600 \text{ g} = 200 \text{ L} \times 3 \ \tfrac{\text{g}}{\text{L}}$

    The tank ends at the incoming concentration, exactly as it should.

  5. Write the full solution.

    $S = 600 + Ce^{-t/50}, \quad S(0) = 0 \Rightarrow C = -600, \quad S = 600\left(1 - e^{-t/50}\right)$

    Steady state plus a transient, with the constant fixed by the empty start.

12. Logistic growth, read without solving

  1. Take $P' = 0.5P\left(1 - \dfrac{P}{800}\right)$ with $P(0) = 100$. Find the equilibria by setting the rate to zero.

    $0.5P\left(1 - \dfrac{P}{800}\right) = 0 \quad\Rightarrow\quad P = 0 \ \text{or}\ P = 800$

    A product is zero when a factor is. Where the rate is zero the population does not move.

  2. Read the sign of the rate between the equilibria, at a test value such as $P = 400$.

    $0 < P < 800: \quad P > 0,\ 1 - \dfrac{P}{800} > 0 \quad\Rightarrow\quad P' > 0$

    Both factors are positive, so the population grows.

  3. Read the sign above the capacity, at a test value such as $P = 1000$.

    $P > 800: \quad P > 0,\ 1 - \dfrac{P}{800} < 0 \quad\Rightarrow\quad P' < 0$

    One factor turns negative, so a population above capacity shrinks. Both sides move towards $800$.

  4. Find where growth is fastest by maximising the right-hand side in $P$.

    $\dfrac{d}{dP}\left[0.5P - \dfrac{P^{2}}{1600}\right] = 0.5 - \dfrac{P}{800} = 0 \quad\Rightarrow\quad P = 400$

    The right-hand side is a downward parabola in $P$, largest halfway between its zeros.

  5. Find the largest growth rate by substituting $P = 400$.

    $P' = 0.5 \times 400 \times \left(1 - \dfrac{400}{800}\right) = 200 \times \dfrac{1}{2} = 100 \text{ per unit time}$

    Nothing faster ever happens, whatever the starting value.

  6. Describe the solution from $P(0) = 100$.

    $100 \;\nearrow\; 400 \text{ (speeding up)} \;\nearrow\; 800 \text{ (slowing down, never reached)}$

    Below $400$ the rate grows with $P$ and the curve bends up; above $400$ it shrinks and the curve bends down. That is the S-shape, found without a formula.

13. A tank whose volume changes

  1. A tank holds $100$ litres of pure water. Brine at $2$ grams a litre enters at $3$ litres a minute; the stirred mixture leaves at $2$ litres a minute. Find the volume first.

    $V' = 3 - 2 = 1 \quad\Rightarrow\quad V = 100 + t$

    Unequal flows change the volume by the difference, one litre a minute.

  2. Write the rates in and out, in grams a minute.

    $\text{in} = 2 \times 3 = 6, \qquad \text{out} = \dfrac{S}{100 + t} \times 2 = \dfrac{2S}{100 + t}$

    The mixture leaving carries the tank's concentration, which is salt over the current volume.

  3. Rate of change is rate in minus rate out; write it in standard form.

    $S' = 6 - \dfrac{2S}{100 + t} \quad\Rightarrow\quad S' + \dfrac{2}{100 + t}S = 6, \qquad S(0) = 0$

    Adding $\frac{2S}{100 + t}$ to both sides gives a linear equation with a variable coefficient.

  4. Build the integrating factor.

    $\displaystyle\mu = e^{\int \frac{2}{100 + t}\,dt} = e^{2\ln(100 + t)} = (100 + t)^{2}$

    $100 + t > 0$ throughout, so no absolute value is needed.

  5. Multiply both sides by $(100 + t)^{2}$ and integrate.

    $\left[(100 + t)^{2}S\right]' = 6(100 + t)^{2} \quad\Rightarrow\quad (100 + t)^{2}S = 2(100 + t)^{3} + C$

    The left side is the product-rule derivative; $\int 6u^{2}\,du = 2u^{3}$.

  6. Substitute $t = 0$, $S = 0$ to find $C$.

    $0 = 2 \times 100^{3} + C \quad\Rightarrow\quad C = -2\,000\,000$

    The tank starts with no salt.

  7. Divide both sides by $(100 + t)^{2}$.

    $S = 2(100 + t) - \dfrac{2\,000\,000}{(100 + t)^{2}}$

    Each term on the right is divided by the factor.

  8. Check the start and the long-run concentration.

    $S(0) = 200 - 200 = 0, \qquad \dfrac{S}{V} = 2 - \dfrac{2\,000\,000}{(100 + t)^{3}} \to 2 \ \tfrac{\text{g}}{\text{L}}$

    The concentration climbs towards the incoming $2$ grams a litre, as it must, while the salt itself keeps growing with the volume.

14. Your turn: a room at $15$ degrees, an object at $95$, and $75$ after five minutes. What is it after fifteen?

  1. Work with the gap above the room.

    $95 - 15 = 80, \qquad 75 - 15 = 60, \qquad \dfrac{60}{80} = \dfrac{3}{4}$

    Measure from the room: five minutes multiplies the gap by $\tfrac{3}{4}$.

  2. Your turn: work this step out. Its working is at the end of the packet.

    Fifteen minutes is three five-minute stretches.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Add the room back on.

15. Guided practice

Match each situation to the equation that models it.

$P' = 5P$$P' = 5P\left(1 - \dfrac{P}{600}\right)$$T' = -5(T - 22)$$S' = 5 - 6S$
A colony that grows at a rate proportional to how many there already are
The same colony, with a ceiling of $600$ that growth slows towards
A drink cooling towards a room at $22$ degrees
Salt entering a stirred tank at a fixed rate and leaving in proportion to how much is dissolved

16. Guided practice

Complete the worked solution: a drink at $60$ degrees in a room at $16$ degrees is at $38$ after ten minutes. What is it after twenty?

  1. Subtract the room temperature to get the starting gap.

    $60 - 16 =$ g

    Newton's law makes the gap $T - T_{\text{room}}$ decay exponentially, not the temperature.

  2. Subtract the room temperature to get the gap after ten minutes.

    $38 - 16 =$ f

    The same subtraction at the later time.

  3. Divide the later gap by the earlier one to get the ten-minute factor.

    $\dfrac{\text{gap at } 10}{\text{gap at } 0} = \dfrac{1}{2}$

    An exponential multiplies by the same factor over every stretch of equal length.

  4. Multiply the gap at ten minutes by the same factor.

    $\text{gap at } 20 = (\text{gap at } 10) \times \dfrac{1}{2} =$ e

    Equal times, equal factors.

  5. Add the room temperature back on.

    $T(20) = 16 + \text{gap at } 20 =$ t

    The temperature is the room plus the gap.

17. Guided practice

A tank holds $300$ litres. Brine at $3$ grams a litre enters at $8$ litres a minute and the stirred mixture leaves at $8$ litres a minute. Someone writes $S' = 24 - 8S$. What is wrong with it?

18. Practice

A tank holds $200$ litres of pure water. Brine at $1$ grams of salt a litre runs in at $7$ litres a minute, and the well-stirred mixture runs out at $7$ litres a minute. Fill in the four numbers the model needs.

Value
Litres of liquid in the tank at any time
Grams of salt entering each minute
Grams of salt leaving each minute, at time zero
Grams of salt in the tank in the long run

19. Practice

A drink at $51$ degrees is left in a room at $19$ degrees. After ten minutes it is at $35$ degrees. What is its temperature after twenty minutes?

Answer:

20. Practice

A dish at $72$ degrees goes into a fridge at $2$ degrees. Its temperature falls at a rate equal to $2$ times the gap between it and the fridge, with $t$ in hours. Write its temperature $T$ as a formula in $t$ (type the exponential as e^(...)).

Answer:

21. Somewhere new

A population obeys $P' = 3P\left(1 - \dfrac{P}{600}\right)$ and starts at $P(0) = 30$. What value does $P$ approach?

Answer:

22. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

23. Test question

A dish at $78$ degrees goes into a fridge at $8$ degrees. Its temperature falls at a rate equal to $3$ times the gap between it and the fridge, with $t$ in hours. Write its temperature $T$ as a formula in $t$ (type the exponential as e^(...)).

Answer:

24. What you can do now

You can write a mixing, cooling or growth model from a description, check its terms by their units, and read its steady state without solving. Say in your own words why the outflow term of a stirred tank contains the unknown.

Working for the steps left to you

14. Your turn: a room at $15$ degrees, an object at $95$, and $75$ after five minutes. What is it after fifteen?, step 2

$80 \times \left(\dfrac{3}{4}\right)^{3} = 80 \times \dfrac{27}{64} = 33.75$

Equal times, equal factors.

14. Your turn: a room at $15$ degrees, an object at $95$, and $75$ after five minutes. What is it after fifteen?, step 3

$T(15) = 15 + 33.75 = 48.75$

Nothing needed the constant $k$: three equal intervals were all the question asked for.