Modeling with Differential Equations
Practise this section (12)Your savings account earns 5% interest, added continuously. The more money in the account, the faster it grows. A balance of $\$2{,}000$ grows twice as fast as a balance of $\$1{,}000$. That is a rule about a rate of change, and it never mentions the balance at a particular time. Can we use the rule alone to find the function $B(t)$ that gives the balance? Equations that describe a situation through rates of change are called differential equations. This page shows you how to write them, check their solutions, and read them.
What Is a Differential Equation?
Most functions you have met so far were given by a formula such as $y = x^2$. Many real situations work the other way around: you know how fast something changes, and you want the function.
The order of a differential equation is the highest derivative that appears. In AP Calculus AB nearly all examples are first order: they contain $y'$ but not $y''$.
A differential equation usually has infinitely many solutions. For $\dfrac{dy}{dx} = 2x$, each of $y = x^2$, $y = x^2 + 5$ and $y = x^2 - 3$ works, because adding a constant does not change the derivative. The family $y = x^2 + C$ is the general solution. Move the slider and watch the whole family.
An initial condition such as $y(1) = 3$ picks one curve from the family. Then $1 + C = 3$, so $C = 2$, and $y = x^2 + 2$ is the particular solution.
Reading the equation
A differential equation tells you the rate of change at a given moment. The units of $\dfrac{dy}{dt}$ are always (units of $y$) per (unit of $t$).
The population $P$ of a town, in thousands of people, satisfies $\dfrac{dP}{dt} = 0.03P$, where $t$ is measured in years. At a certain time, $\dfrac{dP}{dt} = 4.2$.…
The population $P$ of a town, in thousands of people, satisfies $\dfrac{dP}{dt} = 0.03P$, where $t$ is measured in years. At a certain time, $\dfrac{dP}{dt} = 4.2$. Explain what this value means in the context of the problem, including units.
Writing a Differential Equation from Words
Modeling means turning a sentence into an equation. Choose letters for the quantity and for time, then translate the rate part: "rate of change of $y$" becomes $\dfrac{dy}{dt}$.
| Sentence | Equation |
|---|---|
| The rate of change of $y$ is proportional to $y$ | $\dfrac{dy}{dt} = ky$ |
| ... proportional to the square root of $y$ | $\dfrac{dy}{dt} = k\sqrt{y}$ |
| ... proportional to the difference between $y$ and $M$ | $\dfrac{dy}{dt} = k(y - M)$ |
| ... proportional to $y$ and to $L - y$ | $\dfrac{dy}{dt} = ky(L - y)$ |
| Rate of change = rate in − rate out | $\dfrac{dy}{dt} = (\text{rate in}) - (\text{rate out})$ |
"Proportional to" always means "equals a constant times". That constant, $k$, is the constant of proportionality. The data in a problem usually let you find it.
Newton's law of cooling is a classic. An object hotter than its surroundings cools faster the bigger the gap, and more slowly as it nears room temperature. The model is that the rate depends on the gap.
Temperature H (°F) of a hot object as a function of time t (min): it falls toward the room temperature of 70°F (dashed line). The curve is steep when the gap is big and nearly flat when the gap is small.The amount of water $W$ (in gallons) in a leaking tank changes at a rate proportional to the amount of water currently in the tank, where $t$ is time in hours. Write a…
The amount of water $W$ (in gallons) in a leaking tank changes at a rate proportional to the amount of water currently in the tank, where $t$ is time in hours. Write a differential equation that models this situation, using $k$ for the constant of proportionality.
Emma pours a cup of hot cocoa in a kitchen that stays at $70^\circ\text{F}$. By Newton's law of cooling, the rate of change of the cocoa's temperature $H$ (in…
Emma pours a cup of hot cocoa in a kitchen that stays at $70^\circ\text{F}$. By Newton's law of cooling, the rate of change of the cocoa's temperature $H$ (in $^\circ\text{F}$) with respect to time $t$ (in minutes) is proportional to the difference between $H$ and the room temperature. Write a differential equation for $H$.
A patient receives a drug through an IV at a constant rate of $5$ mg per hour. The body removes the drug at a rate proportional to the amount present, with constant of…
A patient receives a drug through an IV at a constant rate of $5$ mg per hour. The body removes the drug at a rate proportional to the amount present, with constant of proportionality $0.2$ per hour. Let $A(t)$ be the amount of drug, in mg, in the bloodstream $t$ hours after the IV starts, with $A(0) = 0$.
(a) Write a differential equation for $A$.
(b) Show that $A(t) = 25 - 25e^{-0.2t}$ satisfies the differential equation and the initial condition.
(c) Use the differential equation to find the value of $A$ at which $\dfrac{dA}{dt} = 0$, and explain what this value means for the patient. Find $\displaystyle\lim_{t\to\infty} A(t)$ and compare.
Checking That a Function Is a Solution
You do not need to know how to find a solution to check one. You substitute it in.
The reason is simple: a solution is a function that makes the equation true. So if the equation holds after substitution, the function qualifies.
That answers the question from the start. A balance that grows at 5% of itself per year is $B(t) = B_0 e^{0.05t}$.
A solution only counts on an interval where it is defined and the equation makes sense.
Show that $y = 3e^{2t}$ is a solution to the differential equation $\dfrac{dy}{dt} = 2y$. Show the work that justifies your conclusion.
Show that $y = 3e^{2t}$ is a solution to the differential equation $\dfrac{dy}{dt} = 2y$. Show the work that justifies your conclusion.
Consider the differential equation $\dfrac{dy}{dx} = y - 2x$. (a) Show that $y = 2x + 2 + Ce^{x}$ is a solution for every constant $C$. (b) Find the value of $C$ for…
Consider the differential equation $\dfrac{dy}{dx} = y - 2x$.
(a) Show that $y = 2x + 2 + Ce^{x}$ is a solution for every constant $C$.
(b) Find the value of $C$ for which the solution satisfies $y(0) = 5$.
Let $y = \dfrac{1}{1 - x}$. (a) Show that $y$ satisfies $\dfrac{dy}{dx} = y^2$ and $y(0) = 1$. (b) On what largest interval containing $x = 0$ is $y$ a solution to the…
Let $y = \dfrac{1}{1 - x}$.
(a) Show that $y$ satisfies $\dfrac{dy}{dx} = y^2$ and $y(0) = 1$.
(b) On what largest interval containing $x = 0$ is $y$ a solution to the differential equation? Explain.
Using the Equation Without Solving It
The differential equation itself already contains a lot of information. You can find constants, compute rates, locate constant solutions, and decide whether a quantity is increasing or decreasing, all without finding a formula.
Constant solutions and the sign of the rate
A constant solution (equilibrium) has $\dfrac{dy}{dt} = 0$ for all $t$, so you find it by setting the right-hand side equal to $0$. To see whether $y$ increases or decreases, find the sign of the right-hand side.
The graph of $\dfrac{dP}{dt}$ against $P$ is a parabola. The zeros are the constant solutions, the sign gives the direction, and the vertex gives the fastest growth.
Graph of the growth rate dP/dt against P for a logistic model: a parabola that is zero at P = 0 and P = 200 and has its maximum at P = 100.Another way to say it: in the bathtub model $\dfrac{dV}{dt} = 6 - 0.05V$, the constant solution is where inflow equals outflow. Setting $6 - 0.05V = 0$ gives $V = 120$ gallons.
The number of bacteria $N$ in a culture grows at a rate proportional to the square root of $N$, where $t$ is measured in hours. When $N = 400$, the culture is growing at…
The number of bacteria $N$ in a culture grows at a rate proportional to the square root of $N$, where $t$ is measured in hours. When $N = 400$, the culture is growing at $60$ bacteria per hour.
(a) Write a differential equation for $N$ and find the constant of proportionality.
(b) At what rate is the culture growing when $N = 900$?
Marcus pours tea at $190^\circ\text{F}$ into a mug in a room kept at $70^\circ\text{F}$. At $t = 0$ minutes, the tea is cooling at a rate of $6^\circ\text{F}$ per…
Marcus pours tea at $190^\circ\text{F}$ into a mug in a room kept at $70^\circ\text{F}$. At $t = 0$ minutes, the tea is cooling at a rate of $6^\circ\text{F}$ per minute. The temperature $T$ satisfies $\dfrac{dT}{dt} = k(T - 70)$.
(a) Find $k$.
(b) At what rate is the tea cooling at the moment its temperature is $100^\circ\text{F}$?
A population of fish in a lake satisfies the differential equation $\dfrac{dP}{dt} = 0.02P\left(1 - \dfrac{P}{500}\right)$, where $P$ is the number of fish and $t$ is in…
A population of fish in a lake satisfies the differential equation $\dfrac{dP}{dt} = 0.02P\left(1 - \dfrac{P}{500}\right)$, where $P$ is the number of fish and $t$ is in years.
(a) Find all constant solutions.
(b) For $0 < P < 500$, is $P$ increasing or decreasing? What about for $P > 500$? Justify using the differential equation.
(c) For what value of $P$ is the growth rate $\dfrac{dP}{dt}$ greatest? Justify your answer.
When a Solution Has Limits
A function can satisfy the equation algebraically and still be a valid model only on part of its domain. Two things can cause this: the math (division by zero, a square root of a negative number) or the real situation (a tank cannot have negative water).
Here is a physical version. A tank drains so that its depth satisfies $\dfrac{dh}{dt} = -k\sqrt{h}$. One family of formulas that works is $h = \left(3 - \dfrac{k}{2}t\right)^2$ for a tank that starts $9$ feet deep. Drag the slider and watch what the graph does after it touches $0$. (Here $x$ stands for $t$.)
The formula is a perfect square, so it bounces back up after reaching $0$. A tank would have to refill itself. The differential equation, however, says $h$ stops changing once $h = 0$. The key reason is that the formula only represents the situation until the tank is empty.
When you verify a solution that comes from a square, keep this in mind: $\sqrt{u^2} = |u|$, which equals $u$ only when $u \ge 0$. That is why a condition such as "as long as $3 - \frac{k}{2}t \ge 0$" appears in the statement of the solution.
Water drains from a tank so that the depth $h$ (in feet) satisfies $\dfrac{dh}{dt} = -k\sqrt{h}$, where $k > 0$ and $t$ is in minutes. Let $h_0 > 0$ be the depth at…
Water drains from a tank so that the depth $h$ (in feet) satisfies $\dfrac{dh}{dt} = -k\sqrt{h}$, where $k > 0$ and $t$ is in minutes. Let $h_0 > 0$ be the depth at $t = 0$.
(a) Show that $h(t) = \left(\sqrt{h_0} - \dfrac{k}{2}t\right)^2$ satisfies the differential equation as long as $\sqrt{h_0} - \dfrac{k}{2}t \ge 0$.
(b) If $k = 0.5$ and $h_0 = 16$, find the time at which the tank is empty.
(c) Explain why the model is not valid for times after the tank is empty.
Checking Solutions of Second-Order Equations
Some problems involve $y''$. You verify them the same way: differentiate twice and substitute. A useful tool is to test $y = e^{rx}$, where $r$ is a constant. Then $y' = re^{rx}$ and $y'' = r^2e^{rx}$.
Adding two solutions works here because the right-hand side is $0$ and each term is multiplied by constants. It does not work for every differential equation, so you should always substitute and check.
(a) Find all values of the constant $r$ for which $y = e^{rx}$ is a solution to $y'' - y' - 6y = 0$. (b) Jayden claims that $y = e^{3x} + e^{-2x}$ is also a solution. Is…
(a) Find all values of the constant $r$ for which $y = e^{rx}$ is a solution to $y'' - y' - 6y = 0$.
(b) Jayden claims that $y = e^{3x} + e^{-2x}$ is also a solution. Is he correct? Justify your answer.
(c) Is $y = e^{3x} + 1$ a solution? Justify your answer.
Summary
-
A differential equation relates a function to its derivatives. A solution is a function that makes it true on an interval. The general solution has a constant $C$, and an initial condition picks the particular solution.
-
To model, name the quantity and time, then translate: "rate of change" becomes $\dfrac{dy}{dt}$ and "proportional to" becomes "$= k \cdot$". Use rate in − rate out for flow problems. Pay attention to the sign of $k$.
-
To verify a solution: differentiate, substitute into both sides, simplify, and check the initial condition and the interval.
-
The units of $\dfrac{dy}{dt}$ are units of $y$ per unit of $t$. Plug a value of $y$ into the equation to get the rate at that moment, and use data to find $k$.
-
Constant solutions come from setting the right-hand side to $0$. The sign of the right-hand side tells you whether $y$ is increasing or decreasing. A formula may be a valid model only on part of its domain.
-
Back to the start: a balance growing at 5% of itself per year satisfies $B' = 0.05B$, and $B(t) = B_0e^{0.05t}$ is the solution.
Can't find your problem here?
The AI checks one of your exercises: paste the problem with your answer or take a photo of it.