Learn
Lesson · Separable Equations, Growth and Decay · Shifted and bounded growth

Mixing Problems

A tank holds a well-stirred solution, with a stream flowing in at one concentration and the same volume flowing out. The amount of salt y then obeys y′ = (rate in) − (rate out)·y/V, which is y′ = −k·(y − A) with the steady amount A equal to the inflow concentration times the volume. The lab gives the exact Euler column and the rounded closed form, and shows that the tank approaches A in the manner of a cooling cup and does not get there.

y′ = (rate in) − (rate out)·y/V = −k·(y − A), k = flow/V steady amount A = (inflow concentration)·V y = A + (y₀ − A)·e^(−kt) y′ = 10 − y/20: A = 200, factor 19/20
A balance of what enters and what leaves

Core ideas

What this lesson establishes

Three ideas: the balance that gives the equation, the steady amount it points at, and why the tank never gets there.

1

Rate in minus rate out

The salt in a tank changes by what the inflow brings minus what the outflow carries away. The inflow brings (flow)·(concentration) grams per minute. The outflow carries the same flow times the tank's current concentration y/V, so what leaves depends on how much is already there.

2

The steady amount is where the two rates are equal

Setting rate in equal to rate out gives the amount at which y′ = 0. For equal flows that is the inflow concentration times the volume, A = c·V. Writing the equation as y′ = −(flow/V)·(y − A) puts it in the form of the last lesson.

3

Approached, never reached

The gap y − A is multiplied by 1 − kh at every Euler step and shrinks like e^(−kt) in the solution. Neither is ever zero, so the tank's concentration gets as close to the inflow concentration as you like and stays under it.

The material

A tank with salt water running through it

The balance written once in general and once for a tank of one hundred litres, the steady amount, and the exact steps beside the closed form.

A tank holds 100 litres of water. Salt water at 2 grams per litre runs in at 5 litres per minute, and well-stirred solution runs out at the same 5 litres per minute, so the volume stays at 100. Let y be the grams of salt in the tank. The question the equation answers is how y changes.

Definition · A well-stirred tank

A tank of constant volume V with a stream of concentration c flowing in at the flow rate r, and the same flow r leaving. The well-stirred assumption is that the concentration inside is y/V everywhere at once.

The balance is y′ = r·c − r·y/V: grams in per minute, minus grams out per minute.

in: r·c = 5 × 2 = 10 grams per minute out: r·y/V = 5 × y/100 = y/20 grams per minute y′ = 10 − y/20 = −(1/20)·(y − 200)

The second line is the first rewritten by taking out −1/20: 10 − y/20 = −(1/20)·(y − 200). It is Newton's law with k = 1/20 and a steady amount A = 200 grams, and it is the equation of “Newton's Law of Cooling” with the salt's gap y − 200 in the place of the coffee's gap y − 20. The steady amount is where the rates balance: 10 = y/20 at y = 200, which is c·V = 2·100.

Solving it, and stepping it

With the tank starting as pure water, y(0) = 0, the solution is y = 200 + (0 − 200)·e^(−t/20) = 200·(1 − e^(−t/20)). The lab steps it with h = 1 minute. The factor is 1 − 1/20 = 19/20, and the first two steps are y₁ = 200·(1 − 19/20) = 10 and y₂ = 200·(1 − 361/400) = 39/2. After ten steps the exact value is a fraction with a long denominator, which the lab prints in full beside ≈ 78.6939, the rounded closed form at t = 10.

n yₙ = 200·(1 − (19/20)ⁿ) 0 0 1 10 2 39/2 3 1141/40 closed form at t = 10: 200·(1 − e^(−1/2)) ≈ 78.6939

Never reaching the inflow concentration

The tank's concentration is y/V, which starts at 0 and has the inflow's concentration 2 as its limit. Does it get there? The gap 200·e^(−t/20) is positive at every time, so y is under 200 at every time, and the exact sequence has the same property, because (19/20)ⁿ is positive for every n. The gap halves every ln 2/(1/20) ≈ 13.8629 minutes, which is quick, and still never zero.

Example · A tank being flushed

