What the graph of y = tanh x looks like
tanh x = sinh x / cosh x = (eˣ − e⁻ˣ)/(eˣ + e⁻ˣ). It passes through the origin with slope 1 and quickly flattens towards the horizontal asymptotes y = 1 and y = −1 — by x = 3 it is already 0.995.
It is a rescaled logistic curve: tanh x = 2σ(2x) − 1, where σ is the logistic function. That bounded, smooth S-shape is why tanh is used as an activation function in neural networks and to describe velocity approaching terminal speed.
Key features of y = tanh x
| Property | Value |
|---|---|
| Function | y = tanh x (Hyperbolic tangent) |
| Family | Hyperbolic |
| Domain | All real numbers (−∞, ∞) |
| Range | −1 < y < 1 |
| x-intercept(s) | x = 0 |
| y-intercept | y = 0 |
| Symmetry | Odd — symmetric about the origin |
| Asymptotes | Horizontal y = −1 and y = 1 |
| Period | Not periodic |
| Increasing on | (−∞, ∞) |
| Decreasing on | Never |
| Key points | Inflection at (0, 0) with slope 1; tanh 1 ≈ 0.7616 |
| Derivative f′(x) | sech² x = 1 − tanh² x |
| Antiderivative ∫ f(x) dx | ln(cosh x) + C |
Symmetry: Odd — symmetric about the origin. For example f(2) = 0.964 while f(−2) = −0.964, its negative, so the graph looks the same after a half-turn about the origin. Intercepts: the graph meets the x-axis at x = 0 and the y-axis at y = 0.
Table of values for y = tanh x
| x | y = tanh x | Slope f′(x) |
|---|---|---|
| −3 | −0.9951 | 0.0099 |
| −2 | −0.964 | 0.0707 |
| −1 | −0.7616 | 0.42 |
| 0 | 0 | 1 |
| 1 | 0.7616 | 0.42 |
| 2 | 0.964 | 0.0707 |
| 3 | 0.9951 | 0.0099 |
How to sketch y = tanh x by hand
Plot the points from the table — (−3, −0.9951), (−2, −0.964), (−1, −0.7616), (0, 0), (1, 0.7616), (2, 0.964) — on axes running from about −4 to 4 horizontally. Draw the asymptotes first (horizontal y = −1 and y = 1) as dashed lines; the curve gets ever closer to them without crossing in that direction. Then join the points with a smooth curve. As a check on the shape — increasing: (−∞, ∞); decreasing: Never.
Derivative, tangent line and area
The derivative of y = tanh x is sech² x = 1 − tanh² x, which gives the slope of the curve at each point (the third column of the table). At x = 1 the curve is at height 0.7616 and its slope is f′(1) = 0.42, so the tangent line there is y = 0.42x + 0.3416.
The signed area under the curve from x = 0 to x = 1 is 0.4338, found using the antiderivative ln(cosh x) + C.
Related graphs and transformations
- y = 1/(1 + e⁻ˣ) — Logistic sigmoid (rescaled tanh)
- y = arctan x — S-curve with asymptotes ±π/2
- y = sinh x — Numerator
- y = cosh x — Denominator
- y = tan x — Circular tangent
- y = 1/(1 + e⁻ˣ)
- y = arctan x
- y = sinh x
- y = cosh x
- y = tan x
- y = ⌊x⌋
- y = x sin x
- y = sin(x)/x
- y = e^(−x²)
- y = arccos x
Browse all graphs of common functions by family, or open the graphing calculator.