5.1: Graphing the Trigonometric Functions
- Page ID
- 3335
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)The first function we will graph is the sine function. We will describe a geometrical way to create the graph, using the unit circle. This is the circle of radius \(1 \) in the \(xy\)-plane consisting of all points \((x,y) \) which satisfy the equation \(x^2 + y^2 = 1 \).
![alt](https://math.libretexts.org/@api/deki/files/2155/5.1.1.png?revision=1)
We see in Figure 5.1.1 that any point on the unit circle has coordinates \((x,y)=(\cos\;\theta,\sin\;\theta) \), where \(\theta \) is the angle that the line segment from the origin to \((x,y) \) makes with the positive \(x\)-axis (by definition of sine and cosine). So as the point \((x,y) \) goes around the circle, its \(y\)-coordinate is \(\sin\;\theta \).
We thus get a correspondence between the \(y\)-coordinates of points on the unit circle and the values \(f(\theta)=\sin\;\theta \), as shown by the horizontal lines from the unit circle to the graph of \(f(\theta)=\sin\;\theta \) in Figure 5.1.2 for the angles \(\theta = 0 \), \(\tfrac{\pi}{6} \), \(\tfrac{\pi}{3} \), \(\tfrac{\pi}{2} \).
![alt](https://math.libretexts.org/@api/deki/files/2156/5.1.2.png?revision=1)
We can extend the above picture to include angles from \(0 \) to \(2\pi \) radians, as in Figure 5.1.3. This illustrates what is sometimes called the unit circle definition of the sine function.
![alt](https://math.libretexts.org/@api/deki/files/2157/5.1.3.png?revision=1)
Since the trigonometric functions repeat every \(2\pi \) radians (\(360^\circ\)), we get, for example, the following graph of the function \(y=\sin\;x \) for \(x \) in the interval \([-2\pi , 2\pi]\):
![alt](https://math.libretexts.org/@api/deki/files/2158/5.1.4.png?revision=1)
To graph the cosine function, we could again use the unit circle idea (using the \(x\)-coordinate of a point that moves around the circle), but there is an easier way. Recall from Section 1.5 that \(\cos\;x = \sin\;(x+90^\circ) \) for all \(x \). So \(\cos\;0^\circ \) has the same value as \(\sin\;90^\circ \), \(\cos\;90^\circ \) has the same value as \(\sin\;180^\circ \), \(\cos\;180^\circ \) has the same value as \(\sin\;270^\circ \), and so on. In other words, the graph of the cosine function is just the graph of the sine function shifted to the left by \(90^\circ = \pi/2 \) radians, as in Figure 5.1.5:
![alt](https://math.libretexts.org/@api/deki/files/2159/5.1.5.png?revision=1)
To graph the tangent function, use \(\tan\;x = \frac{\sin\;x}{\cos\;x} \) to get the following graph:
![alt](https://math.libretexts.org/@api/deki/files/2160/5.1.6.png?revision=1)
Recall that the tangent is positive for angles in QI and QIII, and is negative in QII and QIV, and that is indeed what the graph in Figure 5.1.6 shows. We know that \(\tan\;x \) is not defined when \(\cos\;x = 0 \), i.e. at odd multiples of \(\frac{\pi}{2}\): \(x=\pm\,\frac{\pi}{2} \), \(\pm\,\frac{3\pi}{2} \), \(\pm\,\frac{5\pi}{2} \), etc. We can figure out what happens near those angles by looking at the sine and cosine functions. For example, for \(x \) in QI near \(\frac{\pi}{2} \), \(\sin\;x \) and \(\cos\;x \) are both positive, with \(\sin\;x \) very close to \(1 \) and \(\cos\;x \) very close to \(0 \), so the quotient \(\tan\;x = \frac{\sin\;x}{\cos\;x} \) is a positive number that is very large. And the closer \(x \) gets to \(\frac{\pi}{2} \), the larger \(\tan\;x \) gets. Thus, \(x=\frac{\pi}{2} \) is a vertical asymptote of the graph of \(y=\tan\;x \).
Likewise, for \(x \) in QII very close to \(\frac{\pi}{2} \), \(\sin\;x \) is very close to \(1 \) and \(\cos\;x\) is negative and very close to \(0 \), so the quotient \(\tan\;x = \frac{\sin\;x}{\cos\;x} \) is a negative number that is very large, and it gets larger in the negative direction the closer \(x \) gets to \(\frac{\pi}{2} \). The graph shows this. Similarly, we get vertical asymptotes at \(x=-\frac{\pi}{2} \), \(x=\frac{3\pi}{2} \), and \(x=-\frac{3\pi}{2} \), as in Figure 5.1.6. Notice that the graph of the tangent function repeats every \(\pi \) radians, i.e. two times faster than the graphs of sine and cosine repeat.
The graphs of the remaining trigonometric functions can be determined by looking at the graphs of their reciprocal functions. For example, using \(\csc\;x = \frac{1}{\sin\;x} \) we can just look at the graph of \(y=\sin\;x \) and invert the values. We will get vertical asymptotes when \(\sin\;x=0 \), namely at multiples of \(\pi\): \(x=0 \), \(\pm\,\pi \), \(\pm\,2\pi \), etc. Figure 5.1.7 shows the graph of \(y=\csc\;x \), with the graph of \(y=\sin\;x \) (the dashed curve) for reference.
![alt](https://math.libretexts.org/@api/deki/files/2161/5.1.7.png?revision=1)
Likewise, Figure 5.1.8 shows the graph of \(y=\sec\;x \), with the graph of \(y=\cos\;x \) (the dashed curve) for reference. Note the vertical asymptotes at \(x=\pm\,\frac{\pi}{2} \), \(\pm\,\frac{3\pi}{2} \). Notice also that the graph is just the graph of the cosecant function shifted to the left by \(\frac{\pi}{2} \) radians.
![alt](https://math.libretexts.org/@api/deki/files/2162/5.1.8.png?revision=1)
The graph of \(y=\cot\;x \) can also be determined by using \(\cot\;x = \frac{1}{\tan\;x} \). Alternatively, we can use the relation \(\cot\;x = -\tan\;(x+90^\circ) \) from Section 1.5, so that the graph of the cotangent function is just the graph of the tangent function shifted to the left by \(\frac{\pi}{2}\) radians and then reflected about the \(x\)-axis, as in Figure 5.1.9:
![alt](https://math.libretexts.org/@api/deki/files/2163/5.1.9.png?revision=1)
Draw the graph of \(y=-\sin\;x \) for \(0 \le x \le 2\pi \).
Solution:
Multiplying a function by \(-1 \) just reflects its graph around the \(x\)-axis. So reflecting the graph of \(y=\sin\;x \) around the \(x\)-axis gives us the graph of \(y=-\sin\;x\):
\noindent Note that this graph is the same as the graphs of \(y=\sin\;(x \pm \pi) \) and \(y=\cos\;(x+\frac{\pi}{2}) \).
It is worthwhile to remember the general shapes of the graphs of the six trigonometric functions, especially for sine, cosine, and tangent. In particular, the graphs of the sine and cosine functions are called sinusoidal curves. Many phenomena in nature exhibit sinusoidal behavior, so recognizing the general shape is important.
Draw the graph of \(y=1+\cos\;x \) for \(0 \le x \le 2\pi \).
Solution
Adding a constant to a function just moves its graph up or down by that amount, depending on whether the constant is positive or negative, respectively. So adding \(1 \) to \(\cos\;x \) moves the graph of \(y=\cos\;x \) upward by \(1 \), giving us the graph of \(y=1+\cos\;x\):