Fill the tank with 50 grams of salt and run pure water through it at 10 litres per minute into 100 litres: y′ = −y/10, steady amount 0. The factor with h = 1 is 9/10, so the exact amounts are 50, 45, 81/2, 729/20, …. They fall towards 0 and no step is 0. The third preset is a tank that already holds 100 grams and is fed by a stream whose steady amount is 300: y′ = 6 − y/50, which is 5 litres per minute at 1.2 grams per litre into 250 litres. It rises towards 300 and stays under it.

What the equation assumes is part of the problem. The volume does not change; the tank is perfectly mixed; the inflow concentration is constant. If the outflow differed from the inflow the volume would change, and V would become a function of time in the equation. That is a different problem and not one this course solves.

Interactive

Growth and decay

A geometric sequence beside an exponential

Growth and decayy′ = k·(y − A)
Euler steps (exact)closed form, rounded

Method

Setting up and solving a mixing problem

Five moves. The balance in the first two is where a mixing problem is won or lost.

1

Write the rate in

Flow times inflow concentration, in grams per minute. Check the units before anything else.

2

Write the rate out

Flow times the tank's current concentration, r·y/V. It contains y, which is what makes the equation differential.

3

Rewrite as a shifted decay

Factor out the coefficient of y: y′ = −(r/V)·(y − A) with A = c·V. Read k and A off it.

4

Solve and step

y = A + (y₀ − A)·e^(−kt) rounded, and yₙ = A + (y₀ − A)·(1 − kh)ⁿ exact. Check the closed form by differentiating.

5

Say what was assumed

Constant volume, perfect stirring, a constant inflow. The steady amount is approached and not reached.

Balance, steady amount and limit

Score 0 / 0

A hundred litres, 2 grams per litre in

Flow 5 litres per minute both ways, inflow 2 grams per litre, volume 100 litres, an empty start. Exact until the closed-form line.

in: 5 × 2 = 10 grams per minute out: 5 × y/100 = y/20 grams per minute y′ = 10 − y/20 = −(1/20)·(y − 200) steady amount A = 2 × 100 = 200 grams Euler, h = 1: factor 1 − 1/20 = 19/20 y₁ = 200·(1 − 19/20) = 10 y₂ = 200·(1 − 361/400) = 39/2 closed form 200·(1 − e^(−t/20)) at t = 10: ≈ 78.6939 (rounded)

The gap to 200 is 200 grams at the start, and it is multiplied by 19/20 at every step. It halves, in the solution, every ≈ 13.8629 minutes, the half-life tile of this lab.

The concentration in the tank is y/100, and the inflow's concentration of 2 is its limit. The tank is below that limit at every time, in the exact sequence and in the closed form.

Common mistakes

1
Believing the tank reaches the inflow concentration in finite timeThe mistaken model is that the tank fills up to the inflow's concentration and then stays there, like a glass that is full. The gap y − 200 is multiplied by 19/20 at every step and by e^(−t/20) in the solution, and neither is ever zero, because a power of a positive fraction is positive. The lab's last-value tile after ten steps is a fraction less than 200, and the table is under 200 at every row.
2
Leaving the tank's own concentration out of the outflowWriting the rate out as a constant 5 grams per minute, the flow with the wrong unit, and not as the flow times the concentration y/100, makes y′ = 10 − 5 = 5 constant. Then y = 5t, which passes 200 at t = 40 and keeps going. But the outflow carries salt in proportion to how salty the tank is: it takes nothing from a tank that holds no salt and 10 grams per minute, equal to the inflow, from one that holds 200.
3
Reading the steady amount as a rateThe steady amount is 200 grams, not 10. The 10 is the rate in, in grams per minute, and it is the same quantity as the rate out when y = 200. The difference in units is the check: an amount in grams is c·V, a rate in grams per minute is r·c.

Check your understanding

✓
Finish when you can set up the balance for a well-stirred tank, find its steady amount, and report the exact and rounded values with their tiers.

You should be able to write rate in minus rate out, rewrite it as −k·(y − A), read A as the inflow concentration times the volume, step it exactly, state the closed form, and say that the steady amount is approached and not reached.

Note: Every equation so far has had one steady level that attracts: the quantity moves toward it from either side. “Logistic Growth” builds an equation with two steady levels, one that repels and one that attracts, from the observation that no population can grow exponentially for ever.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.