CALCULUS 2 • DIFFERENTIAL EQUATIONS

Modeling with Differential Equations — Modeling Situations with Differential Equations

Translating real-world phenomena into equations that capture how quantities change over time.

Historical Context & Motivation

The practice of using differential equations to model physical phenomena is as old as calculus itself. When Newton and Leibniz independently formulated the foundations of calculus in the late seventeenth century, they were not pursuing abstraction for its own sake — they were seeking a mathematical language powerful enough to describe how quantities such as velocity, force, and population change in continuous time. The idea that a single equation relating a function to its derivatives could encode the entire future behavior of a system proved to be one of the most transformative insights in the history of science, reshaping physics, engineering, biology, and economics over the following centuries.

1687
Newton's Principia Mathematica
Isaac Newton published his laws of motion, expressing the relationship F = ma as what we now recognize as a second-order differential equation. His law of cooling — stating that the rate of heat loss is proportional to the temperature difference — became one of the earliest explicit differential equation models.
1798
Malthus and Exponential Growth
Thomas Malthus proposed that populations grow at a rate proportional to their current size, giving rise to the exponential growth model dP/dt = kP. This simple differential equation became a foundational example in mathematical biology and ecology.
1838
Verhulst's Logistic Equation
Pierre-François Verhulst refined Malthus's model by incorporating a carrying capacity, producing the logistic equation dP/dt = rP(1 − P/K). This model captured the self-limiting behavior of real populations and remains widely used in ecology, epidemiology, and market analysis.
1927
Kermack–McKendrick SIR Model
William Kermack and Anderson McKendrick developed a system of coupled differential equations to model the spread of infectious diseases. Their SIR model (Susceptible–Infected–Recovered) demonstrated that differential equations could capture the dynamics of epidemics, laying the groundwork for modern mathematical epidemiology.
20th–21st c.
Modern Computational Modeling
With the advent of digital computers, differential equation models expanded into climate science, neural networks, financial derivatives pricing (the Black–Scholes equation), and beyond. Numerical solvers now handle systems far too complex for closed-form solutions, but the art of formulating the right model remains a fundamentally human skill.

The central question that this lesson addresses is deceptively simple: given a real-world scenario — a cooling cup of coffee, a growing bacterial colony, a draining tank — how do we translate the verbal or physical description into a differential equation that faithfully captures the system's behavior? This translation step, often called mathematical modeling, is both the most creative and the most practically important skill in the study of differential equations, because the most elegant solution technique is useless if the equation itself does not reflect reality.

Core Principles of Differential Equation Modeling

Before diving into specific models, it is essential to understand the guiding principles that underlie the process of constructing a differential equation from a real-world scenario. These principles form a repeatable framework: identify the quantity of interest, articulate the rate law governing its change, express that law symbolically, and then specify any initial or boundary conditions that anchor the solution to a particular physical situation.

1

Identify the Dependent Variable

Determine the quantity whose change you wish to describe — temperature T(t), population P(t), concentration C(t), etc. This becomes your unknown function of the independent variable (usually time t).
2

Articulate the Rate Law

Express, in words, what governs the rate of change. Phrases like 'proportional to,' 'inversely proportional to,' or 'proportional to the product of' translate directly into mathematical relationships involving dy/dt.
3

Translate to Symbolic Form

Convert the verbal rate law into an equation. 'Proportional to y' becomes dy/dt = ky; 'proportional to the difference between y and a constant' becomes dy/dt = k(y − A). Assign appropriate constants of proportionality.
4

Specify Initial / Boundary Conditions

A differential equation typically has a family of solutions. An initial condition such as y(0) = y₀ selects the unique solution that matches the physical scenario. Without it, the model is incomplete.
5

Validate and Refine

Check whether the model's qualitative predictions match observed behavior. Does the solution grow when it should? Does it approach an equilibrium? If not, refine the rate law — perhaps additional terms or nonlinearities are needed.
KEY TAKEAWAY
Think of a differential equation as a recipe that describes the next step rather than the entire journey. Just as a GPS navigation system tells you your current heading and speed at each instant (not every future turn), a differential equation encodes the instantaneous rule of change. Once you have the rule and a starting point, the entire trajectory is determined — whether you compute it by hand, by separation of variables, or by a numerical solver.

Visualizing the Modeling Process

