Graphs of Trigonometric Functions

 

We begin by considering the general formula for the graphs of sine and cosine.

 

The general formula for sine: y = Asin(Bx  C) + D.

The general formula for cosine: y = Acos(Bx  C) + D.

 

Let’s begin by labeling the various components.

 

A  amplitude of the function = (max-min)/2 (vertical stretch of the graph)

B  stretch/shrink on the x-axis. (It compresses or expands the graph.)

            B has the following relationship with the period:

            , where P is the period. Solving for P, we have .

C/B  the phase shift of the graph (the shift left (if C/B is neg.) or right (if C/B is pos.))

D  the vertical shift of the graph.

 

Let’s look to see what these different values do to the graph of sine. Below is the graph of y = sin(x) on the interval [0, 2π].

 

Figure 1: Graph of y = sin(x).

 

Let us consider what the graph of y = Asin(Bx) on the interval [0, 2π/B] looks like.

 

Figure 2: Graph of y = Asin(Bx).

 

Notice that the graph looks precisely the same. The only difference is the range of the function is now [-A, A] instead of [-1, 1] and the period is 2π/B instead of 2π.

 

Let’s look at some examples of the two graphs imposed on top of each other, to see exactly what the changes described above do to the graphs.

 

Example 1: Consider the graphs of f(x) = sin(x) and g(x) = sin(2x).

 

Figure 3: Graphs of f(x) = sin(x) and g(x) = sin(2x).

 

Here, we notice that the two graphs are the same, except for the fact that g(x) has period equal to 2π/2 = π. Thus, on the interval [0, 2π], the graph of g(x) will repeat twice while f(x) will only show one period.

 

 

Example 2: Consider the graphs of f(x) = sin(x) and g(x) = 2sin(x).

 

Figure 4: Graphs of f(x) = sin(x) and g(x) = 2sin(x).

 

Here, we notice that the two graphs are the same, except for the fact that g(x) has an amplitude twice as large as f(x). That translates to a vertical stretch by a factor of 2.

 

Example 3: Consider the graphs of f(x) = sin(x) and .

Figure 5: Graphs of f(x) = sin(x) and .

 

Here, we notice that the two graphs are the same, except for the fact that g(x) has an amplitude twice as large as f(x). That translates to a vertical stretch by a factor of 2.

 

 

Things get a bit more complicated once we introduce shifts into the graph.

 

 

Example 4: How do the graphs of  and g(x) = cos(x) compare?

 

We begin by graphing f(x). Notice that this is the same graph as sin(x), except that we have shifted every point to the left by π/2.

 

The following graph has f(x) (solid blue) and the original graph sin(x) (dashed black).

 

Figure 6: Graphs of  and sin(x).

 

Next, we graph g(x) = cos(x).

Figure 7: Graph of g(x) = cos(x).

 

Observe that f(x) and g(x) are the same graph. That means that sin(x) and cos(x) are essentially the same graph, and differ only by a phase shift of π/2.

 

 

Now, let’s look at a really complicated graph.

 

Example 5: Graph y = 3cos(2x  π) + 1.

 

We start by noting what A, B, C and D are in the above equation.

 

A = 3, B = 2, C = π and D = 1.

 

So, that means that we are going to graph cos(x), but with some modifications.

 

(i)                  The graph is stretched vertically by a factor of 3.

(ii)                The period is now 2π/2 = π instead of 2π.

(iii)               There is a phase shift of π/2 to the right.

(iv)              There is a vertical shift of 1 up.

 

So, let us handle these in pieces. We begin by graphing 3cos(2x), since it will look the same as cos(x), only with some changes to the labeling of the x- and y-axes.

Figure 8: Graph of y = 3cos(2x).

 

Now, we take into account the phase shift, which moves the graph to the right by π/2.

Figure 9: Graph of y = 3cos(2x  π).

 

Lastly, we take into account the vertical shift, which moves the graph up 1, which gives us our final answer.

Figure 10: Graph of y = 3cos(2x  π) + 1.

 

 

Example 6: Match the following equations with their graphs. Give reasons for your answers.

 


(i)                  y = sin(x/2)

(ii)                y = cos(x  π/2)

(iii)                

 

(iv)              y = 3sin(x)  1

(v)                 

(vi)              y = sin(2x  2π)


 

 


(a)   

 

 

 

 

 

(b)    

 

 

 

 

 

 

 

(c)     

 

 

 

 

 

 

 

(d)  

 

 

 

 

 

(e)     

 

 

 

 

 

(f)      


 

 

 

 

 

 

 

(a) corresponds with (i). The graph starts at the origin, has period equal to 2π/(1/2) = 4π, and has no amplitude shift, phase shift, or vertical shift.

 

(b) corresponds with (v). We see that the graph starts at the origin, the period is equal to 2π/2 = π, and the amplitude is 1/2.

 

(c) corresponds with (ii). This looks like the graph of sin(x), but that is not an option. Notice, though, that since sin(x) and cos(x) are related by a phase shift of π/2, (ii) is the only likely choice, since there are no amplitude, vertical or period shifts.

 

(d) corresponds with (iii). The graph starts at 1/2 (which is the amplitude) and has period equal to 2π/2 = π.

 

(e) corresponds with (vi). Notice that y = sin(2x  2π) is the graph of y = sin(2x), shifted to the right by 2π/2 = π. But the period of y = sin(2x) is 2π/2 = π. So, the phase shift does not affect the look of the graph. Thus, we look for the graph that looks like y = sin(2x).

 

(f) corresponds with (iv). Notice that the graph is not symmetric about the x-axis, so there is a vertical shift. Since more of the graph lies below the x-axis, we have that it is a vertical shift down. The period is unaffected, but the amplitude is equal to (2-(-4))/2 = 3.