Consider the graph of \(y=\cos (x)\) shown at left below.
When \(x=\dfrac{-\pi}{2},~\dfrac{\pi}{2}\) and \(\dfrac{3\pi}{2},~ \cos (x)=0\text{,}\) so \(\sec (x)\) is undefined at these \(x\)-values, and we insert vertical asymptotes at those \(x\)-values to start our graph of \(y=\sec (x)\text{,}\) as shown at right below.
To find some points on the graph, we look at points on the graph of \(y=\cos (x)\text{.}\) At each \(x\)-value, the \(y\)-coordinate of the point on the graph of \(y=\sec (x)\) is the reciprocal of \(\cos (x)\text{.}\)
For example, at \(x=0\) and \(x=2\pi\text{,}\) we have \(\cos (x) = 1\text{,}\) so \(\sec (x) = \frac{1}{1} = 1\text{.}\) Thus, we plot the points \((0,1)\) and \((2\pi,1)\) on the graph of \(f(x)=\sec (x)\text{.}\) Similarly, at \(x=-\pi\) and \(x=\pi\text{,}\) \(\cos (x) = -1\text{,}\) so the value of \(\sec (x)\) is \(\frac{1}{-1} = -1\text{,}\) and we plot the points \((-\pi,-1)\) and \((\pi,-1)\) on the graph of \(f(x)=\sec (x)\text{.}\)
Finally, we notice that the values of \(\cos (x)\) are decreasing toward \(0\) as \(x\) increases from \(0\) to \(\dfrac{\pi}{2}\text{,}\) so the graph of \(f(x)=\sec (x)\) increases toward \(\infty\) on the same interval.
By similar arguments, we fill in the graph of \(f(x)=\sec (x)\) between each of the vertical asymptotes, to produce the graph below.