topic badge

6.06 Graphing tangent functions

Introduction

Similarly to the sine and cosine functions, the tangent function is a periodic trigonometric function that can be related back to the unit circle and graphed on the coordinate plane. We will explore how the tangent function experiences transformations like other parent functions we've learned about.

Graphing the tangent function

Exploration

Explore the applet by dragging the slider.

Loading interactive...
  1. State the exact value of \tan \left( 60 \degree \right) based on your knowledge of the unit circle. Then, round the exact value to two decimal places and move the slider to 60 \degree. How is the point on the graph related to the unit circle?
  2. What happens to the graph of the function as \alpha gets closer to 90 \degree? How does this relate to the exact value of tangent on the unit circle as \alpha gets closer to 90 \degree?

Similarly to the graphs of sine and cosine, the graph of the tangent function is related to the exact values of tangent on the unit circle.

The tangent function, f \left( \theta \right)= \tan \theta, is a periodic function with a domain represented by the measure \theta of an angle in standard position, and a range, \tan \theta, the quotient of the x- and y-coordinates, \dfrac{y}{x}, of the right triangle positioned on the unit circle.

Because \tan{\theta}= \dfrac{\sin{\theta}}{\cos{\theta}}, the tangent function is undefined anywhere \cos{\theta}=0. This results in the tangent function being a discontinuous function with a period of \pi.

The graph of tangent plotted in a four quadrant coordinate plane. The x axis is labeled Midline. The part of the graph in the interval 0 to pi is labeled period. Speak to your teacher for more details.

Some of the key features of f \left( \theta \right)= \tan \theta are as follows:

  • Domain: x \neq \dfrac{\pi}{2} + n \pi, n is any integer
  • Range: \left( -\infty, \infty \right)
  • x-intercept: x=n \pi, n is any integer
  • y-intercept: y=0
  • Period: \pi
  • Amplitude: None
  • Midline: y=0

Examples

Example 1

Consider the function f \left( \theta \right) = \tan \theta.

a

Complete the table with values in exact form:

\theta0\dfrac{\pi}{4}\dfrac{\pi}{2}\dfrac{3 \pi}{4}\pi\dfrac{5 \pi}{4}\dfrac{3 \pi}{2}\dfrac{7 \pi}{4}2 \pi
\tan \theta
Worked Solution
Create a strategy

Since the function f \left( \theta \right)= \tan \theta is represented by the y-coordinate divided by the x-coordinate, \dfrac{y}{x} on the unit circle, we can use the ordered pairs at each angle on the unit circle to complete the table of values.

Apply the idea
\theta0\dfrac{\pi}{4}\dfrac{\pi}{2}\dfrac{3 \pi}{4}\pi\dfrac{5 \pi}{4}\dfrac{3 \pi}{2}\dfrac{7 \pi}{4}2 \pi
\tan \theta01\text{undefined}-101\text{undefined}-10
b

Sketch a graph for f \left( \theta \right) = \tan \theta on the domain [-2\pi, 2\pi].

Worked Solution
Create a strategy

Plot the points for [0, 2 \pi] using the table.

Then, we can work backwards along the unit circle to each negative value of \theta which is coterminal to a positive angle between 0 and 2 \pi and match the values of tangent or \dfrac{y}{x} from the unit circle.

Apply the idea
-\frac{7}{4}Ï€
-\frac{3}{2}Ï€
-\frac{5}{4}Ï€
-1Ï€
-\frac{3}{4}Ï€
-\frac{1}{2}Ï€
-\frac{1}{4}Ï€
\frac{1}{4}Ï€
\frac{1}{2}Ï€
\frac{3}{4}Ï€
1Ï€
\frac{5}{4}Ï€
\frac{3}{2}Ï€
\frac{7}{4}Ï€
x
-1
1
y

For the function from -2\pi to 0, \theta= \dfrac{-\pi}{4} is coterminal to \alpha= \dfrac{7 \pi}{4}, and since \tan \left( \dfrac{7\pi}{4} \right)=-1, \tan \left( \dfrac{-\pi}{4} \right) = -1 also. The following coterminal angles give the exact values:

\tan \left( \dfrac{-3\pi}{4} \right) = \sin \left( \dfrac{5\pi}{4} \right) = 1

\tan \left( - \pi \right) = \tan \left( \pi \right) = 0

\tan \left( \dfrac{-5 \pi}{4} \right) = \tan \left( \dfrac{3\pi}{4} \right) = -1

\tan \left( \dfrac{-7 \pi}{4} \right) = \tan \left( \dfrac{\pi}{4} \right) = 1

\tan \left( -2\pi \right) = \tan \left( 2 \pi \right) = 0

