DIFFERENTIAL EQUATIONS • FIRST-ORDER DIFFERENTIAL EQUATIONS

Modeling with Linear ODEs — Modeling with Linear First-Order ODEs

Learn how first-order linear differential equations model real-world phenomena like cooling, mixing, and population growth.

Historical Context & Motivation

Long before smartphones or computers, scientists and mathematicians were struggling with a fundamental question: how do we predict things that change over time? Whether it was the cooling of a hot cup of tea, the spread of a disease through a population, or the trajectory of a cannonball, people needed a mathematical language to describe rates of change. That language turned out to be differential equations — equations that relate a quantity to its own rate of change.

The story of first-order linear ordinary differential equations (ODEs) is deeply intertwined with the development of calculus itself. As Newton and Leibniz built the foundations of calculus in the late 1600s, they immediately applied their new tools to problems in physics and engineering. Over the following centuries, mathematicians discovered that many real-world situations naturally produce equations of the form dy/dt + P(t)·y = Q(t), and they developed elegant methods to solve them.

1687
Newton's Principia
Isaac Newton published his Principia Mathematica, introducing the concept of fluxions (derivatives) and using differential equations to describe motion under gravity.
1701
Newton's Law of Cooling
Newton formulated his law of cooling, stating that an object's rate of temperature change is proportional to the difference between its temperature and the surrounding temperature — a classic first-order linear ODE.
1739
Euler's Integrating Factor
Leonhard Euler developed the integrating factor method, a systematic technique for solving any first-order linear ODE. This method is still taught and used today.
1798
Malthus and Population Growth
Thomas Malthus proposed that populations grow at a rate proportional to their size, leading to the exponential growth model dP/dt = kP — one of the simplest first-order linear ODEs.
1900s
Modern Engineering Applications
Linear first-order ODEs became essential tools in electrical engineering (RC circuits), pharmacology (drug metabolism), and environmental science (pollutant mixing in lakes).

The central question that this lesson addresses is: how do we translate a real-world scenario into a first-order linear ODE, and then solve that equation to make predictions? By the end of this lesson, you will be able to recognize when a problem leads to a linear first-order ODE and apply the integrating factor technique to find its solution.

Core Principles & Definitions

Before we dive into specific models, let's establish the key ideas you need. A differential equation is any equation that involves derivatives — it tells you something about how a quantity changes rather than what the quantity equals directly. A first-order differential equation involves only the first derivative (dy/dt), not higher derivatives like d²y/dt². The word linear means that the unknown function y and its derivative dy/dt appear only to the first power — no y², no (dy/dt)³, and no products like y·(dy/dt).

1

Standard Form

A first-order linear ODE can always be written as dy/dt + P(t)·y = Q(t), where P(t) and Q(t) are known functions of t. Getting the equation into this form is the essential first step.
2

Integrating Factor

The function μ(t) = e^(∫P(t) dt) is called the integrating factor. Multiplying both sides of the ODE by μ(t) transforms the left side into the derivative of a product, making integration straightforward.
3

Initial Condition

A condition like y(0) = y₀ pins down one specific solution from the infinite family. In real-world models, this represents the starting value — an initial temperature, population, or concentration.
4

Modeling Workflow

Real-world modeling follows a cycle: (1) identify the quantity changing, (2) write a rate equation from physical laws, (3) solve the ODE, and (4) interpret the solution in context.
KEY TAKEAWAY
Think of a first-order linear ODE like a recipe that tells you how fast a bathtub fills (or drains) at every moment. The water level is your unknown y, the faucet flow rate and drain rate are P(t) and Q(t), and the initial condition tells you how full the tub was when you started. Solving the ODE is like calculating the water level at any future time.

Visual Explanation — The Modeling Pipeline

The diagram below shows the complete workflow for modeling with first-order linear ODEs. Every real-world modeling problem follows this pipeline: you start with a physical scenario, translate it into mathematical language, solve the resulting equation, and then interpret the answer back in the real world. Pay special attention to the middle steps, where the standard form and integrating factor play their critical roles.

