# Temperature Problems

Newton's law of cooling, which is equally applicable to heating, states that the time rate of change of the temperature of a body is proportional to the temperature difference between the body and its surrounding medium. Let `T` denote the temperature of the body and `T_m` denote the temperature of the surrounding medium. Then, the time rate of change of the temperature of the body is `(dT)/(dt)`, and Newton's law of cooling can be formulated as `(dT)/(dt)=-k(T-T_m)`, or as `(dT)/(dt)+kT=kT_m`, where `k` is a positive constant of proportionality. Once `k` is chosen positive, the minus sign is required in Newton's law to make `(dT)/(dt)` negative in a cooling process, when `T` is greater than `T_m`, and to make it positive in a heating process, when `T` is smaller than `T_m`.

**Example 1.** A body at an unknown temperature is placed in a room which is held at a constant temperature of 30° F. If after 10 minutes the temperature of the body is 0° F and after 20 minutes the temperature of the body is 15° F, find the unknown initial temperature.

We have that `T_m=30`; so, the differential equation is `(dT)/(dt)+kT=30k`. This is a first-order linear differential equation. The integrating factor is `I=e^(int kdt)=e^(kt)`. After multiplying the equation by the integrating factor, we obtain that `e^(kt)(dT)/(dt)+kTe^(kt)=30ke^(kt)`, or `(d(Te^(kt)))/(dt)=30ke^(kt)`.

Integrating both sides gives `Te^(kt)=30e^(kt)+C`, or `T=Ce^(-kt)+30`.

We are given that `T(10)=0`, or `0=Ce^(-10k)+30`. Also, `T(20)=15`, or `15=Ce^(-20t)+30`.

Thus, we have a system of two equations:

`{(Ce^(-10k)=-30),(Ce^(-20k)=-15):}`

Dividing the first equation by the second gives `e^(10k)=2`. Now, from the first equation, we have that `C=-30e^(10k)=-30*2=-60`.

Finally, `T_0=T(0)=Ce^(-k*0)+30=C+30=-60+30=-30`.

Let's take a look at another interesting example.

**Example 2.** A body at a temperature of 50° F is placed in an oven whose temperature is kept at 150° F. If after 10 minutes the temperature of the body is 75° F, find the time required for the body to reach a temperature of 100° F.

We have that `T(0)=50`, `T(10)=75`, `T_m=150`.

So, the differential equation is `(dT)/(dt)+kT=150k`. Again, as in example 1, this is a linear first-order differential equation. Its solution is `T=Ce^(-kt)+150`.

Since `T(0)=50`, we have that `50=Ce^(-k*0)+150`, or `C=-100`.

Now, the equation has the form `T=-100e^(-kt)+150`.

Since `T(10)=75`, we have that `75=-100e^(-10k)+150`, or `k=-(ln(0.75))/10`.

Finally, the equation has the following form: `T=-100e^(ln(0.75)/10t)+150`.

Now, we need to find such `t` that `T(t)=100`:

`100=-100e^((ln(0.75))/10t)+150`, or `t=10 ln(0.5)/(ln(0.75))~~24.0942` minutes.