Graphing Tangent Functions
A step by step tutorial on graphing and sketching tangent functions. The graph, domain, range and vertical asymptotes of these functions and other properties are examined.
Review
Some of the properties of the graph of \( f(x) = \tan (x) \) are as follows:
1 - The domain of \( \tan (x) \) is the set of all the real numbers except at \( x = \dfrac{\pi}{2} + n \times \pi \) , where \( n \) is any integer number.
2 - The range of \( \tan (x) \) s the set of all real numbers.
3 - The vertical asymptotes of the graph of \( \tan (x) \) are located at \( x = \dfrac{\pi}{2} + n \times \pi \) where \( n \) is any integer.
4 - The period of \( \tan (x) \) is equal to \( \pi \).
Example 1
Graph
\[ f( x ) = \tan(x) \]
Over one period.
Solution to Example 1
The function \( \tan x \) is undefined for values of \( x \) equal to \( \frac{\pi}{2} \) and \( -\frac{\pi}{2} \). However, we need to understand the behavior of the graph of \( \tan x \) as \( x \) approaches \( \frac{\pi}{2} \) and \( -\frac{\pi}{2} \).
Let us look at the values of \( \tan x \) for \( x \) close to \( \frac{\pi}{2} \) such that \( x \) is smaller than \( \frac{\pi}{2} \).
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\textbf{x} & \frac{\pi}{2} - 0.5 & \frac{\pi}{2} - 0.1 & \frac{\pi}{2} - 0.01 & \frac{\pi}{2} - 0.001 & \frac{\pi}{2} \\
\hline
\textbf{tan}\,x & 1.8 & 10.0 & 100.0 & 1000.0 & \text{undefined} \\
\hline
\end{array}
\]
We note that as \( x \) approaches \( \frac{\pi}{2} \) from the left (by values smaller than \( \frac{\pi}{2} \)), \( \tan(x) \) increases indefinitely. We say that the graph of \( \tan(x) \) has an vertical asymptote at \( x = \frac{\pi}{2} \). It is represented by a vertical broken red line \( x = \frac{\pi}{2} \) in the graph below.
We now look at the values of \( \tan x \) for \( x \) close to \( -\frac{\pi}{2} \) such that \( x \) is larger than \( -\frac{\pi}{2} \).
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\mathbf{x} & -\frac{\pi}{2} + 0.5 & -\frac{\pi}{2} + 0.1 & -\frac{\pi}{2} + 0.01 & -\frac{\pi}{2} + 0.001 & -\frac{\pi}{2} \\
\hline
\tan x & -1.8 & -10.0 & -100.0 & -1000.0 & \text{undefined} \\
\hline
\end{array}
\]
We note that as \( x \) approaches \( -\frac{\pi}{2} \) from the right (by values larger than \( -\frac{\pi}{2} \)), \( \tan x \) decreases indefinitely. The graph of \( \tan x \) has a vertical asymptote at \( x = -\frac{\pi}{2} \). It is represented by a vertical broken red line \( x = -\frac{\pi}{2} \) in the graph below.
\( \tan x \) has an asymptotic behavior close to \( \frac{\pi}{2} \) and \( -\frac{\pi}{2} \). Using the values of \( \tan x \) above plus the following values:
\( \tan 0 = 0 \), \( \tan \left(\frac{\pi}{4}\right) = 1 \), and \( \tan \left(-\frac{\pi}{4}\right) = -1 \),
we start by plotting the points \( (0, 0) \), \( \left(\frac{\pi}{4}, 1\right) \), and \( \left(-\frac{\pi}{4}, -1\right) \) and the vertical asymptotes.
We then draw a smooth curve passing through the points calculated. Close to the vertical asymptotes, the graph either goes upward indefinitely (close to \(x = \frac{\pi}{2}\) vertical asymptote) and downward indefinitely (close to \(x = -\frac{\pi}{2}\) vertical asymptote).
We now summarize the graphing of \( \tan x \) as follows:
Step 1: Make a table of values over one period.
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
x & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 & \frac{\pi}{4} & \frac{\pi}{2} \\
\hline
\tan x & \text{VA} & -1.0 & 0.0 & 1.0 & \text{VA} \\
\hline
\end{array}
\]
where VA means vertical asymptote.
Step 2: Plot the points and the vertical asymptotes.
Step 3: Draw a curve passing through all points and rising or falling vertically along the vertical asymptotes.
Example 2
Graph function \( f \) given by
\[ f( x ) = 2 \tan(2 x - \dfrac{\pi}{4} ) \]
Over one period.
Solutionto Example 2
Let \( t = 2x - \frac{\pi}{4} \). Let us make a table over one period \( \left( -\frac{\pi}{2}, \frac{\pi}{2} \right) \) using the variable \( t \).
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\mathbf{t} & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 & \frac{\pi}{4} & \frac{\pi}{2} \\
\hline
\mathbf{2 \tan t} & \text{VA} & -2.0 & 0.0 & 2.0 & \text{VA} \\
\hline
\end{array}
\]
We now use the relationship between \( x \) and \( t \), \( t = 2x - \frac{\pi}{4} \), to find the values of \( x \) corresponding to the values of \( t \) used in the above table. Solve \( t = 2x - \frac{\pi}{4} \) for \( x \).
\[
x = \frac{t}{2} + \frac{\pi}{8}
\]
A row showing the \( x \)-values may be added to the above table: These values of \( x \) have been found using \( x = \frac{t}{2} + \frac{\pi}{8} \) and the values of \( t \) in the table.
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\mathbf{t} & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 & \frac{\pi}{4} & \frac{\pi}{2} \\
\hline
\mathbf{2\tan t} & \text{VA} & -2.0 & 0.0 & 2.0 & \text{VA} \\
\hline
\mathbf{x} & -\frac{\pi}{8} & 0 & \frac{\pi}{8} & \frac{2\pi}{8} & \frac{3\pi}{8} \\
\hline
\end{array}
\]
We now have the values of the function \( 2 \tan t \) and the corresponding \( x \) values. We have enough information to graph the given function.
Example 3
Graph function \( f \) defined by
\[ f( x ) = - \tan(x + \frac{\pi}{2}) \]
Over one period.
Solutionto Example 3
Let \( t = x + \frac{\pi}{2} \). We first make a table using \( t \) over one period.
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\mathbf{t} & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 & \frac{\pi}{4} & \frac{\pi}{2} \\
\hline
-\tan t & \text{VA} & 1.0 & 0.0 & -1.0 & \text{VA} \\
\hline
\end{array}
\]
Solve \( t = x + \frac{\pi}{2} \) for \( x \).
\[
x = t - \frac{\pi}{2}
\]
A row showing the \( x \) values is added to the above table.
\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\mathbf{t} & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 & \frac{\pi}{4} & \frac{\pi}{2} \\
\hline
\mathbf{-\tan t} & \text{VA} & 1.0 & 0.0 & -1.0 & \text{VA} \\
\hline
\mathbf{x} & -\pi & -\frac{3\pi}{4} & -\frac{\pi}{2} & -\frac{\pi}{4} & 0 \\
\hline
\end{array}
\]
We now have the values of the function \( - \tan t \) and the corresponding \( x \) values.
More References and Links to Graphing