-\frac{7}{4}Ï€
-\frac{3}{2}Ï€
-\frac{5}{4}Ï€
-1Ï€
-\frac{3}{4}Ï€
-\frac{1}{2}Ï€
-\frac{1}{4}Ï€
\frac{1}{4}Ï€
\frac{1}{2}Ï€
\frac{3}{4}Ï€
1Ï€
\frac{5}{4}Ï€
\frac{3}{2}Ï€
\frac{7}{4}Ï€
x
-1
1
y

Example 2

Consider the graph of f \left( \theta \right) = \tan \theta:

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-4
-3
-2
-1
1
2
3
4
f \left( \theta \right)
a

Describe the behavior of the graph as \theta \to \dfrac{\pi}{2} from the left. Explain how this relates to the unit circle.

Worked Solution
Create a strategy

We know that the graph of the tangent function has no amplitude and we can use this to describe the behavior of the function.

Apply the idea

As \theta \to \dfrac{\pi}{2} from the left, the graph increases at an increasing rate and goes to \infty. There is a vertical asymptote at \theta=\dfrac{\pi}{2}, the function will approach but never intersect the line \theta=\dfrac{\pi}{2}, and will continue to increase forever.

This relates to the unit circle because the values of sine get closer to 1 and the values of cosine get closer to 0, as \theta approaches \dfrac{\pi}{2} from 0. Since \tan \theta = \dfrac{\sin \theta}{\cos \theta}, dividing 1 by smaller and smaller numbers results in the ratio becoming very large.

Eventually when \cos \theta = 0, tangent will be undefined, which appears as a vertical asymptote on the graph of the function.

b

Describe the behavior of the graph as \theta \to \pi from the left. Explain how this relates to the unit circle.

Worked Solution
Create a strategy

Use the x-intercepts of the tangent function occurring at multiples of \pi to describe the function's behavior.

Apply the idea

As \theta \to \pi from the left, the graph increases at a decreasing rate until it reaches 0.

This relates to the unit circle because the y-values (values of sine) get closer to 0 from the positive direction as the x-values (values of cosine) get closer to -1 from the positive direction. This means that tangent will go from being very large and negative to zero.

At \pi on the unit circle, the ordered pair is \left( -1, 0 \right), and we know that \tan \theta = \dfrac{y}{x}. At this point, tangent is equal to zero because \dfrac{y}{x}=\dfrac{0}{-1}.

c

Identify the positive and negative intervals on the graph of f \left( \theta \right) = \tan \theta over the domain [0, 2 \pi]. Explain how this relates to the unit circle.

Worked Solution
Create a strategy

After describing the key features of f \left( \theta \right)= \tan \theta, use the signs of ordered pairs in each quadrant on the coordinate plane and the points on the unit circle to relate the function to the unit circle.

A four quadrant coordinate plane with quadrants 1, 2, 3, and 4 labeled. In quadrant 1, the label positive x, positive y is shown; in quadrant 2, negative x, positive y; in quadrant 3, negative x, negative y; and in quadrant 4, positive x, negative y.
The unit circle in a coordinate plane with points (1,0), (0,1), (negative 1, 0), and (0, negative 1) shown. At (1,0), the labels 0 and 2 pi are shown, at (0,1), pi over 2, at (negative 1, 0), pi, and at (0, negative 1), 3 pi over 2.
Apply the idea

The positive intervals of f \left( \theta \right) = \tan \theta occur on \left(0, \dfrac{\pi}{2} \right) and \left( \pi, \dfrac{3 \pi}{2} \right).

The negative intervals of f \left( \theta \right) = \tan \theta occur on \left( \dfrac{\pi}{2}, \pi \right) and \left(\dfrac{3 \pi}{2}, 2 \pi \right).

Since \tan \theta= \dfrac{\sin \theta}{\cos \theta}, and the ordered pairs on the unit circle are \left( \cos \theta, \sin \theta \right), we can see that the sign of tangent is positive in the first and third quadrants where sine and cosine have the same sign, and these quadrants have the same intervals for the tangent function on the graph.

We can also see that the sign of tangent is negative in the second and fourth quadrants where sine and cosine have opposite signs, and these quadrants have the same intervals for the tangent function on the graph.

Idea summary

Because \tan{\theta}= \dfrac{\sin{\theta}}{\cos{\theta}}, the tangent function is undefined anywhere \cos{\theta}=0. This results in the tangent function being a discontinuous function with a period of \pi.

The graph of tangent plotted in a four quadrant coordinate plane. The x axis is labeled Midline. The part of the graph in the interval 0 to pi is labeled period. Speak to your teacher for more details.

Some of the key features of f \left( \theta \right)= \tan \theta are as follows:

  • Domain: x \neq \dfrac{\pi}{2} + n \pi, n is any integer
  • Range: \left( -\infty, \infty \right)
  • x-intercept: x=n \pi, n is any integer
  • y-intercept: y=0
  • Period: \pi
  • Amplitude: None
  • Midline: y=0

Transformations of the tangent function

Exploration

Explore the applet by moving the sliders and checking the boxes.

Loading interactive...
  1. Which sliders affect the position of the vertical asymptotes? Which ones do not?
  2. Which sliders translate the graph, leaving the shape unchanged? Which ones affect the size?
  3. Which sliders change the period of the graph? Which ones do not?
  4. Do any of these sliders affect the range of the graph? If so, which ones?

The graph of the tangent function can be transformed by adjusting its frequency and midline. Note that the tangent function does not have an amplitude because it does not have a maximum or minimum value. However, we can change the steepness of the function.

\displaystyle f \left( \theta \right)= a \tan \left[ b \left(\theta - c\right) \right] + d
\bm{a}
\left|a\right| >1 is a vertical stretch, \left|a\right| < 1 is a vertical compression, a < 0 is a reflection across the x-axis
\bm{b}
period is \dfrac{\pi}{|b|}, where \left|b\right| >1 is a horizontal compression, \left|b\right| < 1 is a horizontal stretch, {b < 0} is a reflection across the y-axis
\bm{c}
phase shift by c units
\bm{d}
vertical translation by d units

Examples

Example 3

Consider the transformed graph of f \left( \theta \right) = \tan \theta:

-1\pi
-\frac{3}{4}\pi
-\frac{1}{2}\pi
-\frac{1}{4}\pi
\frac{1}{4}\pi
\frac{1}{2}\pi
\frac{3}{4}\pi
1\pi
x
-5
-4
-3
-2
-1
1
2
3
4
5
y
a

The given graph is the result of what transformations on f \left( \theta \right) = \tan \theta?

Worked Solution
Create a strategy

Use the graph of f \left( \theta \right) = \tan \theta to identify changes to the function visually.

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-4
-3
-2
-1
1
2
3
4
f \left( \theta \right)
Apply the idea

The graph together with the y-intercept of f \left( \theta \right) = \tan \theta has been translated up by 4 units.

The period of the function has decreased from \pi to \dfrac{\pi}{2}, so the function is horizontally compressed by a factor of \dfrac{1}{2}.

b

State the equation of the graphed function.

Worked Solution
Create a strategy

Use the transformations stated in part (a) and apply them to the general form of the tangent function, f \left( \theta \right) = a \tan \left[b \left(\theta - c \right)\right] + d.

Apply the idea

The translation of 4 units up will change the value of d to 4. The horizontal compression from a period of \pi to \dfrac{\pi}{2} will change the value of b to 2. The equation of the function is f \left( \theta \right) = \tan 2 \theta + 4.

Reflect and check

We can choose a few strategic values of \theta such as \dfrac{\pi}{4} and \dfrac{\pi}{2} to confirm that they match the graph.

The function should be undefined when \theta = \dfrac{\pi}{4}. We can test the value of the graph algebraically:

\displaystyle f \left( \theta \right)\displaystyle =\displaystyle \tan 2 \theta + 4Given function
\displaystyle f \left( \dfrac{\pi}{4} \right) \displaystyle =\displaystyle \tan \left( 2 \cdot \dfrac{\pi}{4} \right) +4Substitute \dfrac{\pi}{4}
\displaystyle =\displaystyle \text{Error}Evaluate the function and addition

The function should be 4 when \theta = \dfrac{\pi}{2}. We can test the value of the graph algebraically:

\displaystyle f \left( \theta \right)\displaystyle =\displaystyle \tan 2 \theta + 4Given function
\displaystyle f \left( \dfrac{\pi}{2} \right) \displaystyle =\displaystyle \tan \left( 2 \cdot \dfrac{\pi}{2} \right) +4Substitute \dfrac{\pi}{2}
\displaystyle =\displaystyle 4Evaluate the function and addition

Algebraically, these values match what we see on the graph of the function, so we can confirm that the equation of the function is correct.

c

State the domain and range.

Worked Solution
Create a strategy

Start by considering the domain and range of the tangent function, then determine how the transformed function changes the domain and range:

  • Domain: x \neq \dfrac{\pi}{2} + n \pi, n is any integer
  • Range: \left( -\infty, \infty \right)
Apply the idea

The domain of the function excludes any values of x where the function would equal \pm\dfrac{\pi}{4},\,\pm\dfrac{3\pi}{4},\,\pm\dfrac{5\pi}{4}, etc. So, x \neq \dfrac{\pi}{4} + \dfrac{n \pi}{2}, where n is any integer. The range of the function remains the same, \left( -\infty, \infty \right).

Example 4

Consider the function f \left( \theta \right) = -\tan \left( \theta + \dfrac{\pi}{2} \right).

a

