y=tanxy = \tan x

Graph of the Tangent Function y=tanxy = \tan x

The tangent function y=tanxy = \tan x is the sine divided by the cosine1. On the unit circle it is the slope of the line through the origin at angle xx, and in a right triangle it is the ratio of the opposite side to the adjacent side.

Definition

tanx=sinxcosx\tan x = \frac{\sin x}{\cos x}

The denominator is cosx\cos x, so the function is undefined wherever the cosine vanishes.

Domain and range

  • The domain is every real number with xπ2+nπx \neq \dfrac{\pi}{2} + n\pi
  • The range is all real numbers
  • The period is π\pi
  • It is an odd function

Unlike the sine and cosine, the tangent has no upper or lower bound.

Periodicity

The period is π\pi, half that of the sine and cosine, since tan(x+π)=tanx\tan(x + \pi) = \tan x. The same branch repeats every π\pi.

Symmetry

Since tan(x)=tanx\tan(-x) = -\tan x, it is an odd function with point symmetry about the origin.

Asymptotes and limits

There is a vertical asymptote at each x=π2+nπx = \dfrac{\pi}{2} + n\pi. Which way the value flies off depends on the sign the denominator approaches from.

Approachcosx\cos xtanx\tan x
x(π2)x \to \left( \dfrac{\pi}{2} \right)^{-}0+0^{+}++\infty
x(π2)+x \to \left( \dfrac{\pi}{2} \right)^{+}00^{-}-\infty

The graph is thus a family of branches, each penned in between two asymptotes.

Monotonicity

The derivative is y=1cos2x=sec2xy' = \dfrac{1}{\cos^2 x} = \sec^2 x, positive wherever the function is defined, so the tangent increases monotonically within each branch.

It is not increasing on the real line as a whole: crossing an asymptote, the value drops from ++\infty back to -\infty. The increase holds only inside a single branch.

Notable values

xxtanx\tan x
0000
π6\dfrac{\pi}{6}13\dfrac{1}{\sqrt{3}}
π4\dfrac{\pi}{4}11
π3\dfrac{\pi}{3}3\sqrt{3}

The zeros are the solutions of sinx=0\sin x = 0, namely x=nπx = n\pi. At π4\dfrac{\pi}{4}, that is 4545^\circ, the value is exactly 11, which corresponds to a line of slope 11.

Approximation near the origin

The tangent line at the origin is y=xy = x, of slope 11.

limx0tanxx=1\lim_{x \to 0} \frac{\tan x}{x} = 1

So tanxx\tan x \approx x for small angles. Writing one more term of the expansion gives tanx=x+x33+\tan x = x + \dfrac{x^3}{3} + \cdots, so near the origin sinx\sin x falls below xx while tanx\tan x rises above it.

Relationships with other functions

It satisfies 1+tan2x=1cos2x1 + \tan^2 x = \dfrac{1}{\cos^2 x}, and its reciprocal is the cotangent cotx\cot x. Because its range is the whole real line, restricting it to π2<x<π2-\dfrac{\pi}{2} < x < \dfrac{\pi}{2} makes it one-to-one, and the inverse of that restriction is arctanx\arctan x.

Applications

The angle θ\theta that the line y=mxy = mx makes with the xx-axis satisfies m=tanθm = \tan\theta, so the tangent is the bridge between slope and angle.

  • The gradient of a road or a roof
  • Surveying, where a height is a distance times tanθ\tan\theta
  • The relation between the field of view of a camera and its focal length
  1. Trigonometric functions, Wikipedia