- Foundation
- About 15 min
- 5 practice questions
Rate in minus rate out: mixing and filling problems
Set up dQ/dt = (rate in) − (rate out) for mixing and filling problems, solve the resulting separable equation, and read off the long-run (equilibrium) value.
If something looks wrong, please tell us.
Many real situations obey a simple rule: the rate of change of an amount equals the rate at which it comes in minus the rate at which it goes out. A tank of salty water being refreshed, a pool filling while it leaks, a dye being added to a lake: all follow this rule. In each case the amount satisfies a differential equation of the form dQ/dt = a − bQ, which separates and solves in one line. All numbers in this lesson are illustrative.
The standard equation
Suppose a quantity Q(t) enters at a constant rate a and leaves at a rate proportional to Q, namely bQ. Then dQ/dt = a − bQ. Separating, dQ/(a − bQ) = dt, so −(1/b) ln|a − bQ| = t + c. Solving for Q gives Q = a/b + (Q₀ − a/b)e^{−bt}, where Q₀ is the starting amount.
dQ/dt = a − bQ has solution Q = a/b + (Q₀ − a/b)e^{−bt}. As t grows, Q approaches the equilibrium value a/b, from below if Q₀ < a/b and from above if Q₀ > a/b.
Mixing in a tank of fixed volume
If liquid flows in and out at the same rate r litres per minute, the volume V stays fixed. If the incoming liquid has concentration c_in (kg per litre), the salt enters at rate r·c_in. The mixture is stirred, so the concentration in the tank is Q/V and salt leaves at rate r·Q/V. So dQ/dt = r·c_in − (r/V)Q. Here a = r·c_in and b = r/V.
Worked example 1: salt entering
A tank holds 100 litres of pure water. Brine of concentration 0.5 kg per litre flows in at 5 litres per minute and the mixture flows out at 5 litres per minute. Then dQ/dt = 5(0.5) − (5/100)Q = 2.5 − 0.05Q with Q(0) = 0. Using the formula, a/b = 2.5/0.05 = 50, so Q = 50(1 − e^{−0.05t}). The amount tends to 50 kg, which is 100 litres at 0.5 kg per litre, the concentration of the incoming brine. After 20 minutes, Q = 50(1 − e⁻¹) ≈ 31.6 kg.
Worked example 2: washing out
A tank holds 200 litres containing 20 kg of salt. Pure water flows in at 10 litres per minute and the mixture leaves at 10 litres per minute. Here a = 0 and b = 10/200 = 1/20, so dQ/dt = −Q/20 and Q = 20e^{−t/20}. The salt halves when e^{−t/20} = 1/2, so t = 20 ln 2 ≈ 13.9 minutes. After 20 minutes the fraction remaining is e⁻¹ ≈ 0.37.
Worked example 3: filling with a leak
Water enters a container at 8 litres per minute and leaks out at a rate equal to 0.02 V litres per minute, where V is the volume. It starts empty. Then dV/dt = 8 − 0.02V, V(0) = 0. Here a/b = 8/0.02 = 400, so V = 400(1 − e^{−0.02t}). The container can never exceed 400 litres. It holds 200 litres when e^{−0.02t} = 1/2, so t = 50 ln 2 ≈ 34.7 minutes.
Worked example 4: setting the equation up
In a tank of 100 litres, brine at 0.5 kg per litre enters at 5 litres per minute and leaves at the same rate. Rate in = 5 × 0.5 = 2.5 kg per minute. Rate out = 5 × (Q/100) = 0.05Q kg per minute. So the equation is dQ/dt = 2.5 − 0.05Q. A common slip is to forget the concentration in the rate in, or to use the whole rate 5 instead of 5Q/100 for the rate out.
Checks
- The equilibrium a/b is the amount at which dQ/dt = 0.
- Units: rate in has units of amount per minute (litres per minute times concentration).
- If the inflow and outflow rates differ, the volume changes and V must be written as a function of t.
Key takeaways: write dQ/dt = rate in − rate out; the outflow is (flow rate) × (amount) / (volume). The solution is exponential approach to the equilibrium a/b. Check the equilibrium and initial values.
Check your understanding
-
1. A 100-litre tank has brine of 0.5 kg per litre entering at 5 litres per minute and the mixture leaving at 5 litres per minute. The equation for the salt Q is:
- dQ/dt = 2.5 − 0.05Q
- dQ/dt = 2.5 − 5Q
- dQ/dt = 0.5 − 0.05Q
- dQ/dt = 2.5 + 0.05Q
Show answer
Answer: A. Rate in = 5 × 0.5 = 2.5. Rate out = 5 × Q/100 = 0.05Q. So dQ/dt = 2.5 − 0.05Q.
-
2. If dQ/dt = 4 − 0.2Q and Q(0) = 0, the amount tends to:
- 4
- 20
- 0.8
- 80
Show answer
Answer: B. The equilibrium is a/b = 4/0.2 = 20. The solution is Q = 20(1 − e^{−0.2t}), which approaches 20.
-
3. If dQ/dt = −Q/20 with Q(0) = 20, the time for Q to halve is:
- 10 ln 2
- 20/ln 2
- 20 ln 2
- 20 ln 10
Show answer
Answer: C. Q = 20e^{−t/20}. Setting e^{−t/20} = 1/2 gives t/20 = ln 2, so t = 20 ln 2 ≈ 13.9.
-
4. After 20 minutes in the washing-out tank (Q = 20e^{−t/20}), the fraction of the original salt left is:
- e⁻²
- 1/2
- 1/20
- e⁻¹
Show answer
Answer: D. Q(20)/Q(0) = e^{−20/20} = e⁻¹ ≈ 0.37.
-
5. For dV/dt = 8 − 0.02V with V(0) = 0, the volume can never exceed:
- 8
- 400
- 160
- 0.16
Show answer
Answer: B. The equilibrium is a/b = 8/0.02 = 400, and V = 400(1 − e^{−0.02t}) is always below 400.
Sign in to keep track of the lessons you finish.