Learn
Lesson · Separable Equations, Growth and Decay · Exponential change

Newton's Law of Cooling

Newton's law says y′ = −k·(y − A): the object changes at a rate proportional to how far it is from the surrounding temperature A. Substituting u = y − A turns it into the pure decay u′ = −k·u, so the gap shrinks geometrically in Euler's method and exponentially in the solution, and the temperature settles at A. The rate is large while the gap is large and small near the end, which is not a constant rate of cooling.

y′ = −k·(y − A), k > 0 u = y − A ⟹ u′ = −k·u y = A + (y₀ − A)·e^(−kt) Euler: the gap is multiplied by 1 − kh coffee: y₄ = 725/16; true ≈ 49.4304
Cooling is decay of the gap

Core ideas

What this lesson establishes

Three ideas: what the rate is proportional to, the substitution that reduces the equation to one already solved, and where the temperature ends up.

1

The rate follows the gap

The object changes fastest when it is far from the surroundings and slowly when it is near them. The equation y′ = −k·(y − A) has a negative rate while y > A and a positive one while y < A, so it covers cooling and warming alike.

2

One substitution gives decay

Put u = y − A. Since A is a constant, u′ = y′, and the equation becomes u′ = −k·u: the decay of the previous lesson, for the gap. So u = u₀·e^(−kt) and y = A + (y₀ − A)·e^(−kt).

3

The temperature approaches A and does not reach it

The gap u₀·e^(−kt) is never zero. The value A is an equilibrium: start there and y′ = 0. Start anywhere else and the temperature moves towards A forever and arrives at no time.

The material

A cup of coffee, step by step

The law, the substitution, the coffee's first four steps in exact fractions beside the closed form, and a cold cup warming by the same equation.

A cup of coffee at 100 degrees stands in a room at 20 degrees. Newton's observation was that it loses heat at a rate proportional to how much hotter it is than the room. Write y for its temperature and take the constant of proportionality to be k = 1/4 per minute.

Definition · Newton's law of cooling

A body at temperature y in surroundings at the constant temperature A obeys y′ = −k·(y − A) for a constant k > 0.

It assumes the surroundings stay at A and the body has one temperature throughout. The lab computes what follows from those assumptions; it does not check them for a real cup.

y′ = −(1/4)·(y − 20), y(0) = 100 u = y − 20 u(0) = 80 u′ = y′ = −(1/4)·u u = 80·e^(−t/4) y = 20 + 80·e^(−t/4)

The check is by differentiating: the rate of 20 + 80·e^(−t/4) is −20·e^(−t/4), and −(1/4)·(y − 20) = −(1/4)·80·e^(−t/4), the same. The temperature at time t is a rounded number, since e^(−t/4) is irrational for t ≠ 0, which is why a check by differentiating is the right check and an evaluation is not.

The rate is not constant

Run Euler's method with a step of one minute. The first step uses the starting rate −(1/4)·(100 − 20) = −20, so y₁ = 80. The gap is now 60 and the rate −15, so y₂ = 65. Then the gap is 45 and the rate is −45/4, so y₃ = 215/4. The rate changes at every step because the gap does.

step n gap yₙ − 20 rate −(1/4)·(yₙ − 20) 0 80 −20 1 60 −15 2 45 −45/4 3 135/4 −135/16 each gap is the one before times 3/4 = 1 − kh

