Graphing the Tangent Function

Before this, knowTangent Function Properties

Illustrated · 2 min

We will be focusing on the tangent function for the next few lessons. We have already learned about the properties of the tangent function, so now we will learn how to graph the tangent function.

Let's first look at the parent form of a tangent function, the graph of f(x)=tan⁡(x)f(x) = \tan(x).

Graph of the function y = tan(x)

Made using Desmos

When we are tasked with graphing tangent functions, we use the parent function of f(x)=tan⁡(x)f(x) = \tan(x) as a starting point, then transform the graph.

The tangent function is a periodic function, meaning it has the same components of other periodic functions: an amplitude, midline, and period.

Let's think back to the standard form of the tangent function. It looks very similar to the standard form of sine‚ and cosine.

f(x)=Atan⁡(Bx−C)+Df(x) = A\tan(Bx-C)+D

A key point to note first is that the period of the tangent function is π\pi in contrast to sine and cosine, which has a period of 2π2\pi.

  1. To find the period, we can use the formula: period = π∣B∣\frac{\pi}{|B|}.

  2. We also want to find the vertical asymptote. Since tan⁡(θ)=sin⁡(θ)cos⁡θ\tan(\theta) = \frac{\sin(\theta)}{\cos{\theta}}, we know the function will be undefined when cos⁡(θ)=0\cos(\theta) = 0. We know cos⁡(θ)=0\cos(\theta) = 0 when θ=π2\theta = \frac{\pi}{2} or 3π2\frac{3\pi}{2}. To find the vertical asymptote of a tangent function, we can substitute x=π2+nπx = \frac{\pi}{2} + n\pi.

  3. Next, we want to find the xx-intercepts. To find the xx-intercept, we can set yy equal to zero and solve.

  4. To find the vertical phase shift, we can use the value "DD" in the standard form of a trig function.

Once we know all of these components, we can graph.

##Let's try graphing an example tangent function: f(x)=4tan⁡(3x)+3f(x) = 4\tan(3x)+3.

Let's find the period:

Period = π∣3∣\frac{\pi}{|3|} = π3\frac{\pi}{3}.

To find the vertical asymptote, we can set cos⁡(3x)=0\cos(3x) = 0, which is π6\frac{\pi}{6}. Therefore, the vertical asymptote is x=π6±nπx = \frac{\pi}{6} \pm n\pi.

To find the xx-intercepts, we can set yy equal to 00 and solve.

0=4tan⁡(3x)+30 = 4\tan(3x)+3 −34=tan⁡(3x)\frac{-3}{4} = \tan(3x)

If you use a calculator, you can find that x=0.833±nπ3x =0.833 \pm \frac{n\pi}{3}

From the equation, we can see that there is a vertical phase shift of positive 33.

Knowing all of these components, we can now graph the equation!

Graph of y = 4tan(3x)+3 with the x intercept and vertical asymptote labeled.

Made using Desmos

Illustrated · 1 min

Tangent Function Graphs

While the sine and cosine functions look similar, the tangent function looks pretty different. Tangent is an odd function. Here is the graph of the tangent function:

Graph of the tangent function

Made using Desmos

There are a few key characteristics of the tangent function that will help us better understand the function. Those are labeled on this next graph!

Graph of the tangent function, with the period labeled pi, the x asymptote labeled at x=pi/2 and another x asymptote at x=-pi/2. The y-intercept is labeled at the origin.

Made using Desmos

The yy-intercept of the parent tangent function is at the origin, (0,0)(0,0). The period of the function is π\pi, which is half of the period of sine and cosine functions.

The tangent function is an example of a periodic function, so the function repeats itself. That means that there are an infinite number of vertical asymptotes. The two vertical asymptotes labeled on the above graph are at x=−π2x=-\frac{\pi}{2} and x=π2x=\frac{\pi}{2}. In general, the vertical asymptotes of the tangent function are when cos(x)=0cos(x)=0, as that is when the the tangent function is undefined.

Looking Further

Another way you will encounter tangent is with the unit circle. The above graphs are on the coordinate plane, but unit circles are more helpful when dealing with triangles. The unit circle takes you on a complete cycle of sine, cosine, and tangent.

You will also eventually learn about cotangent! Cotangent is the reciprocal of tangent.

Video · + 1 min read

(Video) How to Graph Tangent

by Mario's Math Tutoring

In this video by Mario's Math Tutoring, you will learn how to graph the tangent function.

Summary

To graph the tangent function, we want to understand the unit circle from −π2-\frac{\pi}{2} to π2\frac{\pi}{2}. At −π2-\frac{\pi}{2}, the tangent value is yx\frac{y}{x}, which is −10\frac{-1}{0}, which is undefined. That's how we get a vertical asymptote at x=−π2x=-\frac{\pi}{2}.

At −π4\frac{-\pi}{4}, we get a value of −1-1, so we can plot that point at (−π4,−1)(\frac{-\pi}{4}, -1). The xx-intercept is at 00. At π4\frac{\pi}{4}, we get 11. So we can plot that point at (π4,1)(\frac{\pi}{4}, 1).

At π2\frac{\pi}{2}, we get another undefined value, indicating another vertical asymptote at x=π2x=\frac{\pi}{2}.

Using all of the above information, we will find that the parent function of the tangent graph (within one period) is:

Graph of y=tan(x) over one period.

Made using Desmos

One really important note for the tangent function is that the period of the parent function is π\pi. Keep in mind, the period for the sine and cosine functions were 2π2\pi.

Check out the next couple of examples of what happens when you want to transform the tangent function!

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems