The general expression of a cosine function is Suppose , are both positive. Here the lowest temperature is C and highest is C, then
so and . The value is the period of this function. As it describes the temperature changes throughout a day which lasts for 24 hours, we have From the problem statement we know the lowest temperature is obtained at 7:00, by symmetry the highest is around 19:00. Then to shift the maxima from to we subtract by 19. So and the final function is
Note the expression of the solution is not unique, it can be written in infinitely many ways, such as