The simplest example of Newton's Model of Cooling is given by the differential equation

where A is a constant ambient temperature. This equation is easily solved using separation of variables as shown below.

In many cases, however, the ambient temperature is not constant. For example, we might be interested in the fluctuations of the temperature of a lake as the air temperature varies over the course of several days or over the course of a year. Other related phenomena include the fluctuation of air temperature over the course of the day or over the course of a year. Notice that even though the sun is strongest close to noon, the day is hottest several hours later. Similarly, the hottest weather occurs a month or two after the summer solstice.
We investigate these phenomena by looking at the differential equation

obtained by replacing the constant ambient temperature A in the first model by a fluctuating ambient temperature.

This differential equation is easily solved using the standard recipe for solving first order linear differential equations as shown below.

Notice that solving this differential equation requires a fairly complicated integration by parts. Then putting the solution into a form that emphasizes amplitude and phase shift requires standard trigonometric trickery.
We are interested in the effects of two things.
We can also see these effects directly from the solution obtained above. Notice the following

involving the constant C that comes from the initial condition goes to zero as t goes to infinity. Thus, over the long term the effect of the initial condition dies out and the function looks like
