DIFFERENTIAL EQUATIONS • APPLICATIONS OF FIRST-ORDER ODES

Mixing Problems

Model how concentrations change in tanks where solutions flow in and out over time.

Historical Context & Motivation

Humans have been mixing substances for millennia — from blending medicinal tonics to purifying drinking water. However, predicting exactly how a concentration changes over time required the language of calculus. Mixing problems are one of the earliest and most practical applications of first-order ordinary differential equations (ODEs). They model situations where a substance — like salt, a pollutant, or a chemical — enters and leaves a container at known rates, and we want to know the amount of that substance at any moment.

1687
Newton's Principia
Isaac Newton publishes the foundations of calculus, giving scientists the tools to describe rates of change — the backbone of all differential equations.
1740s
Euler's Integrating Factor
Leonhard Euler develops systematic methods for solving first-order linear ODEs, including the integrating factor technique used in mixing problems today.
1800s
Industrial Chemistry
The rise of chemical manufacturing demands precise control of concentrations in vats and reactors, turning mixing models from academic exercises into engineering necessities.
1960s–Today
Environmental Modeling
Mixing-problem frameworks are applied to model pollutant levels in lakes, medication dosages in the bloodstream, and contaminant spread in water-treatment plants.

The central question a mixing problem answers is deceptively simple: If a solution flows into and out of a tank at known rates and concentrations, how much of the dissolved substance is in the tank at time t? Answering this question with algebra alone is impossible because the amount inside the tank is constantly changing, which in turn changes the concentration of what flows out. A differential equation captures this feedback loop perfectly.

Core Principles & Definitions

Every mixing problem revolves around the same fundamental idea: the rate at which the amount of substance in a tank changes equals the rate it comes in minus the rate it goes out. Before we write any equations, let's nail down the key concepts you'll use again and again.

1

Rate In

The rate at which the dissolved substance enters the tank, calculated as (inflow rate of liquid) × (concentration of incoming solution). Units are typically grams per minute or kg per hour.
2

Rate Out

The rate at which the substance leaves the tank. This equals (outflow rate of liquid) × (concentration inside the tank at that instant). Because the tank concentration changes over time, this term involves the unknown function Q(t).
3

Well-Stirred Assumption

We assume the incoming solution is mixed instantly and uniformly throughout the tank. This means the concentration of the outflow equals the overall concentration in the tank at that moment: Q(t) ÷ V(t).
4

Volume Function V(t)

The total volume of liquid in the tank at time t. If the inflow and outflow rates are equal, V stays constant. If they differ, V changes linearly with time, and you must account for it in the ODE.
KEY TAKEAWAY
Think of a mixing problem like a bathtub with the faucet running and the drain open at the same time. Imagine pouring dye into the stream of water from the faucet. The color of the water swirling down the drain depends on how much dye is in the tub right now — and that amount is always changing. A differential equation is the mathematical tool that keeps track of this moving target.

Visual Explanation — The Tank Model

The tank receives a solution through the inflow pipe (green arrow) at rate rᵢₙ with incoming concentration cᵢₙ. The well-stirred mixture leaves through the outflow pipe (pink arrow) at rate rₒᵤₜ with a concentration equal to Q(t) ÷ V(t). The governing ODE is shown in the amber bar at the bottom.

The diagram above captures everything you need to set up a mixing problem. Notice that the inflow rate is entirely given information — you always know how fast liquid enters and what concentration it carries. The outflow concentration, however, depends on Q(t) and V(t), both of which can change with time. This dependency is precisely why we need a differential equation rather than a simple algebraic formula.

Mathematical Framework

Let's build the governing equation step by step. We define Q(t) as the amount (in grams, kilograms, etc.) of the dissolved substance in the tank at time t. The key principle is a balance law: the rate of change of Q equals what comes in minus what goes out.

BALANCE LAW
dQ/dt = (Rate In) − (Rate Out)
This is the fundamental equation for every mixing problem. Each side has units of mass per time (e.g., g/min).
RATE IN
Rate In = rᵢₙ × cᵢₙ
Where rᵢₙ = volumetric inflow rate (L/min) and cᵢₙ = concentration of the incoming solution (g/L).
RATE OUT
Rate Out = rₒᵤₜ × Q(t) / V(t)
Where rₒᵤₜ = volumetric outflow rate (L/min), Q(t) = amount of substance in the tank (g), and V(t) = volume of liquid in the tank (L). The ratio Q(t)/V(t) is the instantaneous concentration inside the tank.
FULL ODE (CONSTANT VOLUME)
dQ/dt + (rₒᵤₜ / V) × Q = rᵢₙ × cᵢₙ
When rᵢₙ = rₒᵤₜ, the volume V stays constant. This is a first-order linear ODE in standard form: dQ/dt + P(t)·Q = f(t), which can be solved using an integrating factor.
Variable Volume Warning
If the inflow rate and outflow rate are not equal, the volume changes over time: V(t) = V₀ + (rᵢₙ − rₒᵤₜ) × t. You must substitute this expression for V(t) in the ODE. The equation is still first-order linear, but the integrating factor becomes a bit more complex.

