Main content

## Algebra 2

### Unit 11: Lesson 9

Sinusoidal models- Interpreting trigonometric graphs in context
- Interpreting trigonometric graphs in context
- Trig word problem: modeling daily temperature
- Trig word problem: modeling annual temperature
- Modeling with sinusoidal functions
- Trig word problem: length of day (phase shift)
- Modeling with sinusoidal functions: phase shift
- Trigonometry: FAQ

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Trig word problem: modeling daily temperature

CCSS.Math: , , ,

Sal solves a word problem about the daily change in temperature by modeling it with a sinusoidal function. Created by Sal Khan.

## Want to join the conversation?

- My equation was T(t) = 7.5sin(pi/12(t + 10) + 10.5

So... basically the only difference between his and mine is the plus or minus 10. If t was10:00AM in F(t) and we want it to be12:00AM (midnight), we have to go back 10 hours. Going back 10 hours is going to the left and going to the left 10 hours is adding 10 to t. That is my reasoning, but with his, it would seem that it is hours after8:00PM because he subtracts 10. Subtracting 10 means 10 hours to the right.10:00AM plus 10 hours is8:00PM, not 12 AM

Am I wrong with my reasoning or is he wrong?(30 votes)- Think about what happens to the graph. The graph starts right now at10:00AM, but we want the graph to start at12:00AM (10 hours earlier, as you said). So what he have graphed so far needs to be 10 hours in the future, so the graph needs to move to the right. That is why you have to replace
`t`

with`t - 10`

.

In your equation, you are moving the graph 10 hours to the past, so your equation says, "What is the temperature`t`

hours after8:00PM".(25 votes)

- Ok this video is very confusing can somebody please simplify it? Sometimes Sal breaks things down so much that it actually at first is pretty confusing.(20 votes)
- He started at 10am because 10am is the at the mid line of the function- like a sine function. Then he graphed a sine function from that (and the other information that the problem gives) and since all trig functions are periodic- he simply needed to shift the function 10 hours to get the real formula that the question was asking. So he just attacked a problem by making it simpler :) Hope this helps(17 votes)

- At9:23, When Sal substitutes -10 isn't the time then going to be 8 p.m ?

The question asks for temp after midnight which is after 12 a.m, shouldn't it be -14 then? if he is going to shift it to the right at 12 a.m.

I don't understand can someone please explain?(9 votes)- -10 means going from 12 PM to 10 hours later, 10 AM.(6 votes)

- 5:19how do i know if it might be a sine function or a cosine?(11 votes)
- At x=0, the graph of
**sine**will be at its**midline**.

At x=0, the graph of**cosine**will be at its**maximum or minimum**.(3 votes)

- so, maybe i misconstrued something on the addition of 10 also (as others have stated), but if the function f(x) starts at 10 am, wouldn't the shift be 14 hours ahead (7.5sin(x-14)) + midline instead of "........(x-10)+midline)? please correct me if I'm mistaken, it happens often haha(9 votes)
- It helps (for this example) if you switch to millitary time instead of two 12-hour cycles.

10.00**minus**10 hours would be 0.00 (midnight) and/or 10.00**plus**14 hours equals 0.00 (digital clocks usually switch to 0.00 after 23.59 instead of showing 24.00)

Therefore the equation "......(x-10))+midline" is correct, and the equation "......(x+14))+midline" is a correct solution.(3 votes)

- Did any one else come up with -7.5 sin(Pi/12x + Pi/6) + 10.5? I did not use the initial simplification that Sal employed. The temperature is below the average prior to 10 a.m. To model the initial decline and the subsequent rise towards the average the sine reflected in the line of the equilibrium temperature seemed appropriate, hence the -sin. I then simply phase shifted with x+2 in order for the avarage to be reached at t-2 or 10 p.m. of the previous day. Obviously that includes hours not under consideration, but it is just a way of making the graph line up.(7 votes)
- Both graphs are the same so yours should be correct. You shifted the graph to the left by 2 whereas Sal shifted the graph to the right by 10.

You might want to compare the two graphs using graphing calculator such as Desmos.com.(1 vote)

- In the graph of first function F(t) you can clearly see what happens to the temp. after midnight. What is the point of the T(t) function other than to make midnight =0 hours, or is that the only point of T(t)?(6 votes)
- The main idea for the problem was to introduce the idea of the phase shift for trig functions. Moving from F(t) to T(t) is a way to demonstrate the idea.(1 vote)

