01 / 22

Mixing Problems
Inflow & Outflow

Learn to model how concentration changes over time in a tank with continuous inflow and outflow using first-order linear ODEs.

Differential Equations

What Is a Mixing Problem?

A mixing problem models a tank (or container) where a solution flows in at some rate and concentration, the contents are kept well-stirred, and the mixture flows out at some rate. We want to find the amount of solute \( Q(t) \) in the tank at any time \( t \).

Visualizing the Tank Model

well-stirred Inflow
rate = \( r_{\text{in}} \)
conc = \( c_{\text{in}} \)
Outflow
rate = \( r_{\text{out}} \)
\( Q(t) \) = solute
\( V(t) \) = volume
Volume changes if \( r_{\text{in}} \neq r_{\text{out}} \)

Key Variables & Notation

\( Q(t) \)
Amount of solute (e.g., kg of salt) in the tank at time \( t \)
\( V(t) \)
Total volume of solution in the tank at time \( t \) (liters)
\( r_{\text{in}}, \; c_{\text{in}} \)
Inflow rate (L/min) and inflow concentration (kg/L)
\( r_{\text{out}} \)
Outflow rate (L/min): mixture leaves at concentration \( \frac{Q(t)}{V(t)} \)

The Fundamental ODE

The rate of change of solute follows one simple principle:

Rate In
\( r_{\text{in}} \cdot c_{\text{in}} \): constant (given in the problem)
Rate Out
\( r_{\text{out}} \cdot \frac{Q(t)}{V(t)} \): depends on the unknown \( Q(t) \)

Rewriting in Standard Linear Form

When \( r_{\text{in}} = r_{\text{out}} = r \), the volume is constant \( V_0 \), and the ODE becomes a first-order linear ODE:

This has the standard form \( Q' + P(t)\,Q = G(t) \), where:

\( P(t) = \frac{r}{V_0} \)
Constant coefficient from the outflow term
\( G(t) = r \cdot c_{\text{in}} \)
Constant forcing term from the inflow

Solving with the Integrating Factor

1
Identify \( P(t) \): From \( Q' + P(t)\,Q = G(t) \), read off \( P(t) = \frac{r}{V_0} \).
2
Compute the integrating factor: \( \mu(t) = e^{\int P(t)\,dt} = e^{rt/V_0} \).
3
Multiply both sides by \( \mu(t) \): The left side becomes \( \frac{d}{dt}\!\bigl[\mu(t)\,Q\bigr] \).
4
Integrate both sides and solve for \( Q(t) \). Apply the initial condition \( Q(0) = Q_0 \).

Constant vs. Changing Volume

Constant Volume Changing Volume
Condition \( r_{\text{in}} = r_{\text{out}} \) \( r_{\text{in}} \neq r_{\text{out}} \)
Volume \( V(t) = V_0 \) (fixed) \( V(t) = V_0 + (r_{\text{in}} - r_{\text{out}})t \)
ODE type Constant-coefficient linear Variable-coefficient linear
Difficulty Straightforward Requires more careful integration
Caution None special Tank may overflow or empty

How to Solve Any Mixing Problem

1
Define \( Q(t) \): State what the unknown represents (amount of solute at time \( t \)).
2
Write the balance equation: \( \frac{dQ}{dt} = \text{rate in} - \text{rate out} \). Identify each rate.
3
Determine \( V(t) \): Is volume constant or changing? Write it explicitly.
4
Put in standard form \( Q' + P(t)\,Q = G(t) \) and find the integrating factor.
5
Solve and apply the initial condition \( Q(0) = Q_0 \). Simplify.
6
Check your answer: Does \( Q(0) = Q_0 \)? Does the long-term behavior make sense (e.g., does concentration approach \( c_{\text{in}} \))?

Example 1: Constant Volume

A tank holds 100 L of pure water. Brine with 0.5 kg/L of salt enters at 4 L/min. The well-stirred mixture exits at 4 L/min. Find \( Q(t) \), the kg of salt at time \( t \).

Example 1: Solution

1
Standard form: \( Q' + \frac{1}{25}\,Q = 2 \).
2
Integrating factor: \( \mu(t) = e^{t/25} \).
3
Multiply & integrate: \( \frac{d}{dt}\bigl[e^{t/25}\,Q\bigr] = 2e^{t/25} \implies e^{t/25}\,Q = 50\,e^{t/25} + C \).
4
General solution: \( Q(t) = 50 + C\,e^{-t/25} \). Apply \( Q(0) = 0 \): \( C = -50 \).

Solution Curve for Example 1

t Q Q=50 50 25 0 25 50 75
\( Q(t) = 50(1 - e^{-t/25}) \)

Example 2: Changing Volume

A tank initially contains 200 L with 10 kg of salt. Brine at 0.3 kg/L flows in at 5 L/min. The mixture exits at 3 L/min. Find \( Q(t) \).

Example 2: Full Solution

1
Standard form: \( Q' + \frac{3}{200+2t}\,Q = 1.5 \). Here \( P(t) = \frac{3}{200+2t} \).
2
Integrating factor: \( \mu = e^{\int \frac{3}{200+2t}\,dt} = e^{\frac{3}{2}\ln(200+2t)} = (200+2t)^{3/2} \).
3
Multiply & integrate: \( \frac{d}{dt}\!\bigl[(200+2t)^{3/2}\,Q\bigr] = 1.5\,(200+2t)^{3/2} \).
4
Result: \( Q(t) = 0.3(200+2t) + C(200+2t)^{-3/2} \). Apply \( Q(0) = 10 \) to find \( C \).

Long-Term Behavior & Equilibrium

In constant-volume mixing problems, the solution always approaches an equilibrium:

Equilibrium
At equilibrium, \( \text{rate in} = \text{rate out} \), so \( \frac{dQ}{dt} = 0 \). The tank reaches the inflow concentration.
Time Constant
\( \tau = \frac{V_0}{r} \): the time to reach about 63% of equilibrium. After \( 3\tau \), you are past 95%.
Changing Volume
If \( r_{\text{in}} > r_{\text{out}} \), the tank fills up. Concentration still approaches \( c_{\text{in}} \) as volume grows.

Common Mistakes to Avoid

✕ Using constant volume when rates differ
If \( r_{\text{in}} \neq r_{\text{out}} \), you must use \( V(t) = V_0 + (r_{\text{in}} - r_{\text{out}})t \) in the outflow term.
✕ Confusing concentration with amount
\( Q(t) \) is the amount of solute (kg), not the concentration (kg/L). Concentration is \( Q(t)/V(t) \).
✕ Wrong sign on the outflow
The outflow removes solute, so it is subtracted: \( \frac{dQ}{dt} = (\text{in}) - (\text{out}) \). Don't add both.
✕ Forgetting the initial condition
The general solution has a constant \( C \). You must apply \( Q(0) = Q_0 \) to find \( C \).

Summary Reference Table

Component Formula / Expression
Balance Law \( \frac{dQ}{dt} = r_{\text{in}} c_{\text{in}} - r_{\text{out}} \frac{Q}{V(t)} \)
Volume \( V(t) = V_0 + (r_{\text{in}} - r_{\text{out}})t \)
Standard Form \( Q' + P(t)\,Q = G(t) \)
Integrating Factor \( \mu(t) = e^{\int P(t)\,dt} \)
Const. Vol. Solution \( Q(t) = c_{\text{in}} V_0 + (Q_0 - c_{\text{in}} V_0)\,e^{-rt/V_0} \)
Equilibrium \( Q_\infty = c_{\text{in}} \cdot V_0 \)
Time Constant \( \tau = V_0 / r \)

Question 1 of 5

A 500 L tank of pure water receives brine at 0.2 kg/L flowing in at 10 L/min, with the mixture leaving at 10 L/min. What is \( Q_\infty \), the long-run amount of salt?

Question 2 of 5

In a mixing problem with \( r_{\text{in}} = 6 \) L/min and \( r_{\text{out}} = 4 \) L/min, what happens to the volume?

Question 3 of 5

For the ODE \( Q' + \frac{1}{25}\,Q = 2 \), what is the integrating factor \( \mu(t) \)?

Question 4 of 5

A tank has \( V_0 = 100 \) L and flow rate \( r = 4 \) L/min. The time constant is \( \tau = V_0/r \). After one time constant, the solution reaches approximately what fraction of its equilibrium?

Question 5 of 5

A tank starts with 50 kg of salt. Pure water (no salt) flows in at 3 L/min, and the mixture leaves at 3 L/min. As \( t \to \infty \), what happens to the amount of salt?