The seven-step modeling pipeline. Steps 1–2 require physical intuition; steps 3–6 are algebraic; step 7 brings you back to the real world. Newton's cooling example is traced along the bottom.

Notice that the pipeline has two distinct phases. The first phase (steps 1–2) is about translating English into math — this is often the hardest part. You need to identify what quantity is changing, what drives that change, and whether the situation fits the linear first-order pattern. The second phase (steps 3–6) is purely algebraic and computational — once you have the ODE in standard form, the integrating factor method is a reliable recipe that always works.

Mathematical Framework

Now let's formalize the mathematics. Every linear first-order ODE can be put into a single standard form, and there is a universal solution technique — the integrating factor method. Here are the equations you need to know and understand.

STANDARD FORM
dy/dt + P(t) · y = Q(t)
y = unknown function of t (the quantity being modeled); P(t) = coefficient function (often a constant); Q(t) = forcing function (external input or driving term).
INTEGRATING FACTOR
μ(t) = e^(∫P(t) dt)
μ(t) is the integrating factor. When you multiply both sides of the standard form by μ(t), the left side becomes d/dt[μ(t) · y], which is easy to integrate.
GENERAL SOLUTION
y(t) = (1/μ(t)) · [∫ μ(t) · Q(t) dt + C]
C is the constant of integration, determined by the initial condition y(t₀) = y₀. This formula gives you the complete solution once μ(t) and Q(t) are known.

Here's why the integrating factor works. When you multiply both sides by μ(t), the left side of the equation becomes exactly d/dt[μ(t) · y]. This is because of the product rule from calculus: d/dt[μ · y] = μ · (dy/dt) + (dμ/dt) · y. Since dμ/dt = P(t) · μ(t) by the definition of μ, this matches μ · (dy/dt) + P(t) · μ · y, which is what you get when you multiply the standard form by μ. Once the left side is a single derivative, you just integrate both sides — and that's the entire trick.

💡 When P(t) is Constant
In most high-school-level applications, P(t) is simply a constant k. In that case, the integrating factor simplifies to μ(t) = e^(kt). This covers Newton's cooling, exponential growth/decay, and simple mixing problems.

Classic Models — Three Real-World Applications

First-order linear ODEs appear in a remarkable variety of real-world settings. Let's examine three classic models that you are likely to encounter. Each one starts with a physical law or common-sense observation and arrives at the standard form dy/dt + P(t)·y = Q(t). The diagram below visualizes all three models side by side.

Top row: three classic models with their ODEs, variable definitions, and standard forms. Bottom: typical solution curves showing how each quantity approaches its equilibrium value over time. The cooling curve (dashed red) decays from above, while mixing (green) and RC charging (dashed violet) rise from below.

All three models share a remarkable structural similarity. In each case, the quantity of interest (temperature, solute amount, or charge) approaches an equilibrium value exponentially. The rate at which it approaches that equilibrium is controlled by the coefficient P in the standard form. A larger P means faster approach to equilibrium. The initial condition determines whether the curve starts above or below the equilibrium line.

🔑 Pattern to Remember
When P(t) = k (a positive constant) and Q(t) = k·M (also constant), the solution always looks like y(t) = M + (y₀ − M)e^(−kt). Here M is the equilibrium, y₀ is the starting value, and k controls how fast you get there. This single formula covers Newton's cooling and constant-input mixing problems!

Worked Example — Newton's Law of Cooling

A cup of coffee is brewed at 95 °C and placed in a room where the ambient temperature is 20 °C. After 5 minutes the coffee has cooled to 75 °C. We want to find the temperature T(t) at any time t and determine how long it takes for the coffee to reach 40 °C.

