Graphs of the sine and the cosine functions of the form \[ \Large \mathbf { \color{red}{ y = a \sin(b x + c) + d}} \] and \[ \Large \mathbf { \color{red}{ 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.
Find the range and the period of the function \( y = \sin(x) \) and graph it.
\( 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] \; \text{or in inequality form} \; -1 \leq \sin(x) \leq 1 \]
One cycle of \( \sin(x) \) may start at \( x = 0 \) and finish at \( x = 2\pi \) 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\pi \).
We need values of \( \sin(x) \) for different values of \( x \) in order to graph it. We shall use the y coordinate ( which gives \( \sin(x) \) ) of the same 5 quadrantal angles corresponding to the variable \( x (0 ,\dfrac{\pi}{2}, \pi, \dfrac{3\pi}{2}, 2\pi) \) of which 3 values \( (0 , \pi , 2 \pi) \) are zeros of \( \sin(x) \), one value \( (\dfrac{\pi}{2}) \) gives a maximum value to \( \sin(x) \) and one value \( ( \dfrac{3\pi}{2} ) \) gives a minimum value to \( \sin(x) \) as shown in the table below.
\[
\begin{array}{|c|c|c|}
\hline
x & y = \sin(x) \\
\hline
0 & 0 \\
\dfrac{\pi}{2} & 1\\
\pi & 0 \\
3\dfrac{\pi}{2} & -1 \\
2 \pi & 0 \\
\hline
\end{array}
\]
The graph of \( y = \sin(x) \) is shown below over one period from \( 0 \) to \( 2\pi \) (solid line) and other periods (broken line).
From the unit circle we can conclude the following:
The range of \( \cos(x) \) is the set of all values in the interval \([-1 , 1]\) in inequality form: \[ -1 \leq \cos(x) \leq 1 \]
One cycle of \( \cos(x) \) may start at \( x = 0 \) and finish at \( x = 2\pi \), after which rotation the value of \( \cos(x) \) is repeated periodically as shown in the unit circle. We therefore conclude that \( \cos(x) \) has a period equal to \( 2\pi \).
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 , \dfrac{\pi}{2}, \pi, \dfrac{3\pi}{2}, \text{ and } 2\pi \). Of these, two values (\( 0 , 2\pi \)) give the maximum value \( 1 \) of \( \cos(x) \), two values \( \dfrac{\pi}{2} \) and \( \dfrac{3\pi}{2} \) give zeros of \( \cos(x) \), and one value \( \pi \) gives a minimum value to \( \cos(x) \), as shown in the table below.
\[ \begin{array}{|c|c|c|} \hline x & y = \cos(x) \\ \hline 0 & 1 \\ \dfrac{\pi}{2} & 0 \\ \pi & -1 \\ 3\dfrac{\pi}{2} & 0 \\ 2 \pi & 1 \\ \hline \end{array} \] The graph of \( \cos(x) \) is shown below over one period from \( 0 \) to \( 2\pi \) (solid line) and more periods (broken line).
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 \leq -2 \cos(x) \leq 2 \)
The graph of \( -2 \cos(x) \) is shown below over one period from \( 0 \) to \( 2\pi \) (blue solid line) compared to \( y = \cos(x) \) (red) and we can see that there is a stretching of factor 2 and reflection.
Explanation For the function \( y =\sin(2 x) \) to go through one period, \( 2 x \) will have to be as follows \[0 \leq 2x \leq 2\pi \] divide by \( 2 \) all terms of the above inequality, we obtain \[ 0 \leq x \leq \pi \] this is the interval over one period to be used to graph \( y =\sin(2 x) \) Hence the period of \( \sin(2x) \) is gibven by \[ \pi - 0 = \pi \]
The values of \( x = 0, \pi , \pi/4 , \pi/2 , 3\pi/4 \) split the period into 4 equal intervals.
\[
\begin{array}{|c|c|c|}
\hline
x & y = \sin(2 x) \\
\hline
0 & 1\\
\dfrac{\pi}{4} & 1 \\
\dfrac{\pi}{2} & 0 \\
3\dfrac{\pi}{4} & -1\\
\pi & 0\\
\hline
\end{array}
\]
The graph of \( y = \sin(2 x) \) is shown below over one period from \( 0 \) to \( \pi \) (blue solid line) compared to \( y =\sin(x) \) which has a period of \( 2\pi \) (red).
For the function \( y = \cos\left(2(x - \dfrac{\pi}{8})\right) \) to go through one period the expression \( 2(x - \dfrac{\pi}{8}) \) will have to be as follows: \[ 0 \leq 2(x - \dfrac{\pi}{8}) \leq 2\pi \] Divide all terms by 2 \[ 0 \leq x - \dfrac{\pi}{8} \leq \pi \] Add \( \dfrac{\pi}{8} \) to all terms \[ \dfrac{\pi}{8} \leq x \leq \pi + \dfrac{\pi}{8} \] This is the interval over one period to be used to graph \( y = \cos\left(2x - \dfrac{\pi}{4}\right) \)
When we compare the interval of one period for \( \cos(2x) \) which is \[ 0 \leq x \leq \pi \] and the interval for one period of \( \cos\left(2(x - \dfrac{\pi}{8})\right) \) which is \[ \dfrac{\pi}{8} \leq x \leq \pi + \dfrac{\pi}{8} \] the only difference is the phase shift to the right by \( \dfrac{\pi}{8} \)
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 have seen above that in this example one period starts from \( x = \dfrac{\pi}{8} \) and finishes at \( x = \pi + \dfrac{\pi}{8} = \dfrac{9\pi}{8}\) Hence we start the table using these two points.
We next find the mid value between \( x = \pi/8 \) and \( x = 9\pi/8 \), calculated as follows: \[ \dfrac{1}{2} \left( \dfrac{\pi}{8} + \dfrac{9\pi}{8} \right) = \dfrac{5\pi}{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 next find the mid value between \( x = \dfrac{\pi}{8} \) and \( \dfrac{5\pi}{8} \) calculated as follows: \[ \dfrac{1}{2} \left( \dfrac{\pi}{8} + \dfrac{5\pi}{8} \right) = \dfrac{3\pi}{8} \] and the mid value between $\dfrac{5\pi}{8}$ and $\dfrac{9\pi}{8}$ calculated as follows \[ \dfrac{1}{2} \left( \dfrac{5\pi}{8} + \dfrac{9\pi}{8} \right) = \dfrac{7\pi}{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 \( \dfrac{\pi}{8} , \dfrac{9\pi}{8} \). We now complete the table by putting the values of the function.
The graph of \( y = \cos(2 x - \dfrac{\pi}{4}) \) (blue) is compared to the graph of \(\cos(2 x) \) (red). They are similar except for the shift of \( \dfrac{\pi}{8} \) the right.
The phase shift is calculated as follows \[ \dfrac{-c}{b} = \dfrac{-\pi/3}{3} = \dfrac{-\pi}{9} \] We expect the graph of \( y = \sin(3x + \dfrac{\pi}{3}) \) to be the graph of \( y = \sin(3x) \) shifted by \( \dfrac{\pi}{9} \) to the left because of the minus sign in the phase shift.
For the function \( y = \sin(3x + \dfrac{\pi}{3}) \) to go through one period the expression \( 3x + \dfrac{\pi}{3} \) will have to be as follows \[ 0 \leq 3x + \dfrac{\pi}{3} \leq 2\pi \] Solve the above inequality for \( x \) to obtain the interval corresponding to one period. \[ -\dfrac{\pi}{9} \leq x \leq \dfrac{5\pi}{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 + \dfrac{\pi}{3}) \) (blue) is compared to the graph of \(\sin(3 x) \) (red). They are similar except for the shift of \( \dfrac{\pi}{9} \) to the left.
It is important to note that the graph over one period is inscribed inside a rectangle of length from \( \dfrac{\pi}{10} \) to \( 11\dfrac{\pi}{10} \) which the interval over one period found above by solving the inequality \( 0 \leq (2x - \pi/5) \leq 2\pi \) and a width from the minimum and the maximum (range) values of \( y = - 2\sin(2 x - \dfrac{\pi}{5}) + 1 \) equal to \( -2 + 1 = - 1 \) and \( 2 + 1 = 3 \) which is the range already found in the table.
For the function given below, find the starting and finishing x values over one period, the range and Graph it over one period. \[ y = \dfrac{1}{2} \cos\left(3x - \dfrac{\pi}{6}\right) + 1 \]
one period : \( \dfrac{\pi}{18} \leq x \leq \dfrac{13\pi}{18} \) , range : \( [1/2 , 3/2] \) . See graph below