Solving with the Integrating Factor

The standard approach to solving mixing problems uses the integrating factor method. For the constant-volume case where rᵢₙ = rₒᵤₜ = r, we write the ODE in standard linear form and then multiply both sides by a carefully chosen function that makes the left side collapse into a single derivative.

The flowchart shows the five key steps of the integrating factor method applied to a constant-volume mixing problem. Each colored box represents one algebraic step, culminating in the general solution Q(t) at the bottom.

The final formula tells us something powerful: as t → ∞, the exponential term e^(−rt/V) decays to zero, so Q(t) approaches V × cᵢₙ. In plain language, the tank eventually reaches the same concentration as the incoming solution — no matter what the starting concentration was. This is known as the steady-state or equilibrium value of the system.

Worked Example — Salt in a Tank

A tank initially holds 100 liters of water with 50 grams of salt dissolved in it. Brine (salt water) containing 2 g/L of salt flows into the tank at 5 L/min, and the well-stirred mixture flows out at 5 L/min. Find the amount of salt Q(t) in the tank at any time t, and determine how much salt is in the tank after 20 minutes.

Salt Mixing Problem — Constant Volume
1
Step 1 — Identify Given ValuesV = 100 L (constant, since rᵢₙ = rₒᵤₜ = 5 L/min). The incoming concentration is cᵢₙ = 2 g/L. The initial amount of salt is Q(0) = Q₀ = 50 g.
V = 100 L, r = 5 L/min, cᵢₙ = 2 g/L, Q₀ = 50 g
2
Step 2 — Write the ODEUsing the balance law: dQ/dt = (Rate In) − (Rate Out) = (5)(2) − (5)(Q/100) = 10 − Q/20. Rearranging into standard linear form: dQ/dt + Q/20 = 10.
dQ/dt + Q/20 = 10
3
Step 3 — Find the Integrating FactorHere P(t) = 1/20, which is constant. The integrating factor is μ(t) = e^(∫(1/20)dt) = e^(t/20).
μ(t) = e^(t/20)
4
Step 4 — Multiply and IntegrateMultiply both sides of the ODE by e^(t/20): d/dt[e^(t/20) × Q] = 10 × e^(t/20). Integrate both sides: e^(t/20) × Q = 10 × 20 × e^(t/20) + C = 200 × e^(t/20) + C. Divide by e^(t/20): Q(t) = 200 + C × e^(−t/20).
Q(t) = 200 + C × e^(−t/20)
5
Step 5 — Apply Initial ConditionAt t = 0, Q(0) = 50: 50 = 200 + C × e⁰ = 200 + C, so C = 50 − 200 = −150.
Q(t) = 200 − 150 × e^(−t/20)
6
Step 6 — Evaluate at t = 20Q(20) = 200 − 150 × e^(−20/20) = 200 − 150 × e⁻¹ ≈ 200 − 150 × 0.3679 ≈ 200 − 55.18 ≈ 144.82 grams.
Q(20) ≈ 144.82 grams

Notice that the equilibrium amount is V × cᵢₙ = 100 × 2 = 200 g. After 20 minutes the tank already holds about 145 g, well on its way toward 200 g. As time goes on, the exponential term shrinks, and Q(t) gets closer and closer to 200 g but never quite reaches it in finite time.

Strengths, Limitations & Variations

