Skip to main content
Graphing Calculator

Function library

Tangent Function

f(x) = tan(x)

A repeating curve that climbs from −∞ to +∞, with vertical asymptotes wherever cosine hits zero.

The tangent function, tan(x) = sin(x)/cos(x), looks nothing like its wave-shaped siblings: instead of oscillating between −1 and 1, it sweeps upward through every real value, then jumps and starts again. Each repeating branch passes through a zero at x = nπ, climbs ever more steeply, and shoots off to infinity as x approaches π/2 + nπ — the points where cos(x) = 0 and the ratio blows up. Those are the function’s vertical asymptotes, the dashed walls the curve can approach but never touch.

Tangent measures steepness: in a right triangle it is opposite over adjacent, the slope of the hypotenuse, and for an angle of inclination it gives the slope of the line directly. Because tan(x + π) = tan(x), its period is only π — half that of sine and cosine. Type tan(x) into the calculator and zoom out to see the branches tile the plane, each one a stretched S-curve between two asymptotes.

Computed properties

Calculated by the graphing calculator's own math engine at build time for tan(x).

Roots in [−10, 10]
-9.4248, -7.8540, -6.2832, -4.7124, -3.1416, -1.5708, 0.0000, 1.5708, 3.1416, 4.7124, 6.2832, 7.8540, 9.4248
y-intercept f(0)
0.0000
Local extrema in [−10, 10]
  • local maximum at (-7.8540, 199087826626279.5938)
  • local minimum at (-7.8540, -108838255169697.7969)
  • local minimum at (-4.7124, 627880472489264.5000)
  • local maximum at (-4.7124, -510190062007397.1250)
  • local maximum at (-1.5708, 786760216799608.2500)
  • local minimum at (-1.5708, -78630107396901.1406)
  • …and 6 more
Sample values
f(-2) = 2.185 · f(-1) = -1.5574 · f(0) = 0 · f(1) = 1.5574 · f(2) = -2.185
Derivative f′(1)
3.4255
Integral ∫₀¹ f(x) dx
0.6156

Key facts

  • tan(x) = sin(x)/cos(x); domain is all real x except π/2 + nπ.
  • Range: all real numbers — tangent is unbounded above and below.
  • Period π: tan(x + π) = tan(x); odd function, tan(−x) = −tan(x).
  • Zeros at x = nπ; vertical asymptotes at x = π/2 + nπ.
  • Derivative is sec²(x) = 1 + tan²(x), always ≥ 1; near 0, tan(x) ≈ x.

What tangent is

Geometrically, tan(x) is the slope of the ray at angle x: draw the ray from the origin at angle x and see how steeply it rises, which is rise over run — opposite over adjacent. Equivalently, it is the y-coordinate where that ray meets the vertical line x = 1 tangent to the unit circle, which is where the name comes from. As the ray swings toward straight up, the intersection point races away to infinity, and the moment the ray points exactly upward there is no intersection at all — the asymptote.

Since tan(x) = sin(x)/cos(x), the function’s zeros come from sine (at x = nπ) and its asymptotes from cosine’s zeros (at x = π/2 + nπ). Tangent is an odd function, tan(−x) = −tan(x), so each branch is rotationally symmetric about its own zero, and the whole graph repeats every π because shifting both sine and cosine by π flips both signs, leaving the ratio unchanged.

Asymptotes and unbounded behavior

The vertical asymptotes at x = π/2 + nπ are the most striking feature of tan(x): approaching from the left the curve tends to +∞, from the right to −∞. The function is continuous on each interval between asymptotes but has an unavoidable jump at every asymptote — no redefinition can fix it, because the left and right limits disagree. This makes tangent the standard classroom example of a function with infinitely many vertical asymptotes.

Unlike sine and cosine, tangent is unbounded in both directions: its range is all real numbers. Near zero it behaves almost like the line y = x (the small-angle approximation tan(x) ≈ x), then steepens dramatically — at x = 1.4 radians the value is already about 5.8, and at 1.57 it is enormous. Its derivative, sec²(x) = 1 + tan²(x), is always at least 1, confirming the curve never flattens.

Where tangent appears

Tangent converts angles to slopes, so it appears wherever inclination matters: the grade of a hill (a 45° slope is a 100% grade because tan(45°) = 1), the trajectory math of projectiles, and the angle of a sundial’s shadow. In calculus, the derivative itself is a tangent slope — the tangent line to a curve at a point — and inverse tangent, arctan, is how calculators recover angles from slopes, for instance finding a bearing from Δy/Δx.

In physics, tan shows up in phase relationships: the phase angle of a driven oscillator satisfies tan(φ) = (damping term)/(stiffness term), and in optics the Brewster angle obeys tan(θ) = n₂/n₁. Anywhere a ratio of vertical to horizontal components matters, tangent is the natural language.

Frequently asked questions

Why does tan(x) have asymptotes?

Because tan(x) = sin(x)/cos(x), and cos(x) = 0 at x = π/2 + nπ. Dividing by values closer and closer to zero makes the ratio grow without bound, so the graph shoots to ±∞ on either side of each of those points. The function is simply undefined there.

What is the period of tangent?

π, half the period of sine and cosine. Adding π to the angle flips the signs of both sin(x) and cos(x), and the two flips cancel in the ratio, so tan(x + π) = tan(x). The graph repeats its branch pattern every π radians.

Is tangent increasing everywhere?

It is increasing on each interval between consecutive asymptotes, but it is not increasing as a whole function — it jumps from +∞ back down to −∞ at every asymptote. So the statement “tan is increasing” is only true within a single branch, such as (−π/2, π/2).

Related pages