In class we talked about how to find B in the expression f(x) = A cos(B x) and g(x) = A sin(B x) so that the functions f(x) and g(x) have a given period. This web explanation tries to do that more carefully.
Let's consider the sine function. We've graphed sin(x) to the right. It starts at (0,0), does a complete cycle, and finishes the cycle at 2pi (because its period is 2pi). That is, when we plug 2pi into the sine function, we get the second blue dot, which is where the function starts repeating.
Now suppose we want the sine curve sin(B x) to have a period of k. That means that we want the blue dot to appear when x = k. That is, when we plug in x = k we should get the blue dot:
How can this be? Well, the sine function gives us the blue dot when the thing that was plugged in is equal to 2pi (as shown in the figure). So what we plugged into our new sine function must be equal to 2pi: