- Graph transformations of y=tan x and y=cot x.
- Determine a function formula from a tangent or cotangent graph.
- Graph transformations of y=sec x and y=csc x.
- Determine a function formula from a secant or cosecant graph.
Analyzing the Graph of y = tan x and Its Variations
We will begin with the graph of the tangent function, plotting points as we did for the sine and cosine functions. Recall that
The period of the tangent function is π because the graph repeats itself on intervals of kπ where k is a constant. If we graph the tangent function on [latex]−\dfrac{\pi}{2}\text{ to }\dfrac{\pi}{2}[/latex], we can see the behavior of the graph on one complete cycle. If we look at any larger interval, we will see that the characteristics of the graph repeat.
We can determine whether tangent is an odd or even function by using the definition of tangent.
[latex]\begin{align}\tan(−x)&=\frac{\sin(−x)}{\cos(−x)} && \text{Definition of tangent.} \\ &=\frac{−\sin x}{\cos x} && \text{Sine is an odd function, cosine is even.} \\ &=−\frac{\sin x}{\cos x} && \text{The quotient of an odd and an even function is odd.} \\ &=−\tan x && \text{Definition of tangent.} \end{align}[/latex]
Therefore, tangent is an odd function. We can further analyze the graphical behavior of the tangent function by looking at values for some of the special angles, as listed in the table below.
| x | [latex]-\frac{\pi}{6}[/latex] | [latex]-\frac{\pi}{3}[/latex] | [latex]-\frac{\pi}{4}[/latex] | [latex]-\frac{\pi}{6}[/latex] | 0 | [latex]\frac{\pi}{6}[/latex] | [latex]\frac{\pi}{4}[/latex] | [latex]\frac{\pi}{3}[/latex] | [latex]\frac{\pi}{2}[/latex] |
| tan (x) | undefined | [latex]−\sqrt{3}[/latex] | –1 | [latex]−\dfrac{\sqrt{3}}{3}[/latex] | 0 | [latex]\dfrac{\sqrt{3}}{3}[/latex] | 1 | [latex]\sqrt{3}[/latex] | undefined |
These points will help us draw our graph, but we need to determine how the graph behaves where it is undefined. If we look more closely at values when [latex]\frac{\pi}{3}
| x | 1.3 | 1.5 | 1.55 | 1.56 |
| tan x | 3.6 | 14.1 | 48.1 | 92.6 |
As x approaches [latex]\frac{\pi}{2}[/latex], the outputs of the function get larger and larger. Because [latex]y=\tan x[/latex] is an odd function, we see the corresponding table of negative values in the table below.
| x | −1.3 | −1.5 | −1.55 | −1.56 |
| tan x | −3.6 | −14.1 | −48.1 | −92.6 |
We can see that, as x approaches [latex]−\dfrac{\pi}{2}[/latex], the outputs get smaller and smaller. Remember that there are some values of x for which cos x = 0. For example, [latex]\cos\left(\frac{\pi}{2}\right)=0[/latex] and [latex]\cos\left(\frac{3\pi}{2}\right)=0[/latex]. At these values, the tangent function is undefined, so the graph of [latex]y=\tan x[/latex] has discontinuities at [latex]x=\frac{\pi}{2}[/latex] and [latex]\frac{3\pi}{2}[/latex]. At these values, the graph of the tangent has vertical asymptotes. The tangent is positive from 0 to [latex]\frac{\pi}{2}[/latex] and from π to [latex]\frac{3\pi}{2}[/latex], corresponding to quadrants I and III of the unit circle.

As with the sine and cosine functions, the tangent function can be described by a general equation.
We can identify horizontal and vertical stretches and compressions using values of A and B. The horizontal stretch can typically be determined from the period of the graph. With tangent graphs, it is often necessary to determine a vertical stretch using a point on the graph.
Because there are no maximum or minimum values of a tangent function, the term amplitude cannot be interpreted as it is for the sine and cosine functions. Instead, we will use the phrase stretching/compressing factor when referring to the constant A.
features of the graph of y = Atan(Bx)
- The stretching factor is |A| (tangent does not have an amplitude)
- The period is [latex]P=\frac{\pi}{|B|}[/latex].
- The domain is all real numbers x, where [latex]x\ne \frac{\pi}{2|B|} + \frac{\pi}{|B|} k[/latex] such that k is an integer.
- The range is [latex]\left(-\infty,\infty\right)[/latex].
- The asymptotes occur at [latex]x=\frac{\pi}{2|B|} + \frac{\pi}{|B|}k[/latex], where k is an integer.
- [latex]y = A \tan (Bx)[/latex] is an odd function.
Graphing One Period of a Stretched or Compressed Tangent Function
We can use what we know about the properties of the tangent function to quickly sketch a graph of any stretched and/or compressed tangent function of the form [latex]f(x)=A\tan(Bx)[/latex]. We focus on a single period of the function including the origin, because the periodic property enables us to extend the graph to the rest of the function’s domain if we wish. Our limited domain is then the interval [latex](−\frac{P}{2}, \frac{P}{2})[/latex] and the graph has vertical asymptotes at [latex]\pm \frac{P}{2}[/latex] where [latex]P=\frac{\pi}{B}[/latex]. On [latex](−\dfrac{\pi}{2}, \dfrac{\pi}{2})[/latex], the graph will come up from the left asymptote at [latex]x=−\dfrac{\pi}{2}[/latex], cross through the origin, and continue to increase as it approaches the right asymptote at [latex]x=\frac{\pi}{2}[/latex]. To make the function approach the asymptotes at the correct rate, we also need to set the vertical scale by actually evaluating the function for at least one point that the graph will pass through. For example, we can use
because [latex]\tan\left(\frac{\pi}{4}\right)=1[/latex].
- Identify the stretching factor, |A|.
- Identify B and determine the period, [latex]P=\frac{\pi}{|B|}[/latex].
- Draw vertical asymptotes at [latex]x=−\dfrac{P}{2}[/latex] and [latex]x=\frac{P}{2}[/latex].
- For A > 0 , the graph approaches the left asymptote at negative output values and the right asymptote at positive output values (reverse for A < 0 ).
- Plot reference points at [latex]\left(\frac{P}{4},A\right)[/latex] (0, 0), and ([latex]−\dfrac{P}{4}[/latex],− A), and draw the graph through these points.
Sketch a graph of [latex]f(x)=3\tan\left(\frac{\pi}{6}x\right)[/latex].

