
Jacob C. answered 06/30/21
Adaptive Math and Physics Tutor
Divide your y-values through by 2 and you will see (1, 0, 1, 2, 1, 0, 1) which can be detected as a vertically shifted sinusoidal wave. Imagine shifting sin(x) by 1 unit upward, or the function sin(x) + 1. Instead of a range of [-1, 1], the range is [0, 2] as we see in our shifted y-values.
We will need a horizontal phase shift because sin(x) + 1 will initially increase as x increases from 0 but our y-values are decreasing. We can shift the function by π units to the left so we now have the function sin(x + π) + 1. Now, at x = 0, y = sin(0 + π) + 1 = 1 as we wish.
We now need to scale the x-axis so the inputs (0, 2, 4, 6, 8, 10, 12) line up with the desired trigonometric input values. Note that the values in the range are the values at which the function is a minimum, a maximum, or along it's line of symmetry. This implies that the input is a multiple of π/2. Since the inputs are multiples of two, we actually want to scale the input by π/4 so we get our multiples of π/2. Then, our function becomes y = sin(πx/4 + π) + 1.
Finally, since we divided our range by 2 to build our function, we want to multiply our function through by 2 to achieve the desired range. Thus,
y = 2sin(πx/4 + π) + 2
Check the output for each defined input and you should see that it works out.