Modelling with Differential Equations
A drug is injected at a constant rate but is simultaneously cleared by the kidneys. A savings account earns interest but also has regular withdrawals. Both are rate-in minus rate-out problems — and both are solved by the same differential equation framework. In this lesson you'll build DEs from plain English, solve them with separation of variables or the integrating factor, and extract physical meaning from the solution.
Salt water flows into a 100 L tank at 2 L/min (concentration 0.5 kg/L) and the well-mixed solution drains at 2 L/min. The tank starts with pure water. Without solving anything — write the differential equation for $Q(t)$, the mass of salt at time $t$. Also: what do you think $Q$ approaches as $t \to \infty$?
Most applied DE problems follow a single pattern: identify what is changing, write its rate of change as rate in minus rate out, then solve.
The master template is:
$\dfrac{dQ}{dt} = (\text{rate in}) - (\text{rate out})$
Each term may depend on $t$, on $Q$ itself, or both. Once you have the DE, use separation of variables or an integrating factor to solve.
Key facts
- Framework: $\tfrac{dQ}{dt} = \text{rate in} - \text{rate out}$
- Mixing problem DE: $\tfrac{dQ}{dt} = c_{\text{in}} f_{\text{in}} - \tfrac{Q}{V} f_{\text{out}}$ (constant volume)
- Steady state: set $\tfrac{dQ}{dt} = 0$ to find $Q_\infty$
Concepts
- How to translate a word problem into a differential equation
- Why the DE $\tfrac{dQ}{dt} = a - bQ$ has an exponential solution approaching $a/b$
- The role of initial conditions in fixing the arbitrary constant
Skills
- Set up DEs for mixing, pharmacokinetics, and simple financial models
- Solve $\tfrac{dQ}{dt} = a - bQ$ by separation of variables
- Find the steady-state value and interpret it in context
General strategy (4 steps):
- Define the variable: choose $Q(t)$ with clear units.
- Identify rates: write $\tfrac{dQ}{dt} = (\text{rate in}) - (\text{rate out})$.
- Solve: separate variables (or use integrating factor) and integrate.
- Apply initial condition to find $C$; interpret the solution in context.
Key form: Many applied DEs reduce to $\dfrac{dQ}{dt} = a - bQ$ where $a, b > 0$ are constants. Separate variables:
Exponentiating and applying $Q(0) = Q_0$:
As $t \to \infty$, $Q \to \dfrac{a}{b}$ — the steady state. When $Q_0 < a/b$ the quantity grows to the steady state; when $Q_0 > a/b$ it decays down to it.
Key form: Many applied DEs reduce to $\dfrac{dQ}{dt} = a - bQ$ where $a, b > 0$ are constants. Separate variables:
Pause — copy the general form $\frac{dQ}{dt}=a-bQ$ and its solution $Q=\frac{a}{b}(1-e^{-bt})+Q_0 e^{-bt}$, identifying the long-run equilibrium $Q=a/b$ into your book.
Quick check: A tank holds 200 L of brine. Salt solution (0.3 kg/L) flows in at 4 L/min and the well-mixed solution drains at 4 L/min. Let $Q$ be the mass of salt (kg). Which DE is correct?
We just saw that many applied DEs reduce to $\frac{dQ}{dt}=a-bQ$, which is separable: $\int\frac{dQ}{a-bQ}=\int dt$ gives $Q=\frac{a}{b}(1-e^{-bt})+Q_0 e^{-bt}$. That raises a question: for the specific salt-tank hook (100 L tank, 0.5 kg/L inflow at 2 L/min), what are the explicit values of $a$, $b$, and $Q_0$? This card answers it → $a=0.5\times2=1$ kg/min (rate in); $b=2/100=0.02$ min$^{-1}$ (rate out per kg); $Q_0=0$.
Recall the hook problem: 100 L tank, pure water initially, salt solution (0.5 kg/L) flows in at 2 L/min, mixed solution drains at 2 L/min (volume stays constant at 100 L). Let $Q(t)$ = mass of salt (kg).
Set up:
- Rate in: $0.5 \text{ kg/L} \times 2 \text{ L/min} = 1 \text{ kg/min}$
- Rate out: $\dfrac{Q}{100} \text{ kg/L} \times 2 \text{ L/min} = \dfrac{Q}{50} \text{ kg/min}$
Here $a = 1$, $b = 1/50$, $Q_0 = 0$. The steady state is $Q_\infty = a/b = 50$ kg (sensible: $0.5 \text{ kg/L} \times 100 \text{ L}$). The solution is:
Recall the hook problem: 100 L tank, pure water initially, salt solution (0.5 kg/L) flows in at 2 L/min, mixed solution drains at 2 L/min (volume stays constant at 100 L). Let $Q(t)$ = mass of salt (kg).
Pause — copy the full salt-tank solution: values of $a=1$, $b=0.02$, $Q_0=0$; the particular solution $Q(t)=50(1-e^{-0.02t})$; and the equilibrium amount 50 kg into your book.
Did you get this? True or false: for the salt tank in card 06, the mass of salt approaches 50 kg as $t \to \infty$.
Worked examples · 3 in a row, reveal as you go
A 500 L tank initially contains 10 kg of salt dissolved in water. Brine (0.2 kg/L) flows in at 5 L/min and the well-mixed solution drains at 5 L/min. Find $Q(t)$ and the steady-state mass.
A drug is infused at a constant rate of 6 mg/hr. The body eliminates it at a rate proportional to the current amount, with constant $k = 0.3$ hr$^{-1}$. Initially $Q = 0$. Find $Q(t)$ and the steady-state drug level.
An account earns interest continuously at 5% p.a. and money is withdrawn at \$2000/year. Initially the balance is \$30 000. Find the balance $B(t)$ and determine whether the account is depleted.
Fill the gap: For $\dfrac{dQ}{dt} = 8 - 0.4Q$ with $Q(0) = 0$, the steady-state value is $Q_\infty = $ .
Misconceptions to fix · the 3 traps that cost marks
Did you get this? True or false: for a tank where inflow rate equals outflow rate (volume stays constant), the rate of salt leaving equals $\dfrac{Q}{V} \times f_{\text{out}}$.
Activities · practice with the ideas
A 200 L tank contains 4 kg of salt. Brine (0.1 kg/L) flows in at 3 L/min; mixed solution drains at 3 L/min. Write the DE for $Q(t)$ and state the steady-state mass.
Solve the DE from Activity 1 with initial condition $Q(0) = 4$. Give the full expression for $Q(t)$.
A drug is delivered at 10 mg/hr and eliminated at rate $0.2Q$ mg/hr. Find the steady-state drug level. How long does it take to reach 90% of this level? (Hint: solve $e^{-0.2t} = 0.1$.)
An account with balance $B$ earns 4% continuous interest and has \$3000/year withdrawn. If $B(0) = \$50\,000$, write and solve the DE. Does the account grow or decline? Why?
Verify that $Q(t) = 50(1 - e^{-t/50})$ satisfies $\tfrac{dQ}{dt} = 1 - \tfrac{Q}{50}$ with $Q(0) = 0$. Show all substitutions.
Odd one out: A tank (100 L, pure water) has brine (0.4 kg/L) flowing in at 2 L/min and draining at 2 L/min. Three of these statements are correct. Which one is NOT?
Earlier you wrote the DE for the salt tank (100 L, 0.5 kg/L brine, 2 L/min each way).
The correct DE is $\tfrac{dQ}{dt} = 1 - \tfrac{Q}{50}$. Rate in $= 0.5 \times 2 = 1$ kg/min; rate out $= \tfrac{Q}{100} \times 2 = \tfrac{Q}{50}$ kg/min. The steady state is $Q_\infty = 50$ kg (0.5 kg/L $\times$ 100 L). Did you get the rate-out expression right? That is the most common error in mixing problems.
Pick your answer, then rate your confidence — that tells the system what to drill next. Each retry pulls a fresh mix from the bank.
Q1. A 400 L tank holds 8 kg of salt. Brine (0.25 kg/L) flows in at 4 L/min and drains at 4 L/min. Write the DE for $Q(t)$ and state the steady-state salt mass. (2 marks)
Q2. Solve the DE from Q1 with $Q(0) = 8$. Find the time at which $Q = 90$ kg. Give the time in exact form. (3 marks)
Q3. An investor's portfolio $B(t)$ (in thousands of dollars) satisfies $\dfrac{dB}{dt} = 0.06B - 5$, with $B(0) = 70$. Find $B(t)$ and determine whether the portfolio grows indefinitely or is eventually depleted. (3 marks)
Comprehensive answers (click to reveal)
Activity answers: 1. Rate in $=0.3$ kg/min, rate out $=\tfrac{3Q}{200}$ kg/min, DE: $\tfrac{dQ}{dt}=0.3-\tfrac{3Q}{200}$, $Q_\infty=20$ kg · 2. $Q(t)=20-16e^{-3t/200}$ · 3. $Q_\infty=50$ mg; 90% at $t=-\tfrac{\ln(0.1)}{0.2}=\tfrac{\ln 10}{0.2}=5\ln 10\approx11.5$ hr · 4. DE: $\tfrac{dB}{dt}=0.04B-3000$; $B^*=75\,000$; since $B_0=50\,000 < 75\,000$ the account is declining · 5. $\tfrac{dQ}{dt}=e^{-t/50}$; RHS: $1-\tfrac{50(1-e^{-t/50})}{50}=1-(1-e^{-t/50})=e^{-t/50}$ ✓; $Q(0)=0$ ✓.
Q1 (2 marks): Rate in $=0.25\times4=1$ kg/min; rate out $=\tfrac{Q}{400}\times4=\tfrac{Q}{100}$ kg/min [1]. DE: $\tfrac{dQ}{dt}=1-\tfrac{Q}{100}$; $Q_\infty=100$ kg [1].
Q2 (3 marks): $a=1$, $b=1/100$, $Q_0=8$; $Q(t)=100-92e^{-t/100}$ [1]. Set $100-92e^{-t/100}=90$: $e^{-t/100}=\tfrac{10}{92}=\tfrac{5}{46}$ [1]. $t=100\ln\!\tfrac{46}{5}$ [1].
Q3 (3 marks): Rewrite as $\tfrac{dB}{dt}=0.06(B-\tfrac{250}{3})$; equilibrium $B^*=5/0.06=\tfrac{250}{3}\approx83.3$ [\$'000] [1]. Separate: $B-\tfrac{250}{3}=Ce^{0.06t}$; $B(0)=70$ gives $C=70-\tfrac{250}{3}=-\tfrac{40}{3}$ [1]. $B(t)=\tfrac{250}{3}-\tfrac{40}{3}e^{0.06t}$. Since $B_0=70
Five timed questions. Beat the boss to bank a tier — gold (90% + speed), silver (75%), or bronze (50%). Replays welcome.
⚔ Enter the arenaClimb platforms by answering DE modelling questions. Lighter alternative to the boss.
Mark lesson as complete
Tick when you've finished the practice and review.