Newton's Cooling — Full Solution
1
Step 1 — Write the ODE from the physical lawNewton's law of cooling states that the rate of change of temperature is proportional to the difference between the object's temperature and the ambient temperature. This gives us dT/dt = −k(T − 20), where k > 0 is the cooling constant. The negative sign ensures temperature decreases when T > 20.
2
Step 2 — Convert to standard formExpand the right side: dT/dt = −kT + 20k. Rearrange by moving the −kT term to the left side: dT/dt + kT = 20k. Now we have standard form with P(t) = k and Q(t) = 20k.
Standard form: dT/dt + kT = 20k
3
Step 3 — Find the integrating factorThe integrating factor is μ(t) = e^(∫k dt) = e^(kt). Since k is constant, this integral is straightforward.
μ(t) = e^(kt)
4
Step 4 — Multiply both sides by μ(t) and integrateMultiplying the standard form by e^(kt): e^(kt) · dT/dt + k·e^(kt)·T = 20k·e^(kt). The left side is d/dt[e^(kt)·T]. So d/dt[e^(kt)·T] = 20k·e^(kt). Integrate both sides with respect to t: e^(kt)·T = 20k · (1/k)·e^(kt) + C = 20e^(kt) + C. Divide both sides by e^(kt): T(t) = 20 + C·e^(−kt).
General solution: T(t) = 20 + C·e^(−kt)
5
Step 5 — Apply the initial condition T(0) = 95At t = 0: 95 = 20 + C·e^(0) = 20 + C. So C = 75. Our solution becomes T(t) = 20 + 75·e^(−kt). We still need to find k.
T(t) = 20 + 75·e^(−kt), with k unknown
6
Step 6 — Use the second data point T(5) = 75 to find kSubstitute t = 5, T = 75: 75 = 20 + 75·e^(−5k). Subtract 20: 55 = 75·e^(−5k). Divide by 75: 55/75 = e^(−5k), so 11/15 = e^(−5k). Take the natural log: ln(11/15) = −5k. Thus k = −ln(11/15)/5 = ln(15/11)/5 ≈ 0.3101/5 ≈ 0.0620 per minute.
k ≈ 0.0620 min⁻¹; T(t) = 20 + 75·e^(−0.0620t)
7
Step 7 — Find when T = 40 °CSet T(t) = 40: 40 = 20 + 75·e^(−0.0620t). Subtract 20: 20 = 75·e^(−0.0620t). Divide by 75: 20/75 = e^(−0.0620t), so 4/15 = e^(−0.0620t). Take the natural log: ln(4/15) = −0.0620t. Thus t = −ln(4/15)/0.0620 = ln(15/4)/0.0620 ≈ 1.3217/0.0620 ≈ 21.3 minutes.
The coffee reaches 40 °C after approximately 21.3 minutes.
MODELING INSIGHT
Notice the workflow: we needed two pieces of data — the initial temperature and one additional measurement — to pin down both the constant C and the parameter k. In real modeling problems, you'll almost always need at least as many data points as you have unknown constants.

Strengths & Limitations of Linear First-Order Models

Linear first-order ODEs are powerful modeling tools, but they have both strengths and limitations. Understanding when these models work well — and when they break down — is essential for responsible mathematical modeling.

Strengths and limitations of first-order linear ODE models
AspectStrengthsLimitations
SolvabilityThe integrating factor method always works — every linear first-order ODE has a closed-form solution.The integrals involved may be difficult or impossible to compute by hand for complicated P(t) and Q(t).
ApplicabilityCovers a wide range of phenomena: cooling, mixing, simple circuits, radioactive decay, drug dosing.Many real phenomena are nonlinear (e.g., logistic growth, turbulent fluid flow) and don't fit this model.
Predictive PowerExcellent for short- to medium-term predictions when underlying assumptions hold.Long-term predictions can diverge from reality if conditions change (e.g., ambient temperature shifts).
SimplicityThe model is easy to set up, interpret, and communicate to non-experts.Oversimplification can miss important behaviors like oscillations or threshold effects.
🌐 THE BIGGER PICTURE
First-order linear ODEs are often the first tool you reach for when modeling a new situation. Think of them as training wheels — they help you understand the basic behavior of a system. If the linear model doesn't match your data, that mismatch tells you something important: the system probably has nonlinear features (like competition or saturation) that require more advanced models.

