Transformations of functions can be confusing for a lot of people but they all follow a common pattern according to the formula,
f(x) = asin(b(x+c))+d
where,
The sine function can be swapped out for any other trig function
a = Effects the amplitude of the function, or the height.
The sine and cosine functions have a magnitude of 1 as they are derived from the unit circle which has a radius of 1. This means that the function oscillates from -1 to 1, which is 1 above the x-axis and 1 below the x-axis. If "a" was equal to four, the function would have an amplitude of 4, meaning it would peak at y = 4 and dip to y = -4. This makes sense since a is effectively multiplying the final y-value, or output value, of the function. A negative multiplier reflects or flips, the function about the x-axis.
b = Effects the period of the function, or the x-value required for the function to complete one cycle around the circle.
The functions sine and cosine have a period of 2π, meaning when x = 2π the function has made one revolution around the circle and is back to where it started.
It helps to visualize the unit circle,
When x = 0, sin(0) = 0
When x = π/2, sin(π/2) = 1
When x = π, sin(π) = 0
When x = 3π/2, sin(3π/2) = -1
and then when x = 2π, sin(2π) = 0 again, and we are back to where we started.
Since it normally takes 2π to go around the circle once, you could think of x as x/2π which means that when, x = 2π, x/2π = 1, which would be 1 period or cycle around the circle. If you multiply x by a number "b" greater than 1, the period becomes shorter, meaning x does not have to be as big for the function to complete one cycle.
For example,
if you multiply x/2π by 2 you get 2x/2π which reduces to x/π. Now you can see that x only has to equal π, instead of 2π, to complete one cycle.
If you divide x by a number you can think of it as multiplying x/2π by 1/b, which will increase the value in the denominator or the part below the devisor.
For example,
if you divide x by 2 you get x/2π * 1/2 = x/4π
Now you can see that x has to equal 4π to complete one cycle. This has the effect of compressing and stretching the function horizontally in the x-axis, with multiplying compressing and dividing stretching.
The formula to remember is
2π/(new period) = the value that you multiply x by in the function to get the new period
If b is negative, the function is reflected over the y-axis.
c = Translates the function left or right along the x-axis. Negative values move the function to the right and positive values move the function to the left.
For example,
In the function f(x)=sin(x+5),
x has to be 5 less in order to get back to its normal starting point which is when x = 0. This means the function will start when x = -5, meaning the function has moved to the left along the x-axis by 5.
Remember that b, the multiplier for the period of the function, always affects both x and c.
For example,
f(x)=sin(5(x+3))
Here the function is shifted to the left by 3 and its period is 5 times shorter.
d = Shifts the function up or down along the y-axis. d is effectively being added to the final y value of the function at the end, so a positive value makes y bigger and a negative value makes y smaller.
For example,
f(x)=sin(x)+d
means that the function will move up or down y units.
If d = 5 then,
f(x)=sin(x)+5
This means the function would be shifted up by 5 units.
Let me know if this helped!