Graph the function over the domain \left[-2 \pi, 2 \pi\right].

Worked Solution
Create a strategy

The value of a=-1, so the graph of f \left( \theta \right) = \tan \theta has been reflected across the x-axis. The value of c=\dfrac{\pi}{2}, so the graph has been shifted by \dfrac{c}{b}=\dfrac{\frac{\pi}{2}}{1}=\dfrac{\pi}{2} units to the left.

Apply the idea

First, apply the reflection across the x-axis:

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-4
-3
-2
-1
1
2
3
4
f \left( \theta \right)

Then, we can apply the phase shift to the left by \dfrac{\pi}{2} units:

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-4
-3
-2
-1
1
2
3
4
f \left( \theta \right)
b

Identify the key features of f \left( \theta \right) = -\tan \left( \theta + \dfrac{\pi}{2} \right).

Worked Solution
Apply the idea
  • Domain: x \neq n \pi, where n is any integer
  • Range: \left( -\infty, \infty \right)
  • x-intercept: x=\dfrac{\left(2n+1\right)\pi}{2}, where n is any integer
  • y-intercept: None
  • Period: \pi
  • Amplitude: None
  • Midline: y=0
Reflect and check

Since the graph is not shifted up or down, the midline will remain the same as the parent function.

Example 5

Compare the graph of f \left( \theta \right) = \tan \theta to each function.

a

g \left( \theta \right) = \tan \dfrac{1}{2} \theta

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-4
-3
-2
-1
1
2
3
4
g \left( \theta \right)
Worked Solution
Create a strategy

The value of b for g \left( \theta \right) is \dfrac{1}{2}, so the period of the tangent function changes.

Apply the idea

The new period for the function is \dfrac{\pi}{\frac{1}{2}} = 2 \pi, meaning that the period increases and we see a horizontal stretch.

The domain of g \left( \theta \right) is x \neq \left(2n+1\right) \pi, n is any integer, and the range is the same as the parent function, \left( -\infty, \infty \right).

The x-intercepts of g \left( \theta \right) occur at x=2 n \pi, where n is any integer, while the y-intercept and midline remain the same as the parent function, at y=0.

b

h \left( \theta \right) = 6 \tan \theta

-2\pi
-\frac{3}{2}\pi
-1\pi
-\frac{1}{2}\pi
\frac{1}{2}\pi
1\pi
\frac{3}{2}\pi
2\pi
\theta
-10
-8
-6
-4
-2
2
4
6
8
10
h \left( \theta \right)
Worked Solution
Create a strategy

The value of a for h \left( \theta \right) is 6, so the graph should experience a vertical stretch.

Apply the idea

The period for the function is the same as the parent function, since the value of b does not change.

The domain of h \left( \theta \right) is the same as the parent function, x \neq \dfrac{\pi}{2} + n \pi, where n is any integer. The range is the same as the parent function, \left( -\infty, \infty \right).

The x-intercepts of h \left( \theta \right) occur at the same points as the parent function, at x=n \pi, wheren is any integer. The y-intercept and midline remain the same as the parent function, at y=0.

Reflect and check

When only changing the value of a, the location of the key features, such as the midline, asymptotes, and axis-intercepts, remain the same as f \left( \theta \right) = \tan \theta.

Idea summary

Refer to the general form of the tangent function to write or determine transformations to f \left( \theta \right) = \tan \theta:

\displaystyle f \left( \theta \right)= a \tan \left[ b \left(\theta - c \right)\right] + d
\bm{a}
\left|a\right| >1 is a vertical stretch, \left|a\right| < 1 is a vertical compression, a < 0 is a reflection across the x-axis
\bm{b}
period is \dfrac{\pi}{|b|}, where \left|b\right| >1 is a horizontal compression, \left|b\right| < 1 is a horizontal stretch, {b < 0} is a reflection across the y-axis
\bm{c}
phase shift by c units
\bm{d}
vertical translation by d units

Outcomes

F.IF.B.4

For a function that models a relationship between two quantities, interpret key features of graphs and tables in terms of the quantities, and sketch graphs showing key features given a verbal description of the relationship. Key features include: intercepts; intervals where the function is increasing, decreasing, positive, or negative; relative maximums and minimums; symmetries; end behavior; and periodicity.

F.IF.C.7.E

Graph exponential and logarithmic functions, showing intercepts and end behavior, and trigonometric functions, showing period, midline, and amplitude.

F.BF.B.3

Identify the effect on the graph of replacing f(x) by f(x) + k, kf(x), f(kx), and f(x + k) for specific values of k (both positive and negative); find the value of k given the graphs. Experiment with cases and illustrate an explanation of the effects on the graph using technology. Include recognizing even and odd functions from their graphs and algebraic expressions for them.

What is Mathspace

About Mathspace