The diagram below illustrates the complete modeling pipeline: from a verbal description of a real-world scenario, through the identification of variables and rate laws, to the formulation of a differential equation, and finally to its solution and interpretation. Understanding this pipeline is crucial because in many applied settings, formulating the correct equation is the hardest part of the problem — solving it is often mechanical or computational.

The four-step modeling pipeline is illustrated with Newton's law of cooling as a concrete example. Notice the feedback loop: if the solved model does not match observed data, we return to refine the rate law or add additional terms.

The key insight from this diagram is that the modeling process is not strictly linear. In practice, experienced modelers cycle between steps 2 and 5 repeatedly, gradually refining the differential equation until it captures the essential dynamics of the real-world system. A first model might be linear and autonomous, and only after comparing its predictions with data does the modeler realize that a nonlinear correction or a time-dependent coefficient is needed. This iterative nature is what distinguishes applied mathematics from pure theory: the goal is not just mathematical elegance but predictive accuracy.

Mathematical Framework for Common Models

Several recurring verbal patterns appear across modeling problems, and each translates into a specific standard form of differential equation. Mastering these translations is the core skill of this lesson. Below are the most important canonical models, presented with their verbal descriptions, symbolic forms, and the physical or biological contexts in which they arise.

Exponential Growth and Decay

EXPONENTIAL GROWTH / DECAY
dy/dt = ky
Where y(t) is the quantity, k is the proportionality constant (k > 0 for growth, k < 0 for decay), and t is time. Solution: y(t) = y₀eᵏᵗ. Verbal cue: "the rate of change is proportional to the current value."

Newton's Law of Cooling

NEWTON'S LAW OF COOLING
dT/dt = −k(T − Tₐ)
Where T(t) is the temperature of the object, Tₐ is the ambient temperature, and k > 0. Verbal cue: "the rate of cooling is proportional to the difference between the object's temperature and its surroundings." The negative sign ensures T decreases when T > Tₐ.

Logistic Growth

LOGISTIC GROWTH
dP/dt = rP(1 − P/K)
Where P(t) is the population, r is the intrinsic growth rate, and K is the carrying capacity. Verbal cue: "the growth rate is proportional to the population but slows as it approaches a maximum." When P ≪ K, the model behaves like exponential growth; as P → K, the factor (1 − P/K) → 0 and growth halts.

Mixing Problems

MIXING / TANK PROBLEM
dQ/dt = (rate in) − (rate out) = rᵢₙcᵢₙ − rₒᵤₜ · Q(t)/V(t)
Where Q(t) is the amount of solute, rᵢₙ and rₒᵤₜ are the volumetric flow rates in and out, cᵢₙ is the concentration of incoming solution, and V(t) is the tank volume. Verbal cue: "a substance enters and leaves a well-mixed tank." The concentration leaving equals Q(t)/V(t) because the tank is assumed well-mixed at all times.
💡 Common Verbal-to-Symbolic Translations
"Rate of change is proportional to y" → dy/dt = ky. "Rate is proportional to the difference from A" → dy/dt = k(y − A). "Rate is proportional to the product of y and (M − y)" → dy/dt = ky(M − y). "Rate equals input rate minus output rate" → dy/dt = (rate in) − (rate out). These patterns cover a surprisingly large portion of first-course modeling problems.

Classifying Common Differential Equation Models

Having established the major model types, it is useful to organize them by their mathematical structure and physical behavior. The diagram below places the four canonical models on a landscape that reveals their relationships: exponential growth is the simplest, and every other model can be seen as a modification of it. Newton's cooling is an exponential decay toward an equilibrium; logistic growth adds a self-limiting term; and mixing problems introduce input-output balances. Recognizing where a new problem fits on this map guides the modeler directly to the correct equation form.

Four canonical models plotted on the same axes. Exponential growth (pink) accelerates without bound. Logistic growth (green) levels off at the carrying capacity K = 75. Newton's cooling (cyan) decays toward ambient temperature Tₐ = 20. The mixing model (amber) rises toward an equilibrium determined by input and output flow rates.
Summary of canonical first-order differential equation models
ModelEquationLong-Term BehaviorKey Verbal Cue
Exponential Growthdy/dt = ky, k > 0y → ∞ as t → ∞"proportional to current amount"
Exponential Decaydy/dt = ky, k < 0y → 0 as t → ∞"decays proportionally"
Newton's CoolingdT/dt = −k(T − Tₐ)T → Tₐ as t → ∞"rate ∝ temp. difference"
Logistic GrowthdP/dt = rP(1 − P/K)P → K as t → ∞"slows as it nears capacity"
Mixing / TankdQ/dt = rᵢₙcᵢₙ − rₒᵤₜQ/VQ → Vₑ · cᵢₙ (equilibrium)"rate in minus rate out"

