
Mark M. answered 01/26/24
I love tutoring Math.
In 24 hours, from one midnight to the next, the temperature should go through one complete daily cycle.
So in 24 hours, the argument that we give to the sine function should run from 0 to 2π, because that's what it would take to make the sine function to go through a complete cycle.
Let t be the number of hours since midnight.
Consider the expression (t/24)·2π. This will be a first attempt at the argument that we give to the sine function.
As t goes from 0 to 24, the fraction t/24 goes from 0 to 1.
Therefore, as t goes from 0 to 24, the whole expression (t/24)·2π goes from 0 to 2π.
That's what we said we wanted the argument of the sine function to do.
It's going to look like sin((t/24)·2π)
But we have a complication.
In a plain old sine wave, the lowest point comes when x=3π/2, in other words when the argument x is 3/4 of the way from 0 to 2π.
In other words, the lowest point comes when the argument x is 18/24 of the way from 0 to 2π.
But we want the lowest point to come at 2:00 am, which is only 2/24 of the way through the day, not 18/24 of the way through the day.
In other words, we want the lowest point to come 16/24 of the way through the day early (because 16/24 = 18/24 - 2/24).
So let's add 16 to the t in sin((t/24)·2π) to make everything happen 16 hours early.
Now we have sin(((t+16)/24)·2π), which is a sine wave that takes t, the number of hours since midnight,
and hits its minimum at 2/24 of the way through the cycle, not the usual 18/24 of the way through the cycle.
The rest is easier!
A plain old sine wave goes up and down from -1 to +1, a distance of 2 units. If the temperature goes from a low of 74 degrees to a high of 96 degrees, it goes up and down a distance of 22 degrees. That's 11 times the distance that a plain old sine wave goes up and down.
So as t goes from 0 to 24, 11sin(((t + 16)/24)·2π) would go up and down a distance of 22 degrees, from a low of -11 degrees to a high of +11 degrees.
Let's add 85 to that.
Now as t goes from 0 to 24, 11sin(((t + 16)/24)·2π) + 85 goes up and down a distance of 22 degrees, from a low of 74 degrees to a high of 96 degrees. That's what we want. And remember, it hits is minimum at 2:00 a.m.
So our answer is
D(t) = 11sin(((t + 16)/24)·2π) + 85
If desired, we can write this more simply as
D(t) = 11sin(π(t + 16)/12) + 85