Mixing Problems
Mixing problems track how much of a substance, such as salt, is in a tank while liquid flows in and out. If A(t) is the amount at time t, then dA/dt = (rate in) − (rate out), and each rate is a concentration times a flow rate. Solving this first-order equation gives A(t).
Before this lesson: First-Order Linear Differential Equations, Separable Differential Equations and Autonomous Equations and Phase Lines
The idea: salt in minus salt out
Picture a tank of salt water, called brine. Brine with a known salt concentration pours in, the tank is stirred so it is well mixed, and the mixture drains out. The amount of salt changes only because salt enters and salt leaves.
So the rate of change of the salt is a balance: dA/dt = (rate in) − (rate out). Each rate has units like kilograms per minute, found by multiplying a concentration (kg per liter) by a flow rate (liters per minute).
The key point is the outflow. Because the tank is well mixed, the liquid leaving has the same concentration as the tank: A(t) divided by the volume V(t). That is what makes A appear on the right side and turns the balance into a differential equation.
Mixing problems: the rule
\dfrac{dA}{dt} = \underbrace{c_{\text{in}}\, r_{\text{in}}}_{\text{rate in}} - \underbrace{\dfrac{A(t)}{V(t)}\, r_{\text{out}}}_{\text{rate out}}, \qquad V(t) = V_0 + (r_{\text{in}} - r_{\text{out}})\,t| Symbol | Meaning | Example units |
|---|---|---|
| A(t) | Amount of substance in the tank | kg, lb, g |
| c_{\text{in}} | Concentration of the incoming liquid | kg/L, lb/gal |
| r_{\text{in}}, r_{\text{out}} | Flow rates in and out | L/min, gal/min |
| V(t) | Volume of liquid in the tank | L, gal |
| A(0) | Starting amount (0 if the tank starts with pure water) | kg, lb |
How to solve a mixing problem
- Find the volume V(t). If the flow rates are equal, the volume is constant.
- Write the rate in, the rate out and dA/dt = rate in − rate out.
- Put the equation in linear form, dA/dt + (r_out/V)A = rate in, and solve it with an integrating factor. When the volume is constant, the equation is also separable.
- Use A(0) to find the constant.
- Answer the question: an amount at a time, a time for an amount, or a concentration A/V.
Mixing problem examples
Example 1: Set up the equation
A tank holds 200 L of brine with 10 kg of salt. Brine containing 0.3 kg of salt per liter flows in at 4 L/min, and the well-mixed solution drains at 4 L/min. Write an initial-value problem for the amount of salt A(t) in kilograms after t minutes.
\text{rate in} = (0.3)(4) = 1.2Multiply the inflow concentration (kg/L) by the inflow rate (L/min) to get kg/min.
V = 200
The flow in and the flow out are both 4 L/min, so the volume stays at 200 L.
\text{concentration out} = \dfrac{A}{200}The tank is well mixed, so the outflow has the tank’s concentration.
\text{rate out} = \dfrac{A}{200}\cdot 4 = \dfrac{A}{50}Multiply the outflow concentration by the outflow rate, and simplify 4/200.
\dfrac{dA}{dt} = 1.2 - \dfrac{A}{50},\quad A(0) = 10Rate in minus rate out, with the starting amount.
Answer: dA/dt = 1.2 − A/50 with A(0) = 10.
Example 2: Solve with an integrating factor
Solve the problem from Example 1. How much salt is in the tank after 30 minutes, and what happens in the long run?
\dfrac{dA}{dt} + \dfrac{1}{50}A = 1.2Add A/50 to both sides to get linear form (see first-order linear differential equations).
\mu(t) = e^{t/50}The integrating factor is e raised to the integral of 1/50.
\dfrac{d}{dt}\left(Ae^{t/50}\right) = 1.2e^{t/50}Multiply both sides by μ; the left side is now the derivative of a product.
Ae^{t/50} = 60e^{t/50} + CIntegrate both sides: the integral of 1.2e^(t/50) is 1.2 · 50 · e^(t/50).
A = 60 + Ce^{-t/50}Divide both sides by e^(t/50).
10 = 60 + C
Substitute A(0) = 10.
C = -50
Subtract 60 from both sides.
A(t) = 60 - 50e^{-t/50}Write the solution.
A(30) = 60 - 50e^{-0.6}Substitute t = 30.
A(30) \approx 60 - 27.44 = 32.56
Evaluate 50e^(−0.6) ≈ 27.44 and subtract.
Answer: about 32.56 kg of salt after 30 minutes. As t → ∞, e^(−t/50) → 0, so A(t) → 60 kg. That is 0.3 kg/L times 200 L: the tank ends up with the same concentration as the incoming brine.
Example 3: Flushing with pure water
A 500-gallon tank of brine contains 40 lb of salt. Pure water flows in at 5 gal/min and the mixture drains at 5 gal/min. When will the tank hold 10 lb of salt?
\dfrac{dA}{dt} = 0 - \dfrac{A}{500}\cdot 5Pure water brings in no salt; the rate out is concentration A/500 times 5 gal/min.
\dfrac{dA}{dt} = -\dfrac{A}{100}Simplify 5/500.
A = 40e^{-t/100}This is exponential decay with A(0) = 40 (see exponential models with differential equations).
10 = 40e^{-t/100}Set A equal to 10.
0.25 = e^{-t/100}Divide both sides by 40.
\ln 0.25 = -\dfrac{t}{100}Take the natural log of both sides (see solving exponential equations).
t = -100\ln 0.25
Multiply both sides by −100.
t = 100\ln 4 \approx 138.6
Use −ln 0.25 = ln 4 (see properties of logarithms) and evaluate.
Answer: after about 138.6 minutes, a little over 2 hours and 18 minutes.
Example 4: A tank whose volume changes
A 200-liter tank starts with 100 L of brine containing 5 kg of salt. Brine with 0.2 kg/L flows in at 3 L/min, and the mixture drains at 2 L/min. How much salt is in the tank when it starts to overflow?
V(t) = 100 + (3 - 2)t = 100 + t
The volume grows by the flow in minus the flow out each minute.
\text{rate in} = (0.2)(3) = 0.6Multiply the inflow concentration by the inflow rate.
\text{rate out} = \dfrac{A}{100 + t}\cdot 2 = \dfrac{2A}{100 + t}The outflow concentration is A over the current volume.
\dfrac{dA}{dt} + \dfrac{2}{100 + t}A = 0.6Write rate in minus rate out in linear form.
\mu = e^{2\ln(100 + t)} = (100 + t)^2Integrate 2/(100 + t) to get 2 ln(100 + t), then simplify with log rules.
\dfrac{d}{dt}\left[(100 + t)^2A\right] = 0.6(100 + t)^2Multiply both sides by μ.
(100 + t)^2A = 0.2(100 + t)^3 + C
Integrate both sides.
A = 0.2(100 + t) + \dfrac{C}{(100 + t)^2}Divide both sides by (100 + t)².
5 = 20 + \dfrac{C}{10000}Substitute A(0) = 5.
C = -150000
Subtract 20 from both sides, then multiply by 10,000.
100 + t = 200 \Rightarrow t = 100
The tank is full when the volume reaches 200 L.
A(100) = 0.2(200) - \dfrac{150000}{200^2}Substitute t = 100.
A(100) = 40 - 3.75 = 36.25
Evaluate each term and subtract.
Answer: 36.25 kg of salt when the tank overflows after 100 minutes, a concentration of 36.25/200 ≈ 0.181 kg/L.
Example 5: A polluted lake (word problem)
A lake holds 2,000,000 m³ of water. A river flows in and out at 40,000 m³ per day, keeping the volume constant. Starting at t = 0, the incoming river carries a pollutant at 0.5 g/m³, and the lake starts clean. How many days until the lake’s concentration reaches 0.4 g/m³?
\text{rate in} = (0.5)(40000) = 20000Grams per cubic meter times cubic meters per day gives grams per day.
\text{rate out} = \dfrac{A}{2000000}\cdot 40000 = \dfrac{A}{50}Lake concentration times outflow, then simplify.
\dfrac{dA}{dt} + \dfrac{1}{50}A = 20000,\quad A(0) = 0Rate in minus rate out in linear form; the lake starts clean.
\dfrac{d}{dt}\left(Ae^{t/50}\right) = 20000e^{t/50}Multiply both sides by μ = e^(t/50).
Ae^{t/50} = 1000000e^{t/50} + CIntegrate both sides: 20,000 · 50 = 1,000,000.
A = 1000000 + Ce^{-t/50}Divide both sides by e^(t/50).
C = -1000000
Substitute A(0) = 0 and solve for C.
c(t) = \dfrac{A}{2000000} = 0.5\left(1 - e^{-t/50}\right)Divide the amount by the volume to get the concentration.
0.4 = 0.5\left(1 - e^{-t/50}\right)Set the concentration equal to 0.4.
0.8 = 1 - e^{-t/50}Divide both sides by 0.5.
e^{-t/50} = 0.2Add e^(−t/50) to both sides and subtract 0.8.
-\dfrac{t}{50} = \ln 0.2Take the natural log of both sides.
t = 50\ln 5 \approx 80.5
Multiply both sides by −50 and use −ln 0.2 = ln 5.
Answer: about 80.5 days. The concentration never passes 0.5 g/m³, the level of the incoming river.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Using the inflow concentration for the outflow | Rate out = (0.3)(4) in Example 1 | The outflow has the tank’s concentration, A/V: rate out = 4A/200. |
| Forgetting the volume changes | Rate out = 2A/100 in Example 4 | When flow in and flow out differ, use V(t) = 100 + t. |
| Leaving out the concentration in the rate in | Rate in = 3 L/min | Rate in = concentration × flow = (0.2)(3) = 0.6 kg/min. |
| Adding the rate out | dA/dt = 1.2 + A/50 | Salt leaving lowers A: subtract the rate out. |
| Mixing units | Concentration in g/L with A in kg | Convert so every rate is in the same units as A per unit of time. |
| Using a concentration as the starting amount | A(0) = 0.05 for a 1000-L tank at 0.05 kg/L | A(0) = concentration × volume = 50 kg. |
Related ideas
The long-run amount
With constant volume, the general solution is A(t) = c_in·V + (A(0) − c_in·V)e^(−rt/V), where r is the flow rate. The amount always heads toward c_in·V, the amount that matches the incoming concentration. On a phase line, this is a stable equilibrium.
Newton’s law of cooling
Newton’s law of cooling, dT/dt = −k(T − T_s), has the same shape as a constant-volume mixing problem: the quantity moves exponentially toward an outside level. Both are linear first-order equations.
Connected tanks
When brine flows from one tank into a second tank, each tank gets its own equation, and the two equations are linked. That gives a system of differential equations, which Unit 4 of this course solves with eigenvalues.
Practice problems
- A 300-L tank holds brine with 15 kg of salt. Brine with 0.1 kg/L flows in at 6 L/min, and the mixture drains at 6 L/min. Write the initial-value problem for A(t).
- Solve the initial-value problem from Problem 1.
- In Problem 1, how much salt is in the tank in the long run?
- A 400-gallon tank of brine contains 60 lb of salt. Pure water flows in at 8 gal/min and the mixture drains at 8 gal/min. How much salt remains after 25 minutes?
- In Problem 4, when does the tank hold 15 lb of salt?
- A 1000-L tank starts with pure water. Brine with 0.05 kg/L flows in at 10 L/min, and the mixture drains at 10 L/min. When does the tank hold 40 kg of salt?
- A tank starts with 50 gal of pure water. Brine with 1 lb/gal flows in at 2 gal/min, and the mixture drains at 1 gal/min. How much salt is in the tank when it holds 100 gal?
- A tank holds 200 L of brine with 20 kg of salt. Pure water flows in at 2 L/min, and the mixture drains at 4 L/min. How much salt is left when 100 L of liquid remain?
- The salt in a tank follows dA/dt = 3 − A/40. Find the equilibrium amount and decide whether it is stable.
- A 600 m³ room has air that is 0.2% carbon dioxide. Fresh air with 0.04% carbon dioxide blows in at 30 m³/min, and mixed air leaves at 30 m³/min. How long until the room’s air is 0.1% carbon dioxide?
Show answers
1.
\text{rate in} = (0.1)(6) = 0.6Multiply the inflow concentration by the inflow rate.
\text{rate out} = \dfrac{A}{300}\cdot 6 = \dfrac{A}{50}The volume stays at 300 L; multiply A/300 by 6 and simplify.
Answer: dA/dt = 0.6 − A/50, with A(0) = 15
2.
\dfrac{dA}{dt} + \dfrac{1}{50}A = 0.6Add A/50 to both sides.
\dfrac{d}{dt}\left(Ae^{t/50}\right) = 0.6e^{t/50}Multiply both sides by μ = e^(t/50).
Ae^{t/50} = 30e^{t/50} + CIntegrate both sides: 0.6 · 50 = 30.
A = 30 + Ce^{-t/50}Divide both sides by e^(t/50).
15 = 30 + C
Substitute A(0) = 15.
C = -15
Subtract 30 from both sides.
Answer: A(t) = 30 − 15e^(−t/50) kg
3.
\lim_{t \to \infty}\left(30 - 15e^{-t/50}\right) = 30The exponential term goes to 0.
(0.1)(300) = 30
Check: the incoming concentration times the volume.
Answer: 30 kg
4.
\dfrac{dA}{dt} = -\dfrac{A}{400}\cdot 8 = -\dfrac{A}{50}Pure water adds no salt; simplify 8/400.
A = 60e^{-t/50}Exponential decay with A(0) = 60.
A(25) = 60e^{-0.5}Substitute t = 25.
A(25) \approx 36.39
Evaluate.
Answer: about 36.39 lb
5.
15 = 60e^{-t/50}Set A equal to 15.
0.25 = e^{-t/50}Divide both sides by 60.
\ln 0.25 = -\dfrac{t}{50}Take the natural log of both sides.
t = 50\ln 4 \approx 69.31
Multiply both sides by −50 and use −ln 0.25 = ln 4.
Answer: about 69.31 minutes
6.
\dfrac{dA}{dt} = (0.05)(10) - \dfrac{A}{1000}\cdot 10Rate in minus rate out.
\dfrac{dA}{dt} + \dfrac{1}{100}A = 0.5Simplify and write in linear form.
A = 50 + Ce^{-t/100}Multiply by e^(t/100), integrate (0.5 · 100 = 50) and divide by e^(t/100).
A = 50 - 50e^{-t/100}A(0) = 0 gives C = −50.
40 = 50 - 50e^{-t/100}Set A equal to 40.
e^{-t/100} = 0.2Subtract 50 from both sides, then divide by −50.
t = 100\ln 5 \approx 160.94
Take the natural log and multiply by −100; −ln 0.2 = ln 5.
Answer: about 160.94 minutes
7.
V(t) = 50 + t
The volume grows by 2 − 1 = 1 gal/min.
\dfrac{dA}{dt} + \dfrac{1}{50 + t}A = 2Rate in is (1)(2) = 2; rate out is A/(50 + t) times 1.
\mu = e^{\ln(50 + t)} = 50 + tIntegrate 1/(50 + t) to find the integrating factor.
\dfrac{d}{dt}\left[(50 + t)A\right] = 2(50 + t)Multiply both sides by μ.
(50 + t)A = (50 + t)^2 + C
Integrate both sides.
0 = 2500 + C
Substitute A(0) = 0.
A = (50 + t) - \dfrac{2500}{50 + t}Use C = −2500 and divide both sides by 50 + t.
A(50) = 100 - 25 = 75
The tank holds 100 gal when t = 50.
Answer: 75 lb
8.
V(t) = 200 - 2t
The volume drops by 4 − 2 = 2 L/min.
\dfrac{dA}{dt} = -\dfrac{4A}{200 - 2t} = -\dfrac{2A}{100 - t}No salt comes in; simplify the rate out.
\dfrac{dA}{A} = -\dfrac{2\,dt}{100 - t}Separate the variables (see separable differential equations).
\ln A = 2\ln(100 - t) + C
Integrate both sides; the integral of −2/(100 − t) is 2 ln(100 − t).
A = K(100 - t)^2
Exponentiate both sides, with K = e^C.
20 = K(100)^2 \Rightarrow K = 0.002
Substitute A(0) = 20 and divide by 10,000.
200 - 2t = 100 \Rightarrow t = 50
Find when 100 L remain.
A(50) = 0.002(50)^2 = 5
Substitute t = 50.
Answer: 5 kg
9.
3 - \dfrac{A}{40} = 0Set dA/dt = 0.
A = 120
Add A/40 to both sides and multiply by 40.
f'(A) = -\dfrac{1}{40}Differentiate f(A) = 3 − A/40; the derivative is negative.
Answer: A = 120 is a stable equilibrium
10.
x(0) = 0.002(600) = 1.2
Let x(t) be the cubic meters of carbon dioxide; 0.2% of 600.
\dfrac{dx}{dt} = (0.0004)(30) - \dfrac{x}{600}\cdot 30Rate in minus rate out.
\dfrac{dx}{dt} + \dfrac{1}{20}x = 0.012Simplify and write in linear form.
x = 0.24 + Ce^{-t/20}Multiply by e^(t/20), integrate (0.012 · 20 = 0.24) and divide.
x = 0.24 + 0.96e^{-t/20}x(0) = 1.2 gives C = 0.96.
0.6 = 0.24 + 0.96e^{-t/20}0.1% of 600 is 0.6.
e^{-t/20} = 0.375Subtract 0.24 from both sides, then divide by 0.96.
t = 20\ln\tfrac{8}{3} \approx 19.62Take the natural log, multiply by −20 and use 1/0.375 = 8/3.
Answer: about 19.62 minutes
Mixing problems FAQ
What is a mixing problem in differential equations?
It is a model for the amount of a substance in a container while liquid flows in and out. The rate of change of the amount equals the rate in minus the rate out, which gives a first-order differential equation.
How do you set up a mixing problem?
Let A(t) be the amount of the substance. The rate in is the incoming concentration times the inflow rate, and the rate out is A(t)/V(t) times the outflow rate. Then dA/dt = rate in − rate out, with A(0) from the starting amount.
Why is the outflow concentration A/V?
The tank is assumed to be well mixed, so the substance is spread evenly. Every liter leaving carries the tank’s current concentration, which is the amount divided by the volume.
What happens to a mixing problem as t goes to infinity?
With constant volume, the amount approaches the incoming concentration times the volume. The tank’s concentration levels off at the concentration of the liquid flowing in.
Summary
- Mixing problems use dA/dt = rate in − rate out.
- Rate in = incoming concentration × inflow rate.
- Rate out = (A/V) × outflow rate, because the tank is well mixed.
- If the flows differ, the volume changes: V(t) = V₀ + (r_in − r_out)t.
- Solve with an integrating factor (or separation when the volume is constant), then use A(0).
- With constant volume, the amount heads toward the incoming concentration times the volume.
Previous lesson: Autonomous Equations and Phase Lines
Next lesson: Runge-Kutta Method
Back to the Differential Equations Index