Jeff P. answered 09/06/22
When writing a sinusoidal function, it helps to first find the characteristics of the sinusoid - that is, first find the amplitude, period, phase shift, and midline. Once you have these things, we can use what we know about their relationship to the parameters in your general equation (a, b, h, and k) to find the equation.
First thing to do is decide whether we are going to write a sine or cosine function. We could do either, but sometimes one is simpler than the other. I'll show you how to do it for a cosine function, but we could also write a sine function in a similar way by changing the phase shift.
The amplitude is 1/2 times the distance between the maximum height and minimum height:
Amplitude = 1/2 (27-5) = 11 feet
The period is the time it takes to complete one full cycle:
Period = 40 seconds
The phase shift represents, loosely speaking, how much you would need to translate the untranslated sine or cosine graph to the right so that the the graph is at the correct part of the cycle at time 0. We are using a cosine graph: the untranslated cosine graph has a maximum at input 0. We need the minimum to happen at time t = 0. For that to happen, we would need to translate the cosine graph to the right by 1/2 period, which in this case is 20 seconds.
Phase shift =20 seconds
The midline of the graph occurs at y = (the average between the max and min). Therefore, the midline is:
midline: y = (min height + max height)/2 = (5+27)/2 = 16 feet.
Now that we have the characteristics, we need to relate back to the equation. We want an equation of the form y = acos(b(x-h))+k. For this form:
a = the amplitude. Therefore, a = 11.
2π/b = the period, so 2π/b = 40 ⇒ b = 2π/40 = π/20
h = the phase shift, so c = 20
The midline is defined by y = k, so we have k = 16
Putting this all together gives y = 11cos((π/20)(x-20))+16
Remember that this is not the only correct way to do this - there are other equations that are correct depending on how you set up the problem (e.g., if you choose a sine or cosine function).
Doug C.
And here is an example using sine: desmos.com/calculator/bp4qftrnck09/06/22