If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Trig word problem: length of day (phase shift)

Sal solves a word problem about the annual change in the length of day by modeling it with a sinusoidal function that has a phase shift. Created by Sal Khan.

## Want to join the conversation?

• why is it (t-172) rather than ( t+172)?
• You want the function to be maximized when you plug in 172. In the first case, cos(0) = 1 and the function is maximized. In the second case, you are taking the cosine of 2pi*344/365, which is a little smaller.
• So I've done a lot of practice with phase shift but I still have trouble determining the parameters of the equation asin(bx+c)+d when there is a word problem given or when they ask you to graph a trig equation with a phase shift in it. Can someone please help me understand this? :I
• Good question, I have struggled with this concept as well. I will first explain how sketch equation cosine function and then how to sketch involving sin and tan briefly.

Question: How to sketch Cos(2x-pi/3), why is the phase shift not pi/3.

There two transformations going on, the horizontal stretch and the phase shift.

To stretch a function horizontally by factor of n the transformation is just f(x/n).

So let f(x) = cos(x)

=> f(x/(1/2)) = cos(x /(1/2) ) = cos(2x)

So the horizontal stretch is by factor of 1/2.

Since the horizontal stretch is affecting the phase shift pi/3 the actual phase shift is pi/6 to the right as the horizontal sretch is 1/2.

cos(2x-pi/3) = cos(2(x-pi/6))

Let say you now want to sketch cos(-2x+pi/3). Remember that cos theta is even function. A function is even if f(-x) = f(x). Substitute u = 2x-pi/3 =>
cos(-2x+pi/3) = cos(-u) = cos(u) = cos(2x-pi/3)

Similarly you can sketch sin(2x-pi/3) the same way just beware sin is an odd function not an even function. Note a function is odd if f(-x) = -f(x).

If you wanted to sketch an equation tan theta remember that period of tan theta is pi and tan is an odd function.

Basic notes

Note when equation is in the form asin(bx+c) + d the period is just 2pi/b. The formula for the period might be easier to use than thinking of horizontal stretches.

Vertical shift is just d.

The amplitude is the maximum distance from the midline. i.e. amplitude = |a|. The || (absolute value function) makes everything that is negative become positive. As 'a' can be negative we take the absolute value to make sure it is positive. e.g. |-6| = 6, |-pi| = pi, |-2.78| = 2.78. Note that anything that is positive remains positive i.e. |4| = 4, |6| = 6, |pi| = pi. The reason for the absolute value is we are interested in the distance from the midline which is non-negative.

Note it might to help to learn about curve sketching for more detail on things discussed.
• L(55)=−51.875cos(​2pi/365​​(55+11))+727.725
each time i do this i get 675.86 as the answer and not 705.88 which is the answer in the exercise. Any advice on what i am doing wrong? The above formulae is the correct one from the hints.
• Everyone's made this mistake including me: make sure you're using radian mode on your calculator when it's measuring in radians. This should be in red.
• At , it seems like Sal just decides to use cosine instead of sin, just because it is easier. Is it optional whether to use sine or cosine, or is there a good reason that he used cosine?
• Unless you want a much harder equation and potentially wrong answer, go ahead and use the more convenient function.
• Hey guys i wanna ask a question. In one of the question in "Modeling with sinusoidal functions: phase shift", i found a weird solution (weird because i don't understand).

###the question + solution###
A weight is attached to the end of a spring. Its height after t seconds is given by the equation: -2 sin[(2phi/7) * (t+1)] + 5.
When does the weight first reach its maximum height? Give an exact answer.
The answer says: (2phi/7) * (t+1) = (-phi/2) + (2phi*n)
###end of the question + solution###

can someone explain to me, what does that 2phi*n doing right over there? Thanks
• When they ask for a solution, they want a closed phrase describing all possible solutions: that would make any solution theta, theta + 2π * n, (the solvent angle plus any number of full rotations: remember, adding 360 degrees or 2π to an angle doesn't make a new angle. It's just another expression for the reference angle.)
• How is the sign of the amplitude determined? My understanding was that a negative dip after the origin would mean a negative amplitude, but that doesn't seem to be the case going by the practice sets.
• Amplitude is simply the distance away from the center line that the tips of the peaks/troughs of the graph are. Because it's a distance, it can't be negative at all. Whether you're looking at a part of the graph where it rises away from the center line or falls below it, the amplitude will be the same.
• could we use a trigonometric function to create a function of the height of a basketball released above the ground as a function of time? while considering that each time it bounces the height get 20% smaller?
• f(t) = (cos(2pi*t)/2+0.5)*0.8^t

I believe this would work.

(cos(2pi*t)/2+0.5) varies between 1 and 0 and 0.8^t decreases by 20%.
• I do not understand how to know if the amplitude is negative or positive? Can someone help me?
• Whether it's a cos or sin function, the first extremum should be positive: if it's not, the function is negated (i.e. -cos or -sin). Don't mistake this for acos or asin.
• Hi, can someone tell me what I am doing wrong? In the practice questions, I get the equations right, but when asked for a specific value at a specific time, my calculator gives me the wrong answer.

The equation could be this: 8.5 cos(2pi/3(t-1.3))-35.5, I plug in the values for when t=2.5, and get -27.0.. but the answer said -42.8(it's correct, I checked with an online graphing calculator).
• The questions specify which angle measurement to use: degrees or radians. If you use the wrong one, your answer will be completely off even with the right equation.
Use the right mode on your calculator and you should be fine :-)