Answer: D(t) = 20°*cos((pi/4)*t) + 55°
Explanation:
using that t = 0 is midnight, we know.
We know:
Max temp = 75°
Min temp = 35° (occurs at t = 4 hours)
Now we can model this as:
D(t) = A*cos(c*t) + B
Where A, c and B are constants.
we have a minimum at t = 4 hours, a minimum means that cos(c*t) = -1
then we have that:
D(4) = A*cos(c*4) + B = A*(-1) + B = 35°
here we also have that cos(c*4) = -1
this means that c*4 = pi
c = pi/4
We also have that the maximum temperature is 75°, the maximum temperature is when cos(c*t) = 1
D(t0) = A*(1) + B = 75°
with this we can find the values of A and B.
-A + B = 35°
A + B = 75°
We isolate B in the first equation and then replace it in the second equation.
B = 35° + A
A + B = 75°
A + 35° + A = 75°
2A = 40°
A = 40°/2 = 20°
B = 35° + 20° = 55°.
Our equation is:
D(t) = 20°*cos((pi/4)*t) + 55°