- A differential equation is separable when it can be written as \( \dfrac{dy}{dx} = f(x)\,g(y) \): a function of \( x \) times a function of \( y \).
- To solve it, put every \( y \) on one side and every \( x \) on the other, integrate both sides, and add one constant \( C \).
- An initial condition, such as the temperature at \( t = 0 \), fixes \( C \) and turns the general solution into a particular one.
- Newton’s law of cooling, \( \dfrac{dT}{dt} = -k(T-T_s) \), is separable. Its solution \( T = T_s + (T_0-T_s)e^{-kt} \) answers questions about coffee, cooking and even time of death.
- Exam point: write the constant as soon as you integrate, before you exponentiate, or the method mark goes.
The case: how long does a takeaway coffee stay hot?
A café wants to print a line on its cups: “Best enjoyed within ___ minutes.” The barista measures one coffee (the numbers here are illustrative). It leaves the machine at 90 °C into a room at 20 °C. Five minutes later, in an open cup, it reads 75 °C. The café decides a drink below 60 °C no longer counts as hot.
The question: how many minutes after pouring does the coffee drop to 60 °C? A straight-line guess says it lost 15 °C in 5 minutes, so it should lose another 15 °C in the next 5 and hit 60 °C at 10 minutes. But a hot drink does not cool at a steady rate. It cools quickly at first and then more slowly, so we need a model that captures how the rate depends on the temperature itself.
The concept: when the rate depends on the amount
Isaac Newton suggested a simple rule for cooling: an object loses heat at a rate proportional to how much hotter it is than its surroundings. A 90 °C coffee in a 20 °C room is 70 degrees above the room, so it cools fast. At 30 °C it is only 10 degrees above, so it cools slowly. As it approaches room temperature the cooling almost stops.
A rule like that is a differential equation: an equation for a rate of change, \( \dfrac{dT}{dt} \), written in terms of the quantity \( T \) itself. Solving it means finding the function \( T(t) \) whose rate of change obeys the rule at every moment.
Many useful differential equations have a special structure. The right-hand side splits into a part that depends only on \( x \) (or \( t \)) and a part that depends only on \( y \) (or \( T \)). Then we can pull the two variables apart, one to each side, and integrate each side separately[1].
The formula
For any separable equation \( \dfrac{dy}{dx} = f(x)\,g(y) \) with \( g(y) \ne 0 \), the solution satisfies
Here \( f(x) \) is the part that depends only on \( x \), \( g(y) \) is the part that depends only on \( y \), and \( C \) is the single constant of integration. For cooling, the equation and its solution are
where \( T \) is the drink’s temperature (°C) at time \( t \) (minutes), \( T_s \) is the surrounding temperature, \( T_0 \) is the starting temperature and \( k > 0 \) is the cooling constant (per minute). The minus sign makes \( T \) fall whenever \( T > T_s \)[2].
Why this formula fits the case
The barista’s data show the coffee losing heat faster when it is hotter, which is exactly what \( \dfrac{dT}{dt} = -k(T-T_s) \) says. The right-hand side is \( (-k) \times (T-T_s) \): a constant (a trivial function of \( t \)) times a function of \( T \). So it is separable, and we can solve it with two simple integrals.
It is not the right tool when the variables cannot be pulled apart. An equation like \( \dfrac{dy}{dx} = x + y \) is not separable, because \( x + y \) is a sum, not a product; it needs a different method, such as an integrating factor or a numerical approach. Newton’s law itself is also only a model: it works well for a drink in still air at a steady room temperature, less well if the room temperature changes or the cup is stirred, insulated or reheated.
Setting it up
- Variables: \( t \) in minutes after pouring, \( T \) in °C.
- Surroundings: \( T_s = 20 \). Initial condition: \( T(0) = 90 \), so \( T_0-T_s = 70 \).
- Extra data: \( T(5) = 75 \). This is what pins down the unknown \( k \).
- Target: the time \( t \) at which \( T = 60 \).
- Domain: \( t \ge 0 \), and \( T > 20 \) throughout, so \( T-20 > 0 \) and we can drop the modulus signs after integrating.
Solving it
Solve \( \dfrac{dT}{dt} = -k(T-20) \) with \( T(0) = 90 \) and \( T(5) = 75 \), and find when the coffee reaches 60 °C.
The coffee stays above 60 °C for about 11.6 minutes, so the cup could honestly say “best enjoyed within 10 minutes”. Keep \( k \) unrounded in your calculator until the last step.
The same model is used, with care, in forensic science. This version is a classic exam question.
A body is found at 23:00 in a room kept at 18 °C. Its temperature is 30 °C. One hour later it is 28 °C. Assuming Newton’s law of cooling and a normal living temperature of 37 °C, estimate the time of death.
The model puts the time of death at about 20:30. The answer is negative because death happened before our clock started, which is a good sign the set-up is right. This is a textbook model; real forensic work uses more refined cooling curves, so treat the result as an estimate.
What the answer tells us
The straight-line guess said 10 minutes; the model says 11.6. The difference comes from the shape of the curve. The coffee’s initial cooling rate is \( k \times 70 \approx 3.4 \) °C per minute, but by the time it reaches 60 °C the gap to the room has shrunk to 40 degrees and the rate is down to about 1.9 °C per minute. Twenty minutes after pouring, the model gives \( 20 + 70\left(\tfrac{11}{14}\right)^4 \approx 46.7 \) °C: still warm, but well past hot.
Reasonableness checks. At \( t = 0 \) the formula gives 90 °C and at \( t = 5 \) it gives 75 °C, matching the data. As \( t \to \infty \), \( e^{-kt} \to 0 \) and \( T \to 20 \): the coffee approaches room temperature but, in the model, never goes below it. The units work too: \( k \) is per minute, so \( kt \) has no units, as an exponent must.
Sensitivity. Everything depends on \( k \). A lid that halves \( k \) doubles every time, because \( t = \ln(7/4)/k \): the coffee then stays above 60 °C for about 23.2 minutes. In the forensic example, if the person’s normal temperature was 36.5 °C instead of 37 °C, the estimate moves to about 2.37 hours before discovery, or around 20:38. A half-degree assumption shifts the answer by nine minutes.
For the full story, from slope fields to logistic growth and economic models such as constant-elasticity demand, see the Mathematics Made Simple textbook.
Practice questions
Separate, integrate, add \( C \), then use the condition. When you want more, the Mathematics Made Simple practice book has 1,565 questions with fully worked answers.
EasyQ1. Solve \( \dfrac{dy}{dx} = 6x^2y \), given that \( y = 5 \) when \( x = 0 \). Show worked answer
Integrate: \( \ln|y| = 2x^3 + C \).
So \( y = Ae^{2x^3} \). With \( y(0) = 5 \): \( A = 5 \).
\( y = 5e^{2x^3} \).
EasyQ2. A pie at 200 °C is taken out of the oven into a 25 °C kitchen and cools according to \( \dfrac{dT}{dt} = -0.1(T-25) \), with \( t \) in minutes. Find its temperature after 10 minutes. Show worked answer
At \( t = 10 \): \( T = 25 + 175e^{-1} \approx 25 + 64.38 = 89.4 \) °C.
MediumQ3. Solve \( \dfrac{dy}{dx} = xy^2 \), given \( y(0) = \tfrac{1}{2} \). Give \( y \) explicitly and state where the solution is valid. Show worked answer
Integrate: \( -\dfrac{1}{y} = \dfrac{x^2}{2} + C \).
At \( x = 0 \), \( y = \tfrac{1}{2} \): \( -2 = C \).
So \( \dfrac{1}{y} = 2-\dfrac{x^2}{2} = \dfrac{4-x^2}{2} \), giving \( y = \dfrac{2}{4-x^2} \).
The solution through \( (0, \tfrac{1}{2}) \) is valid for \( -2 < x < 2 \), where the denominator is not zero.
MediumQ4. A can of drink is taken from a fridge at 4 °C into a 30 °C room. After 10 minutes it is at 10 °C. Assuming Newton’s law, when does it reach 15 °C? Show worked answer
\( T(10) = 10 \): \( 26e^{-10k} = 20 \), so \( e^{-10k} = \tfrac{10}{13} \) and \( k = \tfrac{1}{10}\ln 1.3 \approx 0.02624 \).
\( T = 15 \): \( 26e^{-kt} = 15 \), so \( t = \dfrac{\ln(26/15)}{k} \approx \dfrac{0.5500}{0.02624} \approx 21.0 \) minutes.
ExamQ5. Water drains from a tank so that the depth \( h \) cm satisfies \( \dfrac{dh}{dt} = -0.5\sqrt{h} \), with \( t \) in minutes. Initially \( h = 100 \). (a) Solve the equation to show that \( h = (10-0.25t)^2 \). [4] (b) Find the time taken for the depth to fall to 50 cm. [2] (c) Find when the tank is empty, and explain why the formula is not valid after that. [2] Show worked answer
(b) \( \sqrt{50} = 10-0.25t \) [1], so \( t = \dfrac{10-\sqrt{50}}{0.25} \approx \dfrac{10-7.071}{0.25} \approx 11.7 \) minutes [1].
(c) \( h = 0 \) when \( 10-0.25t = 0 \), at \( t = 40 \) minutes [1]. For \( t > 40 \) the formula would give a rising depth, but an empty tank stays empty; the step \( \sqrt{h} = 10-0.25t \) needs \( 10-0.25t \ge 0 \) [1].
Frequently asked questions
How do I know if a differential equation is separable?
Try to write the right-hand side as (something in \( x \) only) times (something in \( y \) only). \( x^2y \), \( e^{x-y} = e^x e^{-y} \) and \( -k(T-20) \) all split this way. \( x + y \) and \( \sin(xy) \) do not.
Why is there only one constant of integration?
Integrating both sides does produce two constants, but they can be combined into one: \( C_2-C_1 \) is just another constant. Write a single \( C \) on the \( x \) side.
What does \( k \) mean in Newton’s law of cooling?
It measures how quickly the object exchanges heat with its surroundings, in units of “per unit time”. A larger \( k \) means faster cooling: a thin cup, a draught, a small volume. Its value is not given by theory; you find it from a measurement, as in Step 5 of the coffee example.
Can Newton’s law of cooling be used for warming?
Yes. If the object starts colder than its surroundings, \( T-T_s \) is negative, so \( \dfrac{dT}{dt} \) is positive and the temperature rises towards \( T_s \). Practice question 4 is an example.
References
- Strang, G. and Herman, E. (2016) Calculus Volume 2, Section 4.3 Separable Equations. Houston: OpenStax. https://openstax.org/details/books/calculus-volume-2
- Stewart, J., Clegg, D. and Watson, S. (2021) Calculus: Early Transcendentals, 9th edn, Chapter 9 Differential Equations. Boston: Cengage Learning.
- College Board. AP Calculus AB and AP Calculus BC Course and Exam Description. apcentral.collegeboard.org
- Cambridge International. Cambridge International AS & A Level Mathematics 9709: Syllabus for 2026 and 2027. cambridgeinternational.org
- International Baccalaureate Organization. Mathematics: analysis and approaches guide (first assessment 2021). ibo.org

