Graphs of the sine and the cosine functions of the form y = a sin(b x + c) + d and y = a cos(b x + c) + d
are discussed with several examples including detailed solutions.

We start with the graph of the basic sine function y = sin(x) and the basic cosine function g(x) = cos(x), we then present examples of how to graph transformed versions of these same functions. An effective way of using this tutorial is to start it from the beginning and go through the examples in order.

Example 1

Find the range and the period of the function y = sin(x) and graph it.

Solution to Example 1

A unit circle (with radius 1) centered at the origin of the system of rectangular axes has 4 special points corresponding to 5 quadrantal angles (0 , ?/2, ? 3?/2 and 2?) as shown in figure 1 below. The x and y coordinates of a point on the unit circle are the cosine and the sine respectively of the corresponding angle.

x being the angle in standard position , from the unit circle we can conclude the following:

The range of sin(x) (the y coordinates) is the set of all values in the interval [-1 , 1] or in inequality form: - 1 ? sin(x) ? 1

Once cycle of sin(x) may start at x = 0 and finish at x = 2? after which rotation the value of sin(x) are repeated as shown in the unit circle, we therefore say that sin(x) has a
period
equal to 2?.

The graph of y = sin(x) is shown below over one period from 0 to 2? (solid line) and other periods (broken line).

Example 2

Find the range and the period of the function y = cos(x) and graph it.

Solution to Example 2

We will use the same 4 special points corresponding to 5 quadrantal angles (0 , ?/2, ? 3?/2 and 2?) as shown in the unit circle (figure 1 above). cos(x) is given by the x coordinate of a point on the unit circle corresponding to angle x in standard position.

From the unit circle we can conclude the following:

The range of cos(x) (the x coordinates) is the set of all values in the interval [-1 , 1] in inequality form: - 1 ? cos(x) ? 1

Once cycle of cos(x) may start at x = 0 and finish at x = 2? after which rotation the value of cos(x) are repeated periodically as shown in the unit circle, we therefore conclude that cos(x) has a period equal to 2?.

We use the values of cos(x) for different values of x from the unit circle (see figure 1) . We shall use the x coordinate ( which gives cos(x) ) of the same 5 quadrantal angles corresponding to the variable x (0 , ?/2, ? 3?/2 and 2?) of which 2 values (0 , 2 ?) gives the maximum value 1 of cos(x), two values (?/2 , 3?/2) gives zeros of cos(x) and one value (?) gives a minimum value to cos(x)as shown in the table below.

The graph of cos(x) is shown below over one period from 0 to 2? (solid line) and more periods (broken line).

Example 3

Find the range and the period of the function y = 3 sin(x) and graph it.

Solution to Example 3

Comparing the given function y = 3 sin(x) and the basic sine function y = sin(x) there is a multiplication factor of 3. There is no horizontal stretching or shifting since the variable x appear in the same "way" in both functions.

Period = 2?

We have already made a table for sin(x) above, let us extend it and include the given function y = 3 sin(x) to graph.

Note: to obtain values for the function 3 sin(x) you multiply the values of function sin(x) by 3 as shown in the table below.

From table; range: -3 ? 3 sin(x) ? 3

The graph of 3 sin(x) is shown below over one period from 0 to 2? and as expected there is a vertical stretching of a factor of 3 (compare to y = sin(x) , red). The period did not change as expected but the range is now: [-3 , 3] or in inequality form : -3 ? 3 sin(x) ? 3

Example 4

Find the range and the period of the function y = -2 cos(x) and graph it.

Solution to Example 4

Comparing the given function = - 2 cos(x) and the basic cosine function y = cos(x), there is a vertical stretching of a factor of 2 and there is also a reflection on the x axis because of the minus in - 2. There is no horizontal stretching or shifting since the variable x appear in the same "way" in both functions.

Period = 2?

A table for cos(x) was already made above, let us extend it to include the given function y = - 2 cos(x) to graph.

From table; range: - 2 ? -2 cos(x) ? 2

[ - |a| , |a| ] or in inequality form - |a| ? y ? |a|

The graph of -2 cos(x) is shown below over one period from 0 to 2? (blue solid line) compared to y = cos(x) (red) and we can see that there is a stretching of factor 2 and reflection.

Example 5

Find the period of the function y = sin(2 x) and graph it.

Solution to Example 5

Comparing the given function y = sin(2 x) and the basic sine function y = sin(x), there is a horizontal shrinking of a factor of 2.

Explanation

For the function y = sin(2 x) to go through one period, 2 x will have to be as follows

0 ? 2 x ? 2 ?

divide all terms of the above inequality, we obtain

0 ? x ? ? , this is the interval over one period to be used to graph y = sin(2 x)

Hence the period of sin(2x) = ? - 0 = ?

2?/ |b| , the period is always positive.

The graph of y = sin(2 x) is shown below over one period from 0 to ? (blue solid line) compared to y = sin(x) which has a period of 2?(red).

Example 6

Find the period, phase shift of the function y = cos(2 x - ?/4) and graph it.

Solution to Example 6

Rewrite the given function as

y = cos(2(x - ?/8))

We first start by ignoring the term - ?/8 and define a period for y = cos(2 x)

0 ? 2 x ? 2?

Divide all terms by 2 to obtain

0 ? x ? ? , period is ? as already calculated above.

For the function y = cos(2(x - ?/8)) to go through one period the expressions 2(x - ?/8) will have to be as follows

0 ? 2(x - ?/8)? 2 ?

divide all terms by 2

0 ? x - ?/8 ? ?

add ?/8 to all terms

