Unit 4, lesson 55

Graphs of Tangent and Cotangent

Why the tangent and cotangent graphs break into branches separated by vertical asymptotes, why they repeat twice as often as sine and cosine, and how to sketch them from a few key points.

  • Theory part 109
  • Practice part 110
  • Graphs of Trigonometric Functions

Draw a ray from the center of the unit circle out through a point on it. The tangent of the angle is the slope of that ray. As the ray turns counterclockwise toward straight up, its slope grows without limit, and when it points straight up there is no slope at all. That single fact explains the shape of the tangent graph, which shoots off to infinity, breaks, and starts over.

Key terms

Tangent on the unit circle

Definition For a real number xx with cos⁡x≠0\cos x \ne 0,

tan⁡x=sin⁡xcos⁡x.\tan x = \frac{\sin x}{\cos x}.

Tangent is undefined where cos⁡x=0\cos x = 0, that is at x=π2+kπx = \frac{\pi}{2} + k\pi for every integer kk. If P(x)=(cos⁡x,sin⁡x)P(x) = (\cos x, \sin x) is the point of the unit circle that belongs to xx, then tan⁡x\tan x is the slope of the line through the origin and P(x)P(x). That line meets the vertical line tangent to the circle at (1,0)(1, 0) in the point (1,tan⁡x)(1, \tan x), which is where the name comes from.

In plain words Tangent is rise over run for the ray from the center to the point. You can also read it as a height on the vertical line that touches the circle at (1,0)(1, 0).

Example At x=π3x = \frac{\pi}{3} the point is P=(12,32)P = \left(\frac{1}{2}, \frac{\sqrt{3}}{2}\right), so

tan⁡π3=3/21/2=3≈1.73.\tan \frac{\pi}{3} = \frac{\sqrt{3}/2}{1/2} = \sqrt{3} \approx 1.73.

The line through the origin with slope 3\sqrt{3} meets the tangent line at (1,3)(1, \sqrt{3}). At x=2π3x = \frac{2\pi}{3} the point is (−12,32)\left(-\frac{1}{2}, \frac{\sqrt{3}}{2}\right), and the line through it and the origin has slope −3-\sqrt{3}. Extended back through the origin, that line meets the tangent line below the xx-axis, at (1,−3)(1, -\sqrt{3}).

Tangent graph

Definition The tangent graph is the graph of y=tan⁡xy = \tan x with xx in radians. Its domain is all real numbers except π2+kπ\frac{\pi}{2} + k\pi for integers kk, and its range is all real numbers. It is zero exactly at x=kπx = k\pi, and it is odd, tan⁡(−x)=−tan⁡x\tan(-x) = -\tan x. On each open interval

(−π2+kπ, π2+kπ)\left(-\frac{\pi}{2} + k\pi, \ \frac{\pi}{2} + k\pi\right)

the function is increasing and takes every real value exactly once. The piece of the graph over one of these intervals is called a branch.

In plain words One branch is a rising S-shaped curve through a zero, climbing from far below to far above between two vertical walls. The same branch repeats over and over.

Example A few points on the branch through the origin are enough for a sketch.

xx−π3-\frac{\pi}{3}−π4-\frac{\pi}{4}00π4\frac{\pi}{4}π3\frac{\pi}{3}
tan⁡x\tan x−3-\sqrt{3}−1-100113\sqrt{3}

The points (±π4,±1)\left(\pm\frac{\pi}{4}, \pm 1\right) sit halfway between the zero and the walls at x=±π2x = \pm\frac{\pi}{2}. Past them the curve steepens quickly.

Vertical asymptotes

Definition The line x=ax = a is a vertical asymptote of the graph of ff if f(x)f(x) increases without bound or decreases without bound as xx approaches aa from at least one side, meaning

