# But does it work in theory?

In my previous post, I told you that adding milk to your coffee quicker will make it stay warm longer. To verify this, I did a little bit of experimenting and it was easy to tell which was warmer. Today, we take the mathematician/theorist’s approach. Because we *totally* didn’t procrastinate in the office today doing the calculation…

The equation we’ll use to describe our cooling coffee cup is Newton’s law of cooling; it says that the coffee will cool at a rate proportional to the temperature difference between itself and the room.

Which probably means very little to half of the people reading this, but let’s push on! The left hand side of the equation is the rate of change of temperature – like how many degrees does it cool by in a minute – and the right hand side is just the difference between the coffee temperature and the room temperature, multiplied by some constant to account for different things cooling at different rates. The is the temperature, is the fixed room temperature and is the time that the coffee has been sitting for. But since you may not know how to solve ODEs, the solution – spoiler alert – is given by

,

where is the starting temperature of the coffee. is the exponential function and will decrease “exponentially” – yes, that’s actually what that word means – as time goes on. And we’d expect that, right?

Now let’s plug some numbers in to make it easier to follow. Say the room is 25 degrees and the coffee starts at 100 degrees, Celsius. The constant, , depends on various things and generally has to be measured, however the value of the constant won’t affect which cools faster; we’ll take it to be 0.15 here, when time is measured in minutes.

,

So let’s say we want to drink the coffee in 15 minutes, at which point coffee will have reached . Now we add milk. If we like our coffee to be 20% milk and we add it now at 5 degrees, then milk and coffee average out their temperatures to reach thermal equilibrium, giving a new temperature

.

Now we’ll figure out what the temperature would be after 15 minutes if we had added the milk first. So the coffee and milk reach thermal equilibrium first, and then we say the milked coffee cools by Newton’s law of cooling. So immediately after adding the milk we have

So we’ve got to plug this starting temperature into Newton’s law of cooling and then set again,

.

Now we simple check which is larger!

Moving on…

So with our particular value of , which is quite large, the coffee would be unpleasantly cool after 15 minutes in both cases. Although as expected, adding the milk earlier left the coffee warmer.

There are some interesting things about this calculation though. Firstly, it turns out that the temperature should be much the same in either case; 4 degrees isn’t overly noticeable. Regardless of the value of or how long we let the coffees sit for, this coffee scenario will have a maximum difference of 4 degrees between the two options. So it probably doesn’t make much of a difference unless you use a whole lot of milk. If the milk is warmer than room temperature then it’s best to add it later, and if it’s sitting at room temperature then it doesn’t matter either way.

Now if you happen upon a dead body, you can use Newton’s law of cooling to estimate the time of death. Or if you’re the cause of the dead body, you can use Newton’s law of cooling to figure out what to set thermostat in order to make the murder appear to have occurred while you were in a crowded place with lots of witnesses.

And some people say math has no use in the real world… Pfft.

Side remark: Newton’s law of cooling is linear, if you measure the temperature from the fixed ambient temperature. The effect predicted by the law then is that “by adding the fridge-cold milk to your mug earlier, you give the milk more time to warm up (toward room temperature).” If Santa Claus prefers to take his pre-present-delivery coffee outside, then there’s a good chance that adding milk later would be better for him.

I hadn’t thought about it like that (the milk simply warming up to room temperature). If you take the milk out of the fridge as soon as the coffee is poured then the best time to add it may depend on how full the carton is. It’ll be better to add it sooner if you have a whole carton of milk, but if the carton is nearly empty and only just has enough to make your coffee, then it may be better to add it later.

Also the Santa thing reminds me of the old riddle: A man walks 1km south, 1km east then 1km north to find himself back at home where he spots a bear. What colour is the bear?

(I like telling it when talking about intrinsic vs. extrinsic curvature – a triangle with angles summing to 270 degrees)