Connection to Higher-Order and Nonlinear ODEs

The techniques you've learned for first-order linear ODEs are a foundation for much more. As you advance in mathematics, you'll encounter equations with higher-order derivatives and nonlinear terms. Understanding how first-order linear models relate to these more complex equations helps you see where you are in the bigger mathematical landscape.

First-order linear ODEs vs. advanced differential equations
FeatureFirst-Order Linear ODEAdvanced Extensions
OrderContains only dy/dt (first derivative)Second-order and higher: d²y/dt², d³y/dt³, etc. — model oscillations (springs, circuits with inductors)
Linearityy and dy/dt appear only to the first powerNonlinear: terms like y², sin(y), y·dy/dt — model population competition (logistic), pendulums
Solution MethodIntegrating factor (always works)Characteristic equations, Laplace transforms, numerical methods, qualitative analysis
Typical BehaviorExponential growth, decay, or approach to equilibriumOscillations, chaos, bifurcations, limit cycles

The good news is that many of the ideas you've learned — standard form, initial conditions, equilibrium behavior, and the modeling pipeline — carry directly over to more advanced equations. If you continue to study differential equations, you'll see the integrating factor idea generalized into techniques like variation of parameters and Laplace transforms. For now, mastering first-order linear ODEs gives you a solid foundation and a powerful set of tools for real-world applications.

Practice Problems

PROBLEM 1CONCEPTUAL
Explain in your own words why every solution to a Newton's cooling problem eventually approaches the ambient temperature, regardless of the starting temperature. What role does the exponential function play in this behavior?
PROBLEM 2BASIC CALCULATION
Solve the initial value problem dy/dt + 3y = 12, with y(0) = 2. Find the general solution using the integrating factor method, then apply the initial condition.
PROBLEM 3INTERMEDIATE
A tank initially holds 100 liters of pure water. A salt solution with concentration 0.5 kg/L flows in at 4 L/min, and the well-stirred mixture flows out at 4 L/min. Set up and solve the differential equation for A(t), the amount of salt (in kg) in the tank at time t. How much salt is in the tank after 20 minutes?
PROBLEM 4APPLIED
A forensic investigator finds a body at 11:00 PM with a temperature of 30 °C. The room temperature is a constant 22 °C, and normal body temperature is 37 °C. The cooling constant for the body is k = 0.035 min⁻¹. Using Newton's law of cooling, estimate the time of death.
PROBLEM 5CRITICAL THINKING
Consider the mixing problem from Problem 3, but now suppose the outflow rate is 6 L/min (while inflow remains at 4 L/min). The volume is no longer constant. Write a new ODE for A(t), explain why it is still first-order linear, and discuss qualitatively how the solution would differ from the constant-volume case. (You do not need to solve it completely.)

Lesson Summary

In this lesson, you learned how to model real-world phenomena using first-order linear ordinary differential equations. Every such equation can be written in standard form: dy/dt + P(t)·y = Q(t), and solved using the integrating factor μ(t) = e^(∫P(t) dt). The general solution is y(t) = (1/μ) · [∫μQ dt + C], where C is determined by the initial condition.

You explored three classic models: Newton's law of cooling (temperature approaches ambient), mixing problems (concentration approaches a steady state), and RC circuits (charge builds toward a maximum). All share the pattern of exponential approach to equilibrium. The seven-step modeling pipeline — from identifying the changing quantity through solving and interpreting — is a framework you can apply to any new situation. As you advance, these ideas extend naturally to higher-order and nonlinear differential equations.

Varsity Tutors • Differential Equations • Modeling with Linear ODEs — Modeling with Linear First-Order ODEs