Joel S. answered 04/12/23
A 42 year career as an Electrical Engineer for a major utility
Time past midnight in hours 0 6 12 18 24
Temperature 50 37 50 63 50
Notice that temperature fluctuates ± 13 degrees around 50.
24 hours is a full daily cycle. One cycle of a sinusoidal function is 2π radians, so we need the argument of the sin to be 2π when t = 24. Let the argument be (π/12) t. Using this:
D = 50 - 13sin{(π/12)t}.
Note the average temperature is 50. The average of any sinusoidal function over one cycle is zero. Thus 50 must be added to the sinusoid.
You can confirm this is the correct formula by inserting values of time of 0, 6, 12, 18, 24. The give temperatures of 50, 37, 50, 63, 50