Finding the formula for T from Newton's Law of Cooling
I think I got a wrong answer because I skipped a particular step which seemed optional. I'm still not too sure what happened though and would appreciate your help...
Background:
Newton’s law of cooling says that the rate of change of temperature is proportional to the temperature difference. In symbols, if a body is at a temperature $T$ at time $t$ and the surrounding region is at a constant temperature $T_e$ ($e$ for external), then the rate of change of $T$ is given by$$dT/dt=k(T_e −T)$$.
The constant $k > 0$ is a constant of proportionality that depends properties of the
body like specific heat and surface area.
Problem:
Find the formula for $T$ if the initial temperature at time $t = 0$ is $T_0$.
My Working:
$\frac{dT}{dt} = k(T_e-T)$
$\int\frac{1}{(T_e-T)}dT = \int k dt$
$ln|T_e-T| = kt + c$
$|T_e-T| = e^{kt+c} $
$T_e-T = \pm e^{kt+c}$
$T=T_e-(\pm e^{kt}\cdot e^c) = T_e - (\pm e^c \cdot e^{kt})$
When $t=0$ , $T=T_0$. Hence,
$ln|T_e-T_0| = c$
$T_e - T_0 = \pm e^c$
Thus,
$T = T_e - ((T_e - T_0)\cdot e^{kt}) = T_e + (T_0 - T_e)e^{kt}$ (correct answer should be $T_e + (T_0 - T_e)e^{-kt}$)
Working from Answer Key:
Separate variables and integrate.
$(T −T_e)^{−1}dT =−kdt \Rightarrow ln|T −Te|=−kt+c$
$T − T_e = \pm e^ce^{−kt} = Ae^{−kt}$
The initial condition $T(0) = T_0$ implies $A = T_0 − T_e$ . Thus
$T =T_e +(T_0 −T_e)e^{−kt}$
My Comment:
It seems to me that I did not get the right answer just because I did not remove $-1$ from $(T_e-T)$ to change $k(T_e-T)$ into $-k(T-T_e)$ right at the start. But shouldn't this step be an optional step? Why, then, am I unable to get the correct answer just because I omited this step? I suspect there's something I've missed but I just can't find out what's wrong with my working!
Please help me and thank you in advance!
(Note: This problem is from MIT OCW's Single Variable Calculus (18.01) course.)
$\endgroup$1 Answer
$\begingroup$The issue is in the integral $$\int \frac{1}{T_e - T} \, \mathrm{d}T$$ In order to integrate this, we need the integrand in the form $\frac{f'(x)}{f(x)}$, where here $f'(x) = -1$, which means we need an extra minus sign on the numerator. That is, $$\int \frac{1}{T_e - T} \, \mathrm{d}T = -\int \frac{-1}{T_e - T} \, \mathrm{d}T = - \ln|T_e -T| $$ which recovers the missing minus sign.
$\endgroup$