?/8 ? x ? ? + ?/8, this is the interval over one period to be used to graph y = cos(2 x - ?/4)

When we compare the interval of one period for cos(2 x) which is 0 ? x ? ? and the interval for one period of cos(2(x - ?/8)) which is ?/8 ? x ? ? + ?/8, the only difference is the
phase shift to the right by ?/8

- c / b. If the phase shift is positive the shift is to right and if it is negative, the shift is to the left.

We construct the table of values as follows:

We have seen above that in this example one period starts from x = ?/8 and finishes at x = ? + ?/8 = 9?/8. Hence we start the table using these two points.

We next find the mid value between x = ?/8 and x = 9?/8 , calculated as follows: (1/2)(?/8 + 9?/8) = 5 ?/8 and put it in the table

We next find the mid value between x = ?/8 and 5 ?/8 calculated as follows: (1/2)(?/8 + 5?/8) = 3 ?/8 ; and the mid value between 5 ?/8 and 9?/8 calculated as follows (1/2)(5?/8 + 9?/8) = 7 ?/8 and put all these in the table as follows

We have split the one period interval into 4 equal intervals and these make it easy to evaluate the given function y = sin(2x) which will have the same maximum, minimum values at similar position but within the interval ?/8 , 9?/8. We now complete the table by putting the values of the function.

The graph of y = cos(2 x - ?/4) (blue) is compared to the graph of cos(2 x) (red). They are similar except for the shift of ?/8 the right.

Example 7

Find the period and phase shift of the function y = sin(3 x + ?/3) and graph it.

Solution to Example 7

The period is given by: 2?/|b| = 2?/ 3

The phase shift is calculated as follows

- c / b = - ( ?/3) / 3 = - ?/9

We expect the graph of y = sin(3 x + ?/3) to be the graph of y = sin(3 x) shifted by ?/9 to the left because of the minus sign in the phase shift.

For the function y = sin(3 x + ?/3) to go through one period the expression 3 x + ?/3 will have to be as follows

0 ? 3 x + ?/3 ? 2 ?

Solve the above inequality for x to obtain the interval corresponding to one period.

- ?/9 ? x ? 5?/9

Find the mid values as was done in example 6 and complete the table of values.

The graph of the given function y = sin(3 x + ?/3) (blue) is compared to the graph of sin(3 x) (red). They are similar except for the shift of ?/9 to the left.

Example 8

Find the range, period and phase shift of the function y = cos(2 x - ?/4) and graph it.

Solution to Example 8

We know that the range of sin(2 x - ?/5) is given by the interval [-1 , 1] or as an inequality we write

- 1 ? sin(2 x - ?/5) ? 1

Multiply all terms of the inequality by - 2 and change the symbols of inequality

2 ? - 2 sin(2 x - ?/5) ? - 2

Add + 1 to all terms of the inequality and rewrite as

- 2 + 1 ? -2 sin(2 x - ?/5) + 1 ? 2 + 1

Which gives the range of the given function as

- 1 ? -2 sin(2 x - ?/5) + 3 ? 3

[ - |a| + d , |a| + d ] or in inequality form - |a| + d ? y ? |a| + d

The period is given by

2?/|b| = 2?/|2| = ?

The phase shift is given by

- c / b = - (- ?/5) / 2 = ?/10

To graph y = - 2 sin(2 x - ?/5) + 1 over one period the expression (2 x - ?/5) has to go through one period as follows

0 ? (2 x - ?/5) ? 2?

Solve the above inequality to obtain

?/10 ? x ? 11?/10

Use the lowest value ?/10 and the highest value 11?/10 in the above inequality (which gives a period) to construct a table of values by splitting the period into 4 equal intervals as follows

It is important to note that the graph over one period is inscribed inside a rectangle of length from ?/10 to 11?/10 which the interval over one period found above by solving the inequality 0 ? (2 x - ?/5) ? 2? and a width from the minimum and the maximum (range) values of y = - 2 sin(2 x - ?/5) + 1 equal to -2 + 1 = - 1 and 2 + 1 = 3 which is the range already found in the table.

Example 9

Graph the function y = cos(2 x - ?/4) over one period.

Solution to Example 9

In example 8 above, we saw that the graph over one period is inscribed within a rectangle of length the starting point and finishing point of one period found by solving the inequality

0 ? 2 x + 4?/3 ? 2?

Which gives

- 4?/6 ? x ? 2?/6

and width given by the range of y = 2 cos(2 x + 4?/3) - 2 which is given by the interval (see formula given above)

[ - |a| + d , |a| + d ] = [ - 2 - 2 , 2 + 2 ] = [ - 4 , 0] or in inequality form - 4 ? y ? 0

A table of values is constructed using the the starting and finishing point - 4?/6 and 2?/6 found above and splitting the period into 4 equal intervals and the mid values. Then the values of the function whose range is already known are easily determined over one period.

The graph of y = 2 cos(2 x + 4?/3) - 2 is shown below over one period from - 4?/6 to 2?/6. Note again the rectangle determined above.

For each function find the starting and finishing x values over one period, the range and Graph it over one period.

1) y = (1/2) cos(3x - ?/6) + 1

2) y = - sin(0.5 x + ?/6) - 1

1) one period : ?/18 ? x ? 13?/18 , range : [1/2 , 3/2] . See graph below

2) one period : - ?/3 ? x ? 11?/3 , range : [ - 1/2 , - 3/2] . See graph below
sine function

cosine function

unit circle

angle standard position

range of sin(x)

period of trigonometric functions

phase shift of a sine function

Properties of The Six Trigonometric Functions