M5.5.7 Chapter 7
Differential equations
How do I find a formula when I know only how fast something changes?
Your guess
Pick one before you read on. It is fine to be wrong.
By the end you can
- Solve dy/dx = ky by separating the variables
- Model cooling or growth with a differential equation
A population of bacteria grows faster when there are more of them. A cup of tea cools faster when it is much hotter than the room. In each case we know a rule about the rate of change, not the formula. A rule like this is a differential equation: an equation with a derivative in it. To solve it is to find the formula that obeys the rule.
Take the simplest rule: the rate of change of y is proportional to y. We write dy/dx = ky, where k is a constant. The picture shows what that means. At each point the gradient is k times the height of the curve, so the curve is steep where it is high, and flat where it is low.
To solve dy/dx = ky, use separation of variables. Put everything with y on one side, and everything with x on the other. Here that means (1/y) dy = k dx. Then integrate both sides. Each side now has its own variable, so we can integrate with what we know.
Now solve for y. We have ln|y| = kx + c. Take e to the power of each side: |y| = e^(kx + c) = e^c × e^(kx). The number e^c is another constant, so we call it A. The solution is y = A e^(kx). The A stands for the value of y at x = 0, because e⁰ = 1.
There is a different curve for each A. A rule on its own gives a family of solutions. To pick one, we need one known pair of values, such as the starting value of y. This is the initial condition. We put it into the solution and find A.
Worked example
Solve dy/dx = 3y, given that y = 5 when x = 0. Then find y when x = 1, to 3 significant figures.
- Separate the variables: (1/y) dy = 3 dx.
- Integrate both sides: ln|y| = 3x + c.
- Take e to the power of each side: y = A e³ˣ.
- Use the starting value. When x = 0, y = 5. Then 5 = A e⁰ = A, so A = 5.
- The solution is y = 5e³ˣ.
- When x = 1, y = 5e³. To 3 significant figures this is 100.
Answer: y = 5e³ˣ, and y = 100 when x = 1.
Separation of variables works for any rule that can be split into a y part and an x part. For dy/dx = 2xy, we separate to get (1/y) dy = 2x dx. Integrating gives ln|y| = x² + c, so y = A e^(x²).
Worked example
Solve dy/dx = 2xy, given that y = 1 when x = 0. Find y when x = 2, to 3 significant figures.
- Separate: (1/y) dy = 2x dx.
- Integrate: ln|y| = x² + c.
- So y = A e^(x²).
- When x = 0, y = 1. Then 1 = A e⁰ = A, so A = 1.
- The solution is y = e^(x²).
- When x = 2: y = e⁴ = 54.6, to 3 significant figures.
Answer: 54.6
Now to a model. A population grows in proportion to its size, so dN/dt = kN, and N = N₀ e^(kt), where N₀ is the starting size. The number k is the growth rate. We find k from one more reading.
Worked example
A culture of bacteria has 200 cells at time 0, and 800 cells after 3 hours. Assume the growth rate is proportional to the number of cells. Find the number of cells after 5 hours, to 3 significant figures.
- The model is dN/dt = kN, so N = 200e^(kt).
- At t = 3, N = 800. So 800 = 200e^(3k), and e^(3k) = 4.
- Take natural logarithms: 3k = ln 4, so k = ln 4 ÷ 3 = 0.4621 per hour.
- At t = 5: N = 200e^(5k) = 200 × e^(2.3105) = 2015.9.
- After 5 hours there are about 2020 cells, to 3 significant figures.
Answer: 2020
Now cooling. A hot cup loses heat to the room. Newton found that the rate of cooling is about proportional to how much hotter the cup is than the room. The model is dT/dt = −k(T − R), where T is the temperature of the cup, R is the temperature of the room, and k is a positive constant. The minus sign makes T fall when T is above R.
The model assumes the room stays at one temperature and that the cup loses heat in proportion to the difference. It is good for ordinary cups, and not for boiling water in a very cold room. Put θ = T − R, the excess over the room. Then dθ/dt = −kθ, which is the equation we have solved, with k replaced by −k. So θ = θ₀ e^(−kt), and T = R + θ₀ e^(−kt).
Worked example
A cup of tea starts at 90 °C in a room at 20 °C. After 10 minutes it is 60 °C. Find its temperature after 25 minutes, to 3 significant figures.
- Let θ = T − 20 be the excess over the room. At the start, θ = 90 − 20 = 70. So θ = 70e^(−kt).
- After 10 minutes, θ = 60 − 20 = 40. So 40 = 70e^(−10k), and e^(−10k) = 4/7.
- Take natural logarithms: −10k = ln(4/7), so k = ln(7/4) ÷ 10 = 0.056 per minute.
- After 25 minutes, θ = 70e^(−25k) = 17.28.
- The temperature is T = 20 + 17.28 = 37.28 °C, which is 37.3 °C to 3 significant figures.
Answer: 37.3 °C
See it three ways
With things
A cup of hot water, a clock and a thermometer show it: the temperature falls fast in the first minutes and slowly later. The gap to room temperature shrinks by the same fraction every few minutes.
As a picture
In words
A rate proportional to the amount means exponential growth or decay. Separate, integrate, then use a known value to find the constant.
In symbols
dy/dx = ky gives y = A e^(kx).
Try it
Watch the gap to room temperature shrink
You need: a cup of hot tap water, a thermometer, a clock.
Be safe: Use hot tap water, not boiling water, and keep the cup where it cannot be knocked over.
- Pour hot tap water into a cup. Do not use boiling water. Note the room temperature.
- Read the temperature of the water every 5 minutes for 20 minutes, and write the readings in a table.
- For each reading, subtract the room temperature to get the gap, which is T − 20 when the room is at 20 °C.
- Divide each gap by the one before it.
What you will see: The ratios are nearly the same each time. The table shows model readings for water at 55 °C in a room at 20 °C, with gaps 35, 26.5, 20, 15.1, 11.4 °C. Each gap is 0.756 times the one before. A constant ratio is the sign of exponential decay.
A wrong idea many people have
To solve dy/dx = ky, integrate both sides with respect to x. That gives y = kxy.
Why it feels right: Integrating both sides is the usual way to undo a derivative.
The test that breaks it: Differentiate y = kxy with respect to x. The product rule gives y + x(dy/dx) multiplied by k, which is not ky. The right side has y in it, and we cannot treat y as a constant.
What is true: First separate the variables, so that y and dy are on one side, and x and dx are on the other. Then integrate each side with its own variable.
A wrong idea many people have
After integrating, y = e^(kx) + c.
Why it feels right: Integrating always adds a + c, so it seems natural to put it at the end.
The test that breaks it: Take ln|y| = kx + c and raise e to both sides. The result is y = e^(kx + c) = e^c × e^(kx). The c is in the power, so it becomes a multiplier.
What is true: The constant becomes a factor: y = A e^(kx). A is the starting value, and we find it from the initial condition.
Key words
- differential equation
- an equation with a derivative in it. It describes a rate of change.
- separation of variables
- putting all the y terms on one side and all the x terms on the other, so each side can be integrated.
- initial condition
- a known value of y at a known x, used to find the constant in the solution.
Back to your guess
The answer is B: If the rate of growth is 3 times the size, the size follows e³ˣ, a curve that grows faster and faster.
When the growth rate is proportional to the size, bigger means faster, and faster growth makes it bigger still. The size is an exponential, such as A e³ˣ. A straight line, like 3x, has a constant rate. Growth by the same amount each hour is also a constant rate, not growth in proportion to the size.
Check yourself
Try each one before you look. A wrong answer tells you where to go next.
Which equation says that the rate of growth of a population N is proportional to N?
See the answer
dN/dt = kN
Proportional to N means the rate equals a constant times N. That is dN/dt = kN.
- If you chose A: This says the growth rate is a constant. It does not depend on N, so the growth is the same amount in each hour. Read this page again.
- If you chose B: This says the rate depends on time, not on the size of the population. Read this page again.
- If you chose D: This adds N to a constant. Proportional means the rate is a multiple of N: k times N. Read this page again.
What is the first step in solving dy/dx = ky by separating the variables?
See the answer
Put the y terms with dy on one side and the x terms with dx on the other.
Separating gives (1/y) dy = k dx. Each side then has one variable, and each can be integrated.
- If you chose A: The right side still has y in it, so the integral on the right is not yet something we can do. Read this page again.
- If you chose C: We are trying to find y from its derivative, so we integrate and do not differentiate. Read this page again.
dy/dx = 2y and y = 2 when x = 0. Find y when x = 1, to 3 significant figures.
See the answer
14.8
The solution is y = A e^(2x). Since y = 2 when x = 0, A = 2. So y = 2e^(2x), and at x = 1 it is 2e² = 14.8.
A culture has 500 cells at time 0 and 1500 cells after 4 hours, and N = 500e^(kt). Find k to 3 significant figures, in per hour.
See the answer
0.275
1500 = 500e^(4k), so e^(4k) = 3, and 4k = ln 3 = 1.099. Then k = 1.099 ÷ 4 = 0.275 per hour.
In the cooling model dT/dt = −k(T − 20), why is the rate proportional to T − 20 and not to T?
See the answer
The rate of cooling depends on how much hotter the tea is than the room, 20 °C.
Heat flows because of a difference in temperature. When the tea reaches 20 °C the difference is 0, and the cooling stops.
- If you chose B: The tea cannot go below the room temperature, so it levels off near 20 °C, not 0 °C. Read this page again.
- If you chose C: The number k is the cooling constant. The 20 is the room temperature. Read this page again.
A cup of tea starts at 80 °C in a room at 18 °C, and is 50 °C after 8 minutes. What is its temperature after 20 minutes, to 3 significant figures?
See the answer
29.9
θ = 62e^(−kt), and 32 = 62e^(−8k) gives k = ln(62/32) ÷ 8 = 0.08267. At 20 minutes, θ = 62e^(−1.653) = 11.87. So T = 18 + 11.87 = 29.9 °C.
A solution of a differential equation has a constant A. How do we find its value?
See the answer
Use a known value of y at a known x, called an initial condition.
The equation gives a family of curves. One known point picks the curve out by fixing A.
- If you chose B: A second integral would add another constant, and not remove this one. Read this page again.
- If you chose C: The constant depends on the starting value. For y = 5 at x = 0, A is 5. Read this page again.
From an earlier chapter
What is ∫ 1/y dy? This is from chapter 4.
Solve dy/dx = 2xy with y = 1 when x = 0. Find y when x = 1, to 3 significant figures.
See the answer
2.72
Separate: (1/y) dy = 2x dx. Then ln|y| = x² + c, so y = A e^(x²). With y = 1 at x = 0, A = 1. At x = 1, y = e¹ = 2.72.
A quantity obeys dy/dx = −2y, and starts at a positive value. What happens as x gets large?
See the answer
y falls towards 0 and stays positive.
The solution is y = A e^(−2x) with A above 0. As x grows, e^(−2x) shrinks towards 0 but is never 0 or negative. At x = 3 it is e^(−6) = 0.0025, which is under 1% of A.
- If you chose B: The solution is y = A e^(−2x), and an exponential with a positive A is always positive. Read this page again.
- If you chose C: The rate is negative when y is positive, so y falls, and does not grow. Read this page again.
Keep it
Copy this into your exercise book.
dy/dx = ky. Separate: (1/y) dy = k dx. Integrate: ln|y| = kx + c. So y = A e^(kx), and a starting value gives A. Cooling: T = R + (T₀ − R)e^(−kt).
Draw: A curve falling from the starting temperature towards a dashed level line for the room temperature.