How to integrate Newton's law of cooling? I have been given the differential equation $T'(t)=k(T(t)-A)$, where $T$=temperature, $t$=time, $A$=the constant temperature of the surroundings and $k$ is constant.
How do I find $T(t)$ expressed with $T_o$ = temperature when $t=0$,  $A$ and $k$.
It says to use the substitution with $u(t)=T(t)-A$.
Thanks :)
 A: *

*First way, use Laplace transform:
$$\text{T}'\left(t\right)=\text{K}\cdot\left(\text{T}\left(t\right)-\text{A}\right)\to\text{s}\cdot\text{T}\left(\text{s}\right)-\text{T}\left(0\right)=\text{K}\cdot\left(\text{T}\left(\text{s}\right)-\text{A}\cdot\frac{1}{\text{s}}\right)$$


Solving $\text{T}\left(\text{s}\right)$:
$$\text{T}\left(\text{s}\right)=\frac{\text{T}\left(0\right)-\text{K}\cdot\text{A}\cdot\frac{1}{\text{s}}}{\text{s}-\text{K}}$$
Now, using inverse Laplace transform:
$$\text{T}\left(t\right)=\text{A}+e^{\text{K}t}\left(\text{T}\left(0\right)-\text{A}\right)$$
Setting $\text{T}\left(0\right)=\text{T}_0$, we get:
$$\color{red}{\text{T}\left(t\right)=\text{A}+e^{\text{K}t}\left(\text{T}_0-\text{A}\right)}$$


*Second way (solving the separable equation):


$$\text{T}'\left(t\right)=\text{K}\cdot\left(\text{T}\left(t\right)-\text{A}\right)\Longleftrightarrow\int\frac{\text{T}'\left(t\right)}{\text{T}\left(t\right)-\text{A}}\space\text{d}t=\int\text{K}\space\text{d}t$$
Use:


*

*Substitute $u=\text{T}\left(t\right)-\text{A}$ and $\text{d}u=\text{T}'\left(t\right)\space\text{d}t$:
$$\int\frac{\text{T}'\left(t\right)}{\text{T}\left(t\right)-\text{A}}\space\text{d}t=\int\frac{1}{u}\space\text{d}u=\ln\left|u\right|+\text{C}=\ln\left|\text{T}\left(t\right)-\text{A}\right|+\text{C}$$

*$$\int\text{K}\space\text{d}t=\text{K}\cdot\int1\space\text{d}t=\text{K}\cdot t+\text{C}$$


So, we get:
$$\ln\left|\text{T}\left(t\right)-\text{A}\right|=\text{K}\cdot t+\text{C}$$
Solving $\text{C}$, use $\text{T}\left(0\right)=\text{T}_0$:
$$\ln\left|\text{T}_0-\text{A}\right|=\text{K}\cdot 0+\text{C}\Longleftrightarrow\text{C}=\ln\left|\text{T}_0-\text{A}\right|$$
So, we get:
$$\color{red}{\ln\left|\text{T}\left(t\right)-\text{A}\right|=\text{K}\cdot t+\ln\left|\text{T}_0-\text{A}\right|}$$
A: We have $T'(t)=k(T(t)-A)$.
Using the substitution $u(t)=T(t)-A$, we get $u'(t)=T'(t)$.
Then, we have $u'(t)=ku(t)$.
Rearranging, we have $\displaystyle 
\frac{u'(t)}{u(t)}=k$.
Integrating both sides with respect to $t$, gives us $\ln|u(t)|=kt+C$.
We then have $|u(t)|=e^Ce^{kt}$, which gives $u(t)=ce^{kt}$.
Finally, we substitute back in to get $T(t)-A=ce^{kt}$, so that $\boxed{T(t)=A+ce^{kt}}$.

I used the function notation, so for the most part I ignored differentials like $du$ and $dt$, but the method is clear.