The gap is multiplied by 1 − kh = 1 − 1/4 = 3/4 at every step (the lab's factor tile, which takes the signed rate −1/4, writes the same number as 1 + kh), so yₙ = 20 + 80·(3/4)ⁿ. At n = 4 that is 20 + 80·81/256 = 725/16, which is 45.3125, and the lab prints it exactly. The closed form at t = 4 is 20 + 80·e^(−1), which the lab prints rounded: ≈ 49.4304. The two differ because a step of one minute assumes the rate stays put for the whole minute, while the true rate keeps falling. The lab's error tile prints the gap as ≈ 4.11786, rounded, and it is the method's error at this step size and no other.

The same equation warms a cold cup

A cup at 5 degrees in a room at 20 has a gap of 5 − 20 = −15, a negative gap, and the rate −k·(−15) is positive. Nothing else changes. With k = 1/2 and a step of 1 the factor is 1/2, so the gap is cut in half at every step: −15, −15/2, −15/4, …. The temperatures 5, 25/2, 65/4, 145/8, 305/16, … climb towards 20 and none of them passes it; the lab's closed form at the fourth step is ≈ 17.97, rounded. The third preset is a drink at 25 degrees in a fridge at 4: the gap is 21, the factor is 9/10, and the steady-state tile reads 4.

Example · How long until the gap halves

The gap follows u₀·e^(−kt), so it halves in ln 2/k, the half-life of the previous lesson. For k = 1/4 that is 4·ln 2 ≈ 2.77259 minutes, and then the coffee is at 20 + 40 = 60 degrees. With the target set to 60, the lab prints the first step of the exact sequence at or below 60: step 3 (t = 3), where the sequence is at 215/4 = 53.75, having been at 65 one step earlier.

Interactive

Growth and decay

A geometric sequence beside an exponential

Growth and decayy′ = k·(y − A)
Euler steps (exact)closed form, rounded

Method

Solving a cooling problem

Five moves, and the substitution in the second is the one that reduces a new equation to an old one.

1

Name the surroundings and the rate

Read A and k off the equation y′ = −k·(y − A). The lab takes the signed coefficient, −k.

2

Substitute the gap

u = y − A gives u′ = −k·u with u₀ = y₀ − A. The sign of u₀ says whether the object cools (positive) or warms (negative).

3

Solve the decay

u = u₀·e^(−kt), so y = A + (y₀ − A)·e^(−kt). Check it by differentiating.

4

Run Euler on the gap

The factor 1 − kh multiplies the gap each step, so yₙ = A + (y₀ − A)·(1 − kh)ⁿ, an exact fraction.

5

State both numbers with their tier

The Euler value is exact, the closed form is rounded and marked ≈, and the step size goes beside the pair.

Rate, gap and steady state

Score 0 / 0

The coffee, four steps of one minute

The equation is y′ = −(1/4)·(y − 20) with y(0) = 100 and h = 1. Everything is exact until the closed-form line.

factor 1 − kh = 1 − 1/4 = 3/4 (on the gap) gap u₀ = 100 − 20 = 80 yₙ = 20 + 80·(3/4)ⁿ y₁ = 20 + 60 = 80 y₂ = 20 + 45 = 65 y₃ = 20 + 135/4 = 215/4 y₄ = 20 + 80·81/256 = 725/16 = 45.3125 closed form 20 + 80·e^(−1) ≈ 49.4304 (rounded)

Euler is below the curve here, by the amount the lab's error tile prints. The reason is the one in the table above: each step took the rate at the start of the minute, and the real rate falls during it, so the real coffee had cooled less than the sequence says.

The steady state is 20. In the closed form the term 80·e^(−t/4) goes to zero without reaching it, and in the exact sequence 80·(3/4)ⁿ is positive for every n.

Common mistakes

1
Believing a hot object cools at a constant rateThe mistaken model is that the coffee loses the same number of degrees every minute. The equation says the loss is proportional to the gap, and the gap shrinks: the rates in the table are −20, −15, −45/4, −135/16, each three quarters of the one before. A constant rate of 20 per minute would have the coffee at 20 degrees after four minutes and below it after that, which Newton's law forbids.
2
Applying the decay factor to the temperature instead of the gapWriting yₙ = 100·(3/4)ⁿ treats the temperature as the decaying quantity. It heads for 0, not for 20: at n = 4 it gives 2025/64, about 31.6, which is under the lab's 725/16, and it keeps falling past the room temperature. Only the gap y − 20 decays; the temperature is that decaying gap added to the steady level.
3
Treating warming as a separate lawA cold cup in a warm room needs no new equation. The gap y − A is negative, the rate −k·(y − A) is positive, and the same formula A + (y₀ − A)·e^(−kt) gives a rising curve. The lab's second preset is the same code with a start below A.

Check your understanding

✓
Finish when you can write Newton's law, reduce it to decay by a substitution, and quote its Euler and closed-form values with their tiers.

You should be able to read the surroundings and the rate off the equation, substitute u = y − A, write yₙ as A plus a power of the factor, name the steady state, and explain why the rate is not constant.

Note: The cup of coffee exchanges heat with the room; a tank exchanges salt with a stream. “Mixing Problems” sets up the same shifted equation from a balance of what comes in and what goes out.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.