# Newton's Law of Cooling Differential Equation

I know and understand how to solve Newton's Law of Cooling, but came across a book that did the following and is slightly confusing me. It states the following:

Newton's Law of Cooling: $\frac{dT}{dt} = k(T_{\infty} -T)$, where it calls $T_{\infty} =$ surrounding temperature.

It says the solution approaches $T_{\infty}$. Include that constant on the left side to make the solution clear: $\frac{d(T - T_{\infty})}{dt} = k(T_{\infty} - T)$. The solution ends up being $T - T_{\infty} = e^{-kt}(T - T_0)$.

What allows us (or how to derive) just to replace $\frac{dT}{dt}$ with $\frac{d(T - T_{\infty})}{dt}$?

What allows it is the assumption that $T_{\infty}$ is constant.
To explain what they did in detail: let's introduce a new function of $t$: $$F(t) = T_{\infty} - T(t).$$ This gives $T' = -F'$ (the $'$ denotes differentiation w.r.t. $t$), and so Newton's equation can now be written in terms of $F$: $$-F' = T' = k (T_{\infty} - T) = k F.$$ Consequently, $$-F' = k F.$$