Worked Example: Modeling a Draining Tank

A mixing tank initially contains 200 liters of brine with 50 kg of dissolved salt. Fresh water (containing no salt) flows into the tank at a rate of 5 liters per minute, and the well-mixed solution drains out at the same rate. We wish to find a differential equation for Q(t), the amount of salt in the tank at time t, and then determine how long it takes for the salt content to drop to 10 kg.

Mixing Tank: Finding Q(t)
1
Step 1 — Identify Variables and ConstantsLet Q(t) = amount of salt (kg) at time t (min). The tank volume is constant at V = 200 L because the inflow rate equals the outflow rate (both 5 L/min). The initial condition is Q(0) = 50 kg. The incoming fresh water has salt concentration cᵢₙ = 0 kg/L.
Q(0) = 50, V = 200, rᵢₙ = rₒᵤₜ = 5 L/min, cᵢₙ = 0
2
Step 2 — Determine Rate In and Rate OutRate of salt in = rᵢₙ × cᵢₙ = 5 × 0 = 0 kg/min (fresh water carries no salt). Rate of salt out = rₒᵤₜ × (concentration in tank) = 5 × Q(t)/200 = Q(t)/40 kg/min. The concentration leaving the tank equals Q(t)/V because the tank is well-mixed.
Rate in = 0, Rate out = Q/40
3
Step 3 — Formulate the Differential EquationApplying the balance principle dQ/dt = (rate in) − (rate out), we obtain dQ/dt = 0 − Q/40, or equivalently dQ/dt = −Q/40. This is an exponential decay equation with k = −1/40.
dQ/dt = −Q/40, Q(0) = 50
4
Step 4 — Solve by Separation of VariablesSeparating: dQ/Q = −dt/40. Integrating both sides: ln|Q| = −t/40 + C. Exponentiating: Q(t) = Ae⁻ᵗ/⁴⁰. Applying the initial condition Q(0) = 50 gives A = 50. Therefore Q(t) = 50e⁻ᵗ/⁴⁰.
Q(t) = 50e⁻ᵗ/⁴⁰
5
Step 5 — Answer the Specific QuestionSet Q(t) = 10: 10 = 50e⁻ᵗ/⁴⁰ → e⁻ᵗ/⁴⁰ = 1/5 → −t/40 = ln(1/5) = −ln 5 → t = 40 ln 5 ≈ 40 × 1.6094 ≈ 64.4 minutes.
t ≈ 64.4 minutes
📝 Modeling Insight
Notice that the differential equation was constructed before any calculus was performed. Steps 1–3 are pure modeling — translating the physical setup into mathematical language. Only Steps 4–5 involve the solution technique. This separation is deliberate: mastering the modeling step is the primary goal of this lesson.

Strengths and Limitations of Simple DE Models

Every mathematical model is an idealization. The differential equations we have studied in this lesson are first-order, autonomous (or nearly so), and involve a single dependent variable. These simplifications make the models tractable and yield elegant closed-form solutions, but they also impose limitations. Understanding what these models capture well and where they break down is essential for deploying them responsibly in scientific and engineering contexts.

Strengths and limitations of first-order ODE models
StrengthLimitationWhen It Matters
Closed-form solutions enable exact predictions and easy sensitivity analysisMany real systems are nonlinear or involve multiple interacting variables, resisting closed-form solutionsEcosystem modeling with predator-prey dynamics, chemical reaction networks
Small number of parameters (k, r, K, Tₐ) keeps models interpretableParameter estimation from noisy data can be unreliable; a small change in k can produce large changes in long-term behaviorRadioactive decay dating, pharmacokinetics
Models encode qualitative behavior (growth, decay, equilibrium) even before solvingAssumes continuous change — fails for discrete events (e.g., integer populations, batch processes)Small population dynamics, digital signal systems
Well-mixed and homogeneous assumptions simplify to ODEsSpatial heterogeneity requires partial differential equations (PDEs), significantly increasing complexityHeat distribution along a rod, pollutant dispersion in a lake
KEY TAKEAWAY
Think of a simple differential equation model like a map of a city: a subway map is excellent for planning train routes but useless for estimating walking distances. Similarly, a first-order ODE model is excellent for capturing the dominant trend (growth, decay, saturation) but may miss fine-grained spatial or stochastic detail. The modeler's job is to choose the right level of abstraction for the question at hand.