f(x)→∞orf(x)→−∞as x→a− or as x→a+.\begin{gathered} f(x) \to \infty \quad \text{or} \quad f(x) \to -\infty \\[0.4em] \text{as } x \to a^- \text{ or as } x \to a^+. \end{gathered}

The tangent graph has a vertical asymptote at every x=π2+kπx = \frac{\pi}{2} + k\pi. Near such a point sin⁡x\sin x is close to ±1\pm 1 while cos⁡x\cos x is close to 00, so the quotient is very large in size. At x=π2x = \frac{\pi}{2} the cosine is positive just to the left and negative just to the right, so tan⁡x→∞\tan x \to \infty as x→π2−x \to \frac{\pi}{2}^- and tan⁡x→−∞\tan x \to -\infty as x→π2+x \to \frac{\pi}{2}^+.

In plain words A vertical asymptote is a vertical wall that the graph hugs more and more closely while its values shoot up or down. Tangent has one wherever cosine is zero, because there the denominator of sine over cosine shrinks to zero while the numerator does not.

Example The value π2\frac{\pi}{2} is about 1.5707961.570796. Approach it from both sides.

xx1.51.51.551.551.571.571.57071.57071.581.581.61.6
tan⁡x\tan x14.1014.1048.0848.081255.771255.7710381.3310381.33−108.65-108.65−34.23-34.23

From the left the values climb past every bound, and from the right they drop below every bound.

Period of tangent

Definition The tangent function has period π\pi. For every xx in its domain, x+πx + \pi is also in the domain and

tan⁡(x+π)=tan⁡x,\tan(x + \pi) = \tan x,

and no smaller positive number has this property. More generally, for constants A≠0A \ne 0 and B≠0B \ne 0 the function y=Atan⁡(B(x−C))+Dy = A\tan\bigl(B(x - C)\bigr) + D has period π∣B∣\frac{\pi}{\lvert B \rvert}.

In plain words Half a turn carries a point to the opposite point of the circle. Both sine and cosine change sign, so their quotient does not change. The line through the origin is the same line, with the same slope. That is why tangent repeats twice as often as sine and cosine.

Example Why is nothing smaller than π\pi a period? If p>0p > 0 is a period, then tan⁡p=tan⁡(0+p)=tan⁡0=0\tan p = \tan(0 + p) = \tan 0 = 0, and tangent is zero only at multiples of π\pi. So pp is a positive multiple of π\pi, and the smallest one is π\pi.

The graph of y=tan⁡(2x)y = \tan(2x) has period π2\frac{\pi}{2}. Its asymptotes are where 2x=π2+kπ2x = \frac{\pi}{2} + k\pi, that is

x=π4+kπ2,x = \frac{\pi}{4} + \frac{k\pi}{2},

so in [−π,π][-\pi, \pi] they are x=±π4x = \pm\frac{\pi}{4} and x=±3π4x = \pm\frac{3\pi}{4}. The point (π8,1)\left(\frac{\pi}{8}, 1\right) is on the branch through the origin, since tan⁡π4=1\tan \frac{\pi}{4} = 1.

Cotangent

Definition For a real number xx with sin⁡x≠0\sin x \ne 0,

cot⁡x=cos⁡xsin⁡x.\cot x = \frac{\cos x}{\sin x}.

Cotangent is undefined at x=kπx = k\pi for every integer kk. Wherever tan⁡x\tan x is defined and not zero, cot⁡x=1tan⁡x\cot x = \frac{1}{\tan x}. At x=π2+kπx = \frac{\pi}{2} + k\pi tangent is undefined, but cotangent is defined there and equals 00.

In plain words Cotangent is run over rise for the same ray, so it is the reciprocal of the slope. Where the ray is vertical, the run is zero and so is the cotangent.

Example At x=π6x = \frac{\pi}{6} the point is (32,12)\left(\frac{\sqrt{3}}{2}, \frac{1}{2}\right), so

cot⁡π6=3/21/2=3.\cot \frac{\pi}{6} = \frac{\sqrt{3}/2}{1/2} = \sqrt{3}.

