horizontal stretching and trig functions


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.

image of sin(x), with a blue dot at (2pi,0)
figure 1: graph of sin(x) for 0<=x<=2pi.

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:

sin(B k) = 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:

B k = 2pi, so
B = 2pi/k.
All we're doing here is figuring out how much we have to stretch or shrink the graph horizontally to get it to end at the right place. The way we do this is by making whatever we're plugging into the sine (or cosine) equal 2pi.

horizontal stretching and trig functions
Last modified: Thu Sep 15 15:09:56 EDT 2005
Comments to:glarose(at)umich(dot)edu
©2005 Gavin LaRose, UM Math Dept.