Math Core

Lesson 4.3 · Graphs of Trigonometric Functions

Graphs of tangent and cotangent

Sine and cosine make smooth waves that stay between −1-1 and 11. Tangent behaves very differently: it shoots off to infinity, breaks apart, and repeats twice as often. Understanding why comes down to one fact, tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x}.

Where tangent is undefined

A fraction is undefined when its denominator is zero. Since tan⁡x=sin⁡xcos⁡x\tan x = \dfrac{\sin x}{\cos x}, tangent is undefined wherever cos⁡x=0\cos x = 0:

x=±π2, ±3π2, ±5π2, …that is,x=π2+kπ.x = \pm\frac{\pi}{2},\ \pm\frac{3\pi}{2},\ \pm\frac{5\pi}{2},\ \ldots \qquad \text{that is,} \qquad x = \frac{\pi}{2} + k\pi.

Near these values the denominator is tiny while the numerator is close to ±1\pm 1, so the quotient becomes huge. Just to the left of π2\dfrac{\pi}{2}, both sin⁡x\sin x and cos⁡x\cos x are positive, so tan⁡x\tan x races up toward +∞+\infty. Just to the right, cos⁡x\cos x is negative, so tan⁡x\tan x plunges from −∞-\infty. The graph never touches the line x=π2x = \dfrac{\pi}{2}; it gets closer and closer. That line is a vertical asymptote.

Key points of one branch

Between the asymptotes x=−π2x = -\dfrac{\pi}{2} and x=π2x = \dfrac{\pi}{2} there is one complete piece of the graph, called a branch. Three points pin it down:

xx−π4-\frac{\pi}{4}00π4\frac{\pi}{4}
tan⁡x\tan x−1-10011

The branch passes through the origin, climbs steadily, and bends upward toward the asymptote on the right and downward toward the asymptote on the left. Every other branch is an exact copy, shifted by a multiple of π\pi.

y = tan x with its asymptotes (dashed) at x = ±π/2 and x = ±3π/2.Open in grapher →

Why the period is π

Adding π\pi to an angle moves you to the opposite point on the unit circle, which flips the sign of both coordinates:

tan⁡(x+π)=−sin⁡x−cos⁡x=sin⁡xcos⁡x=tan⁡x.\tan(x + \pi) = \frac{-\sin x}{-\cos x} = \frac{\sin x}{\cos x} = \tan x.

So tangent repeats every π\pi, not every 2π2\pi.

The graph of y = tan x

  • Domain: all real numbers except x=π2+kπx = \dfrac{\pi}{2} + k\pi
  • Range: all real numbers
  • Period: π\pi
  • Zeros: x=kπx = k\pi
  • Vertical asymptotes: x=π2+kπx = \dfrac{\pi}{2} + k\pi
  • Always increasing on each branch; odd function, tan⁡(−x)=−tan⁡x\tan(-x) = -\tan x

Tangent has no amplitude, because it has no maximum or minimum. A coefficient AA in y=Atan⁡xy = A\tan x is a vertical stretch: it changes the points (±π4,±1)\left(\pm\dfrac{\pi}{4}, \pm 1\right) to (±π4,±A)\left(\pm\dfrac{\pi}{4}, \pm A\right).

Transformations of tangent

For y=Atan⁡(B(x−C))+Dy = A\tan\big(B(x - C)\big) + D:

  • The period is π∣B∣\dfrac{\pi}{|B|} (note π\pi, not 2π2\pi).
  • The phase shift is CC and the vertical shift is DD, as with sine and cosine.
  • To find the asymptotes, set the inside equal to π2+kπ\dfrac{\pi}{2} + k\pi and solve for xx. A simple choice: one branch lives where the inside is between −π2-\dfrac{\pi}{2} and π2\dfrac{\pi}{2}.

Common mistake

Don't use 2π∣B∣\dfrac{2\pi}{|B|} for tangent or cotangent. Their basic period is π\pi, so the period formula is π∣B∣\dfrac{\pi}{|B|}. For example, y=tan⁡(2x)y = \tan(2x) has period π2\dfrac{\pi}{2}, not π\pi.

Worked example: A squeezed tangent

Find the period and the asymptotes of y=tan⁡(2x)y = \tan(2x), and sketch one branch.