At x=π2x = \frac{\pi}{2} the point is (0,1)(0, 1), so cot⁡π2=01=0\cot \frac{\pi}{2} = \frac{0}{1} = 0. The formula 1tan⁡x\frac{1}{\tan x} would give nothing there, which is why cotangent is defined as cosine over sine.

Cotangent graph

Definition The cotangent graph is the graph of y=cot⁡xy = \cot x with xx in radians. Its domain is all real numbers except kπk\pi for integers kk, its range is all real numbers, and it has period π\pi. It is odd, it is zero exactly at x=π2+kπx = \frac{\pi}{2} + k\pi, and its vertical asymptotes are the lines x=kπx = k\pi. On each interval (kπ,(k+1)π)\bigl(k\pi, (k + 1)\pi\bigr) it is decreasing and takes every real value exactly once. For every xx that is not a multiple of π\pi

cot⁡x=−tan⁡(x−π2),\cot x = -\tan\left(x - \frac{\pi}{2}\right),

so the cotangent graph is the tangent graph shifted π2\frac{\pi}{2} units to the right and then reflected across the xx-axis. Shifting and reflecting do not change the period, which is why cotangent repeats every π\pi units just like tangent.

In plain words Each cotangent branch falls from far above, just right of one wall, to far below, just left of the next. Where tangent has its walls, cotangent crosses zero, and the other way around.

Example On the branch over (0,π)(0, \pi) these values give the shape.

xxπ6\frac{\pi}{6}π4\frac{\pi}{4}π2\frac{\pi}{2}3π4\frac{3\pi}{4}5π6\frac{5\pi}{6}
cot⁡x\cot x3\sqrt{3}1100−1-1−3-\sqrt{3}

Near the wall at x=0x = 0 the values blow up, with cot⁡0.1≈9.97\cot 0.1 \approx 9.97 and cot⁡0.01≈100.0\cot 0.01 \approx 100.0 on the right, and cot⁡(−0.01)≈−100.0\cot(-0.01) \approx -100.0 on the left.

Check yourself

  1. Find the period of y=tan⁡(x2)y = \tan\left(\frac{x}{2}\right) and its vertical asymptotes in [−2π,2π][-2\pi, 2\pi].
Show the answer

With B=12B = \frac{1}{2} the period is π/12=2π\pi / \frac{1}{2} = 2\pi. The asymptotes are where x2=π2+kπ\frac{x}{2} = \frac{\pi}{2} + k\pi, that is x=π+2kπx = \pi + 2k\pi. In [−2π,2π][-2\pi, 2\pi] these are x=−πx = -\pi and x=πx = \pi.

  1. Is tan⁡x\tan x increasing on the interval (0,π)(0, \pi)?
Show the answer

No. Tangent is not even defined at π2\frac{\pi}{2}, which lies in that interval. Also π4<3π4\frac{\pi}{4} < \frac{3\pi}{4}, but tan⁡π4=1\tan \frac{\pi}{4} = 1 is larger than tan⁡3π4=−1\tan \frac{3\pi}{4} = -1. Tangent increases on (0,π2)\left(0, \frac{\pi}{2}\right) and on (π2,π)\left(\frac{\pi}{2}, \pi\right) separately, not across the asymptote.

  1. Find every xx in [0,2π)[0, 2\pi) with cot⁡x=0\cot x = 0. On which part of (0,π)(0, \pi) is cot⁡x\cot x negative?
Show the answer

Cotangent is zero where cosine is zero and sine is not, so x=π2x = \frac{\pi}{2} and x=3π2x = \frac{3\pi}{2}. On (0,π)(0, \pi) sine is positive, so cotangent has the sign of cosine and is negative on (π2,π)\left(\frac{\pi}{2}, \pi\right).

How this lesson connects

Where this leads in Calculus

Resources for this lesson