Newton's law of cooling problem Differential Equation Suppose that a building loses heat in accordance with Newton's law of cooling which states that the rate of change of temperature within the building is proportional to the difference between the inside temperature and the outside temperature. Assume the inside temperature $u$ is $70^{\circ} \text{F}$ when the heating system fails. After $2$ hours the building is $40^{\circ}\text{F}$. If the external temperature is $10^{\circ}\text{F}$, compute the interior temperature $u(t)$ as function of time after heating failure. 
From what I know that the law is like this:
$$\frac{\Bbb dT}{T}-R=k \space \Bbb dt$$
Anti-differentiate both sides to get $\ln(T-R)=kt+c$
Then solve for T but I'm not sure how to do that.
 A: I shall use $u$ for the temperature as indicated in the problem. Formulating the statement, we have $$\frac{{du}}{{dt}} =  - h(u - {u_{{\rm{external}}}})$$ which could easily be solved (first order ODE) to yield $$u(t) = {u_{{\rm{external}}}} + A{e^{ - ht}}$$ where $A$ is a constant. To obtain this constant ($A$) and also the conduction constant ($h$), note that (we have chosen the unit of time to be hour) $${u_{{\rm{external}}}} = 10,u(0) = 70,u(2) = 40$$ so that $$\begin{array}{l}70 = 10 + A\\40 = 10 + A{e^{ - 2h}}\end{array}$$ which would yield $$A = 60,h = \frac{{\ln 2}}{2}$$ Summarizing, the answer could be stated as $$u(t) = 10 + 60{e^{ - \frac{{\ln 2}}{2}t}}$$ Below I have plotted the variation of the inside temperature with time from the moment of heating failure to 20 hours later 
A: To solve for $T$, exponentiate ($e^{\ln|T-R|} = e^{kt+c}$) both sides of the equation, then solve for $T$. Once you do this, use the condition "After 2 hours, the building is $40^\circ$F." to come up with the explicit formula for $T$.
A: I will use $T$ instead of $u$ for the temperature
This is the classic problem where we know
the exterior temperature: $T_e$
the initial temperature: $T_0=T(0)$
Newton's cooling law:
$\dot T=k(T_e-T)$ has this solution
$T(t)=T_e+(T_0-T_e)e^{-kt}$
In this case:
$T(t)=10+(70-10)e^{-kt}$
$T(t)=10+60e^{-kt}$
After $2$ hours:
$40=10+60e^{-k(2)}$, and we find
$k=ln(2)/2$, and we write
$T(t)=10+60e^{-\frac{ln(2)}{2}t}$