Comparing the strengths and limitations of the basic mixing-problem model
FeatureStrengthsLimitations
Well-stirred assumptionGreatly simplifies the model; yields a single ODE rather than a partial differential equation.Real tanks may have dead zones or layering, making the assumption inaccurate for large or poorly mixed vessels.
Constant flow ratesKeeps the ODE linear with constant coefficients, making it solvable by hand with an integrating factor.In practice, flow rates often vary with time, requiring numerical methods or piecewise solutions.
Single tankOne ODE captures the full dynamics; the solution is a single explicit formula.Many real systems involve cascades of tanks (e.g., wastewater treatment), requiring coupled ODEs.
No reactionsIdeal for inert substances like salt or dye where the substance doesn't degrade.Fails for substances that react, decay, or are consumed (e.g., medications metabolizing in the body).
KEY TAKEAWAY
The basic mixing model is like a weather forecast: remarkably accurate for straightforward situations (clear sunny day), but it struggles with complexity (chaotic storm systems). In our case, a single well-stirred tank with constant flows is the "clear day" — and the model nails it. Multi-tank cascades, variable flows, or chemical reactions are the storms that require more advanced tools.

Connection to Advanced Topics

Mixing problems are a gateway to many powerful ideas in mathematics and science. Once you're comfortable with the single-tank model, you can extend the framework in several directions. The table below compares the introductory model you've learned to its more advanced counterparts.

How the basic mixing model extends into more advanced differential equations topics
Basic ModelAdvanced ExtensionWhat Changes
Single tank, constant volumeSingle tank, variable volumeV(t) = V₀ + (rᵢₙ − rₒᵤₜ)t replaces V; the integrating factor involves a power function instead of an exponential.
Single tankCascading tanks (systems of ODEs)The outflow of Tank 1 becomes the inflow of Tank 2. You solve a system of coupled first-order ODEs, often using matrices.
Inert substance (no reaction)Substance with decay or reactionAn additional term −kQ is added to model radioactive decay or chemical consumption, leading to a modified linear ODE.
Constant inflow concentrationTime-varying inflow (e.g., periodic dosing)cᵢₙ becomes a function of t, so the non-homogeneous term changes and may require Laplace transforms or numerical integration.

If you continue studying differential equations, you'll encounter systems of ODEs and Laplace transforms — both of which build directly on the skills you develop here. The mixing problem is also structurally identical to models used in pharmacokinetics (how drugs move through your body) and compartmental epidemiology (how diseases spread through populations), so mastering this framework opens the door to a wide range of applications.

Practice Problems

PROBLEM 1CONCEPTUAL
A tank starts with pure water and brine (salt water) is pumped in. Explain, without using any formulas, why the amount of salt in the tank will never exceed a certain value no matter how long you wait. What determines that maximum value?
PROBLEM 2BASIC CALCULATION
A 200-liter tank is full of pure water. A solution containing 4 g/L of sugar enters at 10 L/min, and the well-stirred mixture exits at 10 L/min. Write the differential equation for Q(t), the grams of sugar in the tank at time t.
PROBLEM 3INTERMEDIATE
Using the ODE from Problem 2, solve for Q(t) and determine how many grams of sugar are in the tank after 30 minutes.
PROBLEM 4APPLIED
A water treatment plant has a 5000-liter holding tank currently containing 100 g of a pollutant. Clean water (0 g/L of pollutant) is pumped in at 25 L/min while the well-stirred mixture drains at 25 L/min. Environmental regulations require the pollutant level to drop below 5 g. How many minutes must the plant run the flushing process?
PROBLEM 5CRITICAL THINKING
A 500-liter tank initially contains 200 L of water with 10 g of dye dissolved in it. A dye solution of 0.5 g/L flows in at 8 L/min, and the well-stirred mixture flows out at 6 L/min. Set up the ODE for Q(t), identify V(t), and explain what happens physically when the tank fills up. (You do not need to solve the ODE completely.)

Summary — Mixing Problems

Mixing problems model how the amount of a dissolved substance changes inside a tank when solution flows in and out continuously. The governing equation is built from a simple balance law: dQ/dt = (Rate In) − (Rate Out), where Rate In = rᵢₙ × cᵢₙ and Rate Out = rₒᵤₜ × Q(t)/V(t). The well-stirred assumption ensures the outflow concentration equals the uniform concentration inside the tank. When inflow and outflow rates are equal, the volume stays constant and the ODE is a standard first-order linear ODE solvable with an integrating factor.

The general solution for a constant-volume tank is Q(t) = V × cᵢₙ + (Q₀ − V × cᵢₙ) × e^(−rt/V), revealing that Q(t) always approaches the steady-state value V × cᵢₙ as time increases. When flow rates differ, V(t) changes linearly, producing a variable-coefficient ODE. The mixing-problem framework extends naturally to cascading tanks, pharmacokinetics, and environmental modeling, making it one of the most versatile applications of first-order ODEs.

Varsity Tutors • Differential Equations • Mixing Problems