Tangent and cotangent are quotients: tan x = sin x / cos x and cot x = cos x / sin x. Wherever the denominator is 0 the function is undefined, and the graph has a vertical asymptote. Between asymptotes each graph sweeps through every real number, and the pattern repeats every π, not every 2π.
01 · The graph of y = tan x
- tan x = sin x / cos x is undefined where cos x = 0, at the odd multiples of π/2: there the graph has vertical asymptotes.
- Domain: all real numbers except x = (2k + 1)π/2. Range: (−∞, ∞).
- Period: π. Tangent is odd: tan(−x) = −tan x.
Extend the terminal side of x until it hits the vertical line x = 1. The height of that point is y/x = tan x. As x approaches π/2 the ray becomes vertical and the height blows up.
02 · Graphing y = A tan(Bx − C) + D
- Stretch factor |A|. If A > 0 the graph increases; if A < 0 it decreases.
- Period P = π/|B|.
- Phase shift C/B and vertical shift D.
- For y = A tan(Bx): asymptotes x = −P/2 and x = P/2, and reference points (−P/4, −A), (0, 0), (P/4, A).
- Add C/B to every x-coordinate and D to every y-coordinate. The vertical shift does not move the asymptotes.
The dashed purple lines are the asymptotes of the highlighted period.
03 · Graphing y = A cot(Bx − C) + D
- cot x = cos x / sin x is undefined where sin x = 0, at the integer multiples of π; it is 0 where cos x = 0, the odd multiples of π/2. Period π; cotangent is odd.
- The zeros of tan x are the asymptotes of cot x, and the asymptotes of tan x are the zeros of cot x.
- For y = A cot(Bx) with B > 0: one period runs between the asymptotes x = 0 and x = P = π/|B|, with reference points (P/4, A), (P/2, 0), (3P/4, −A). Then apply C/B and D as for tangent.
- y = cot x decreases on each period. So A cot(Bx − C) + D decreases when A > 0 and increases when A < 0, the opposite of tangent.
The dashed gray curve is A tan(Bx − C) + D for comparison.
04 · Which graph is it?
Match each graph with its equation. Look at where the asymptotes are and whether the branches rise or fall.
Guided problems · Graphs of Tangent and Cotangent
Original problems on periods, asymptotes, reference points, and the direction of tangent and cotangent graphs. Open a hint if you need one, check your answers, then try another set.
Check your understanding · Graphs of Tangent and Cotangent
Answer each question on paper first, then open the answer to check yourself.
For y = −4 tan(2x), find the period, the asymptotes of one period, and the three reference points.
Show answer
P = π/2. Asymptotes x = −π/4 and x = π/4. Points (−π/8, 4), (0, 0), (π/8, −4); A < 0, so the graph decreases.
For y = 4 tan(πx/3 + π/6) − 2, find the period, the phase shift, and the asymptotes of one period.
Show answer
B = π/3 and C = −π/6. P = π/(π/3) = 3. Phase shift C/B = −1/2 (left 1/2). Asymptotes x = −3/2 − 1/2 = −2 and x = 3/2 − 1/2 = 1. Middle point (−1/2, −2).
For y = ½ cot(2x − π/3) + 4, find the period, the asymptotes of one period, and the reference points.
Show answer
P = π/2 and C/B = π/6. Asymptotes x = π/6 and x = π/6 + π/2 = 2π/3. Points (7π/24, 9/2), (5π/12, 4), (13π/24, 7/2); A > 0, so the graph decreases.