Solution. The period is π2\dfrac{\pi}{2}. The central branch lives where −π2<2x<π2-\dfrac{\pi}{2} < 2x < \dfrac{\pi}{2}, that is, −π4<x<π4-\dfrac{\pi}{4} < x < \dfrac{\pi}{4}. So there are asymptotes at x=±π4x = \pm\dfrac{\pi}{4}, and in general at 2x=π2+kπ2x = \dfrac{\pi}{2} + k\pi, or x=π4+kπ2x = \dfrac{\pi}{4} + \dfrac{k\pi}{2}.

The key points are halfway between the center and each asymptote: x=±π8x = \pm\dfrac{\pi}{8}, where 2x=±π42x = \pm\dfrac{\pi}{4} and y=±1y = \pm 1. So the branch passes through (−π8,−1)\left(-\dfrac{\pi}{8}, -1\right), (0,0)(0, 0) and (π8,1)\left(\dfrac{\pi}{8}, 1\right).

Worked example: Stretch and shift

Find an asymptote of y=2tan⁡(x−π4)y = 2\tan\left(x - \dfrac{\pi}{4}\right) between 00 and π\pi, and the point on the graph at x=π2x = \dfrac{\pi}{2}.

Solution. Asymptotes occur where x−π4=π2+kπx - \dfrac{\pi}{4} = \dfrac{\pi}{2} + k\pi, so x=3π4+kπx = \dfrac{3\pi}{4} + k\pi. The one between 00 and π\pi is x=3π4x = \dfrac{3\pi}{4}.

At x=π2x = \dfrac{\pi}{2}: y=2tan⁡(π4)=2⋅1=2y = 2\tan\left(\dfrac{\pi}{4}\right) = 2 \cdot 1 = 2. The point is (π2,2)\left(\dfrac{\pi}{2}, 2\right).

The graph of cotangent

Cotangent is the reciprocal, cot⁡x=cos⁡xsin⁡x\cot x = \dfrac{\cos x}{\sin x}. The roles of sine and cosine switch:

  • Asymptotes where sin⁡x=0\sin x = 0: x=kπx = k\pi.
  • Zeros where cos⁡x=0\cos x = 0: x=π2+kπx = \dfrac{\pi}{2} + k\pi.
  • Key points on (0,π)(0, \pi): (π4,1)\left(\dfrac{\pi}{4}, 1\right), (π2,0)\left(\dfrac{\pi}{2}, 0\right), (3π4,−1)\left(\dfrac{3\pi}{4}, -1\right).

Each branch of cotangent falls from left to right, the opposite of tangent. The period is still π\pi, and the range is still all real numbers.

y = cot x with asymptotes (dashed) at multiples of π. Each branch decreases.Open in grapher →

Worked example: Comparing tangent and cotangent

On the interval (0,2π)(0, 2\pi), where is cot⁡x=0\cot x = 0, and where does y=cot⁡xy = \cot x have asymptotes?

Solution. cot⁡x=0\cot x = 0 when cos⁡x=0\cos x = 0 (and sin⁡x≠0\sin x \ne 0): x=π2x = \dfrac{\pi}{2} and x=3π2x = \dfrac{3\pi}{2}. Asymptotes are where sin⁡x=0\sin x = 0; inside the open interval (0,2π)(0, 2\pi) that is only x=πx = \pi (the endpoints 00 and 2π2\pi are also asymptotes, just not inside the interval).

Tip

Tangent's zeros are cotangent's asymptotes, and tangent's asymptotes are cotangent's zeros. If you know one graph, you can place the landmarks of the other immediately.

Practice

Practice 1

What is the period of y=tan⁡xy = \tan x? (You can type pi.)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

What is the period of y=5tan⁡(3x)y = 5\tan(3x)?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

What is the value of y=3tan⁡xy = 3\tan x at x=π4x = \dfrac{\pi}{4}?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

The graph of y=tan⁡(2x)y = \tan(2x) has vertical asymptotes. What is the smallest positive xx-value of an asymptote?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Which statement about y=cot⁡xy = \cot x is true?

Practice 6

Find every zero of y=cot⁡xy = \cot x on the interval (0,2π)(0, 2\pi). Enter your answers separated by commas.

Separate answers with commas, e.g. 2, -5

Practice 7

What is the distance between consecutive vertical asymptotes of y=tan⁡(x2)y = \tan\left(\dfrac{x}{2}\right)?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Find the vertical asymptote of y=2tan⁡(x−π4)+1y = 2\tan\left(x - \dfrac{\pi}{4}\right) + 1 that lies between 00 and π\pi.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.