[Math] Differential equations: temperature change and room temperature

calculusordinary differential equationsphysics

Problem: A can of orange juice is taken from the fridge and placed in a room where the temperature is a constant $25^\circ$C. As the can of orange juice warms up, the rate of increase of its temperature $\theta$$^\circ$C after time t, where t is measured in minutes, is proportional to the temperature difference (25-$\theta$)$^\circ$C. Set up a differential equation to represent the above scenario, and solve this differential equation.

The picture shows my initial steps that I took to solve this.
enter image description here

However, the given solution actually places a modulus around (25-$\theta$), like so.
enter image description here

I'm puzzled – can (25-θ) actually be less than zero? Because this means that something taken out from the fridge, and then warmed up to room temperature, will then become higher than the room temperature! Or is there something else I'm missing?

Best Answer

What about $$ \frac{d\theta}{dt}=k(25 - \theta)$$ $$ \frac{d\theta}{25-\theta}=k \cdot dt$$ $$ \int_{T_0}^T \frac{d\theta}{25 - \theta} = \int_{t_0}^t k \cdot dt\prime$$

$$ -\ln \left( 25 - \theta \right) \big|_{T_0}^T = k \cdot \left( t - t_0 \right)$$ $$ \ln \left( 25 - \theta \right) \big|_{T_0}^T = - k \cdot \left( t - t_0 \right)$$

Let $ t_0 = 0 $ (start time). $T_0$ is the temperature at time 0 which is the temperature of the fridge. The argument $25 - \theta $ is always positive. $$ \ln \left( \frac{25 -T}{25 - T_0} \right)= -kt $$ $$ \frac{25-T}{25-T_0} = e^{-kt} $$ $$ T = 25 + \left( T_0 - 25 \right) \cdot e^{-kt} $$

We then have $T(0) = T_0$ and $T( \infty ) = 25$ as required.