Connections to Advanced Differential Equations

The single first-order ODE models introduced in this lesson serve as the entry point to a vast hierarchy of differential equation theory. Understanding how these simple models generalize helps you appreciate both their power and the directions in which the subject deepens. Below, we compare the models of this lesson with their more advanced counterparts that appear in later courses on ordinary differential equations, partial differential equations, and dynamical systems.

From first-order models to advanced generalizations
This LessonAdvanced GeneralizationNew Features
dy/dt = ky (single population)Lotka–Volterra system: dx/dt = αx − βxy, dy/dt = δxy − γyCoupled equations, oscillatory behavior, phase-plane analysis
dT/dt = −k(T − Tₐ) (uniform body)Heat equation: ∂u/∂t = α∇²uSpatial variation, partial derivatives, boundary conditions
dP/dt = rP(1 − P/K) (deterministic)Stochastic logistic: dP = rP(1 − P/K)dt + σP dWRandom fluctuations, Itô calculus, probability distributions of outcomes
dQ/dt = f(Q) (first-order ODE)my″ + cy′ + ky = F(t) (second-order ODE)Inertia, damping, resonance, oscillations in mechanical and electrical systems

The modeling philosophy, however, remains unchanged at every level of sophistication. Whether you are writing a single first-order ODE for salt in a tank or a system of stochastic partial differential equations for turbulent fluid flow, the process is the same: identify the quantities of interest, articulate the physical laws governing their rates of change, encode those laws symbolically, and validate against data. The complexity of the mathematics increases, but the conceptual core of modeling — translating reality into the language of rates — is exactly what you are learning now.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain why the differential equation dP/dt = rP(1 − P/K) reduces to approximately dP/dt ≈ rP when the population P is much smaller than the carrying capacity K. What does this tell you about the early behavior of a logistically growing population?
PROBLEM 2BASIC CALCULATION
A radioactive substance decays at a rate proportional to the amount present. If the half-life is 5 years, write the differential equation and find the decay constant k. If 80 grams are present initially, how much remains after 12 years?
PROBLEM 3INTERMEDIATE
A cup of coffee at 95°C is placed in a room at 22°C. After 5 minutes, the coffee has cooled to 80°C. Set up the differential equation using Newton's law of cooling, solve for the temperature function T(t), and determine when the coffee reaches 40°C.
PROBLEM 4APPLIED
A 500-liter tank is initially filled with pure water. Brine containing 0.04 kg of salt per liter is pumped in at 8 L/min, and the well-mixed solution is drained at 8 L/min. Set up the initial value problem for Q(t), the mass of salt at time t. Solve it and determine the salt content after 30 minutes.
PROBLEM 5CRITICAL THINKING
A disease spreads through a population of N = 10,000 at a rate proportional to the product of the number of infected individuals I and the number of susceptible individuals (N − I). With proportionality constant β = 0.0001 per person per day, and I(0) = 10, write the differential equation. Show that this equation is mathematically equivalent to a logistic equation and identify the 'carrying capacity.' Discuss the limitations of this model for real epidemics.

Lesson Summary

Modeling with differential equations is the art of translating real-world phenomena into mathematical statements about rates of change. The process follows a consistent pipeline: identify the dependent variable, articulate the rate law (using verbal cues like "proportional to" or "proportional to the difference"), convert the verbal statement into a symbolic differential equation, attach initial conditions, and then solve and validate.

The four canonical first-order models — exponential growth/decay (dy/dt = ky), Newton's law of cooling (dT/dt = −k(T − Tₐ)), logistic growth (dP/dt = rP(1 − P/K)), and mixing problems (dQ/dt = rate in − rate out) — form the foundation for a vast hierarchy of more complex models in physics, biology, engineering, and finance. Mastering the modeling step — the creative act of writing the equation — is as important as mastering the technique of solving it.

Varsity Tutors • Calculus 2 • Modeling with Differential Equations — Modeling Situations with Differential Equations