Unit 7 · Topic 7.1 Beta

Writing Differential Equations

4 min read · freeNot practiced

So far you have been handed a function and asked for its derivative. Many real questions run the other way. A biologist cannot write down the size of a bacteria culture for every hour, but she can say how fast it grows: the bigger the culture, the faster it grows. A cook cannot predict the temperature of soup minute by minute, but he knows hot soup cools faster than warm soup. Each of these is a statement about a rate. Written with a derivative, it becomes a differential equation. This page is about writing and reading them; later topics solve them.

What a differential equation is

A differential equation is an equation that contains the derivative of an unknown function. Here are three:

dPdt=0.26PdTdt=−0.05(T−20)dydx=x+y\frac{dP}{dt} = 0.26P \qquad \frac{dT}{dt} = -0.05(T - 20) \qquad \frac{dy}{dx} = x + y

Read the first one aloud: "the rate of change of PP with respect to tt equals 0.26 times PP." It does not tell you what PP is at any time. It tells you how fast PP changes once you know PP. If P=500P = 500 cells, then PP is growing at 0.26⋅500=1300.26 \cdot 500 = 130 cells per hour. If P=800P = 800, it is growing at 208 cells per hour.

That is the big shift. An ordinary equation such as y=x2y = x^2 gives values. A differential equation gives rates, and the rate usually depends on the current value.

Translating "proportional to"

Most word problems use one phrase: proportional to. "AA is proportional to BB" means A=kBA = kB for some constant kk, called the constant of proportionality. When AA is a rate, it goes on the left as a derivative.

WordsDifferential equation
The rate of change of yy is proportional to yy.dydt=ky\frac{dy}{dt} = ky
The rate of change of yy is proportional to the square root of yy.dydt=ky\frac{dy}{dt} = k\sqrt{y}
The rate of change of yy is inversely proportional to y2y^2.dydt=ky2\frac{dy}{dt} = \frac{k}{y^2}
The temperature changes at a rate proportional to the difference between TT and 20.dTdt=k(T−20)\frac{dT}{dt} = k(T - 20)
The rate of change of yy with respect to xx is proportional to the product of xx and yy.dydx=kxy\frac{dy}{dx} = kxy

Two checks catch most mistakes. First, the sentence talks about a rate, so a derivative must appear. "Grows proportionally to its size" is dPdt=kP\frac{dP}{dt} = kP, never P=ktP = kt. Second, look at the variable after "proportional to". If it says the population, the right side uses PP, not tt.

The sign of the rate

Words like "decreases" or "decays" fix a sign. "The amount of medicine decreases at a rate proportional to the amount present" is dAdt=−kA\frac{dA}{dt} = -kA with k>0k > 0. You could also write dAdt=kA\frac{dA}{dt} = kA and say k<0k < 0; both are correct if you state the sign.

The sign of the right side tells you where the function rises or falls, before you know any formula. For dydt=0.4(50−y)\frac{dy}{dt} = 0.4(50 - y), the rate is positive when y<50y < 50 and negative when y>50y > 50. So yy climbs toward 50 from below and falls toward 50 from above. That is a lot of information from one line.

Finding the constant

Worked example. Coffee at 90 °C sits in a 20 °C room. It cools at a rate proportional to the difference between its temperature and the room's. At 90 °C it is cooling at 3.5 °C per minute. Write the differential equation, then find the rate when the coffee is at 55 °C.

Name the quantity: TT, the temperature in °C, at time tt in minutes. "Proportional to the difference" gives dTdt=k(T−20)\frac{dT}{dt} = k(T - 20).

Use the known rate. Cooling means dTdt=−3.5\frac{dT}{dt} = -3.5 when T=90T = 90: −3.5=k(90−20)=70k-3.5 = k(90 - 20) = 70k, so k=−0.05k = -0.05 per minute.

Now predict: at T=55T = 55, dTdt\frac{dT}{dt}=−0.05(55−20)= -0.05(55 - 20)=−1.75= -1.75 °C per minute. The coffee still cools, at half the speed, because it is half as far above room temperature.

The graph of T = 20 + 70e^(−0.05t) for t from 0 to 60 minutes falls from 90 °C toward the dashed room-temperature line at 20 °C. Tangent segments at T = 90, 55 and 30 have slopes −3.5, −1.75 and −0.5 °C per minute, each equal to −0.05 times (T − 20).
Figure 1. The temperature of the coffee in the worked example. Each tangent segment has slope −0.05(T−20)-0.05(T - 20), so the graph flattens as TT nears 20 °C. LevlPrep original diagram.

Notice the units of kk. The left side is in °C per minute and T−20T - 20 is in °C, so kk is in "per minute". In dPdt=0.26P\frac{dP}{dt} = 0.26P with tt in hours, k=0.26k = 0.26 per hour.

Reading a model from data

A table can tell you which model fits. If a table lists PP and dPdt\frac{dP}{dt} and the ratio dP/dtP\frac{dP/dt}{P} is the same in every column, the rate is proportional to PP, and that ratio is kk. If the rate were the same in every column, the model would be dPdt=c\frac{dP}{dt} = c, a constant rate, and the graph would be a line.

Common slips

  • Writing the quantity instead of its rate: P=kPP = kP or P=ktP = kt for "grows at a rate proportional to its size".
  • Using TT instead of T−20T - 20 in a cooling problem: the coffee cools toward room temperature, not toward 0 °C.
  • Losing the sign: "decreases" needs a negative rate.
  • Mixing up "proportional" (kyky) and "inversely proportional" (ky\frac{k}{y}).

Spot a mistake on this page?