Hyperbolic Tangent — Definition, Formula & Examples
Hyperbolic tangent is the ratio of hyperbolic sine to hyperbolic cosine, written as . It outputs values strictly between and , producing an S-shaped curve that serves as a smooth, bounded alternative to the identity function.
The hyperbolic tangent function is defined as for all . It is an odd function with horizontal asymptotes at and .
Key Formula
Where:
- = Any real number (the input to the function)
- = Euler's number, approximately 2.71828
How It Works
To evaluate , compute and , then form the ratio . The result always lies in the open interval . As , the negative exponential vanishes and . Symmetrically, as . The derivative is , which peaks at and decays toward zero for large .
Worked Example
Problem: Evaluate using the exponential definition.
Step 1: Compute the exponentials.
Step 2: Form the numerator and denominator.
\text{Numerator: } 2.71828 - 0.36788 = 2.35040$$$$\text{Denominator: } 2.71828 + 0.36788 = 3.08616
Step 3: Divide to get the result.
Answer:
Visualization
Why It Matters
The hyperbolic tangent is one of the most widely used activation functions in neural networks and deep learning, where its bounded output and smooth gradient help with signal propagation. In physics, describes velocity addition in special relativity (rapidity) and the profile of magnetic domain walls.
Common Mistakes
Mistake: Confusing with , especially their ranges and definitions.
Correction: is a trigonometric function with range and periodic vertical asymptotes, while is defined via exponentials and is bounded between and with no asymptotes or discontinuities.