- At5:17Sal says that you could model it with either but what would the cosine version look like?(2 votes)
- Here are the 4 equations I got (all from the original graph with t=0 at 10am (That's all you need.)

7.5sin((pi/12)(t+14))+10.5; (sin(t*pi/12 + 7pi/6)).(t=0 (midline) for sine is 10am.)

7.5sin((pi/12)(t-10))+10.5; (sin(t*pi/12 - 5pi/6)).

7.5cos((pi/12)(u+8))+10.5; (cos(u*pi/12 + 2pi/3)). (u=0 (max) for cosine is 4pm.)

7.5cos((pi/12)(u-16))+10.5; (cos(u*pi/12 - 4pi/3)).

(If you extend the graph out another 24 hrs and relabel the x axis with 4pm = 0, you get the cosine graph and its proper 0 point).(5 votes)

- What does he mean when he say "When the argument of the function=0" ?(2 votes)
- an argument is a variable in an equation like a, b, c, and d.(5 votes)

- How do I know if the value "a" is negative or positive?(2 votes)
- A negative amplitude just means a
*flipped curve.*

If you choose to use cos, then you need to relate the phase shift to the maximum point. If the more convenient point to use is a minimum point, then it will be negative. For example, sin(π/2 + π) = -sin(π/2).(6 votes)

## Video transcript

in Johannesburg in June the daily
low temperature is usually around 3 degrees Celsius and the daily high
temperature is around 18 degrees Celsius the temperature is typically halfway
between the daily high in the daily low at both 10:00 a.m. and 10:00 p.m.
and the highest temperatures are in the afternoon right a trigonometric function
that models the temperature capital T in Johannesburg lowercase T hours after
midnight so let's see if we can start to think about what a graph might look like
of all of this so this let's say this is our temperature axis in Celsius degrees
so that is temperature temperature and I'm actually going to first I'm going
to do two different functions so that's my temperature axis and then this right
over here is my time in hours so that's lowercase T time in hours and let's
think about the range of temperatures so the daily low temperatures around
3 degrees Celsius so let's actually in the high is 18 so let's make this
right over here 18 this right over here is 3 and we can also think about
the midpoint between 18 and 3 that we hit it both 10 a.m. and 10 p.m. 18
plus 3 is 21 divided by 2 is 10.5 so the midpoint or we can say the midline
of our trigonometric function is going to be 10 point 5 degrees Celsius
so let's let me draw the midline so we're going to essentially oscillate
around this right over here we're going to oscillate around this the daily high
is around 18 degrees Celsius the daily high is around 18 degrees Celsius and
the daily low is around 3 degrees the 3 degrees Celsius just like that so
we're going to oscillate around this midline we're going to hit the lows and
highs now to simplify things because we hit this 10.5 degrees at 10 a.m. and 10
p.m. to simplify this I'm not going to tackle their question that they want
immediately the hour in terms of tea hours after midnight I'm going to define
a new function f of T F of lowercase T which is equal to the temperature
temperature in Johannesburg where we're assuming everything is in Johannesburg
temperature T hours after I'm going to say two hours after 10:00 a.m. and
the reason why I'm picking 10 a.m. is because we know that the temperature
is right at the midline at 10:00 a.m. T hours after 10:00 a.m. because if I want
to graph f of T at T equals zero that means we're at 10:00 a.m. that means
that we're halfway between they tell us we're halfway between the daily low and
the daily high now what is the period of this trigonometric function going
to be well after 24 hours we're back to we're back we're going to be back to
10 a.m. so our period is going to be 24 hours so let me put 24 hours there and
then this is half ways 12 hours so what happens after 12 hours after 12 hours
we're back at 10 p.m. where we're back at the midway between our lows and our
highs and then after 24 hours we're back at 10 a.m. again so those are going to
be points on F of T and now let's think about what will happen as we go beyond
as we start at 10 a.m. and go forward so to go start at 10 a.m. and go for
they tell us that the hottest part the hottest part the highest temperatures
are in the afternoon the afternoon is going to be around here so we should be
going up in temperature and the highest point is actually going to be halfway
between these two so it's going to be six hours after 10 a.m. which is 4 p.m.
so that's going to be the high at 4 p.m. so let me draw a curve draw our curve
like this so it'll look like look like this and then our low so now we're at 10
p.m. and then you go six hours after 10 p.m. you're now at 4 a.m. which is going
to be the low this is 18 hours after 10 a.m. after 10 a.m. you're going to be at
your low temperature roughly right over there and your curve your curve will
look something something like this so what would be before we even try to
Model T of T let's what would be an expression and obviously we keep going
keep going like that we can even go you know hours before 10:00 a.m. this is
obviously just keeps on cycling on and on and on forever now what would be an
expression for F of T and I encourage you once again to pause the video and
try to think about that well one thing that you say well you say this is could
be a sine or a cosine function actually you could model it with either of
them but it's always easiest to do the simplest one which which function
is essentially at its midline at its midline when when the argument to the
function is zero well the sine of zero is zero and if we didn't shift this
function up or down the midline of just a sine function without it being
shifted is is zero so sine of 0 is 0 and then sine begins to increase and
oscillate like this so it feels like sine is a good candidate to model it
with once again you could model it with either but I have a feeling this
is going to be a little bit simpler now let's think about the amplitude well
how much do we vary what's our maximum variance from our midline so here we
are 7.5 above our midline here we are 7.5 below our midline so our amplitude
is 7.5 and actually let me just do that in a different color just so you see
where things are coming from so this is 7 point 5 this is 7 point 5 so our
amplitude looks like it's 7.5 and now what is our period well we are we've
already talked about it our period is 24 24 hours this distance right over
here is 24 hours which makes complete sense after 24 hours you got the same
point in the day so we would divide 2 pi by the period divided by 24 times T and
if you forget hey you know divide 2 pi by the period here you could just remind
yourself that what are.what T value will make us go from so when T is equal to 0
the whole argument to the sine function is going to be 0 that's when we're over
here and then when T is equal to 24 the whole argument is going to be 2 pi so we
would have made one rotation around the unit circle if we think about the input
into the sine function now we're almost done if I were to just graph this this
would be this would be have a midline around 0 but we see that we've shifted
we've shifted everything up by 10.5 so we have to shift everything up by 10.5
now this is we've just successfully modelled it and we could simplify
a little bit we could write this as pi over 12 instead of 2 pi over
24 but this right over here models the temperature in Johannesburg T hours
after 10 a.m. after 10 a.m. that's not what they wanted they want us to model
they want us to model the temperature T hours after midnight so what would T of
T be we're going to have to shift this a little bit so let's just think about
it let me just write it out so T of T so T of T this is now we're modeling
T hours after after midnight so we're going to have the same amplitude we're
just going to have the same variance from the midline so it's going to be 7.5
times sine of which we do the same color so you see what I'm changing and not
changing times the sine of instead of 2 pi over 24 I'll just write pi over 12
instead of writing T I'm going to shift T either to the to the right or the left
and actually you could shift in either direction because this is a periodic
function we have to think about how much we're shifting it so T is going
to be plus or minus something right over here I'm going to shift it plus
ten point five plus ten point five now this is always a little bit at least in
my brain I have to think about this in a lot of different ways so that I make
sure that I'm shifting it in the right direction so here at 10 a.m. we were
at this point when T is equal to zero this is zero hours after 10 a.m. but
in this function when is 10 a.m. well in this function 10 a.m. let me write
it this way T 10 a.m. is 10 hours after midnight so T capital T of 10 this is 10
hours after midnight should be equal to should be equal to f of 0 because here
the argument is hours after 10 a.m. so this is 10 a.m. this right over here
represents temperature temperature at 10:00 a.m. and this over here if because
capital did this capital T function this is hours after midnight this is also
temperature at 10:00 a.m. so we want T of 10 to be the same thing as f of 0
or a st. another way of thinking about it when F of 0 this whole argument is
0 so we want this whole argument to be 0 when T is equal to 10 so how would
we do that well this is t minus 10 notice t of 10 you put a 10 here this
whole thing becomes 0 this whole thing becomes zero and you're left with 10.5
and over here f of zero well the same thing this whole thing becomes a zero
and all you're left with over here is 10 point five so T of 10 should be F of
zero so if we wanted to graph it we've already answered their question we've
if we put a 10 here the argument to the sign becomes zero these two things
are going to be equivalent but let's actually graph this so T of 10 so if
we're graphing capital T T of 10 so this is 6 12 let's see so this is maybe so 10
is going to be someplace around here so T of 10 is going to be the same thing as
F of 0 so it's going to be like that and then it's just going to and then we've
essentially just shifted everything to the right everything to the right by
10 and that makes sense because 0 after whatever hours you are after 10 a.m.
is going to be 10 more hours to get to that same point after midnight so your
curve is going to look so this is going to be shifted by 10 this is going to be
shifted by 10 and your curve is going to look something like let me see if I this
is going to be shifted by 10 so you can get I'm just going to get it's going to
be at 16 hours so let's see it's going to look something something like that
and of course it'll keep oscillating like that so essentially we just have to
shift it to the right by 10 the argument we have to replace T with t minus 10
to do it and this was the logic why.