Learning Objectives
By the end of this section you will be able to:
- Define from the exponential function and explain why those particular combinations matter.
- Prove the central identity and see why it forces the curve onto a hyperbola.
- Read the graphs of hyperbolic functions — their symmetries, asymptotes, and growth rates.
- Connect hyperbolic functions to real phenomena: the catenary, special relativity, and the activation in neural networks.
- Compute sinh from its Taylor series and use PyTorch's in a forward pass.
The Story: A Chain, a Sail, a Surprise
Hang a uniform chain between two poles and step back. What shape does it make? Galileo, in 1638, declared it a parabola. He was wrong — but the error was so subtle that the correct answer took another fifty-three years to find. In 1691 Jakob Bernoulli posed the problem as a public challenge; within a year his brother Johann, together with Huygens and Leibniz, produced the answer:
That “cosh” is the hyperbolic cosine. It is not a trigonometric function at all — it is built directly from . The same family of functions describes the shape of a sail filled with wind, the velocity of a falling object with air drag, the rapidity of a relativistic particle, and the activation curve of a neuron in a deep network. They show up everywhere there is an underlying balance between exponential growth and decay.
The whole idea in one line: hyperbolic functions are the symmetric and antisymmetric parts of . Every fact about them follows from that one decomposition.
Definitions from the Exponential
Any function can be uniquely split into an even part and an odd part . Apply this to . The two pieces are so important that they get their own names:
These are not arbitrary combinations. They are the unique way to decompose into an odd piece (sinh) and an even piece (cosh). Adding them puts the exponential back together:
Think of and as the “real” and “imaginary” parts of — but on the real axis. The structural analogy with and (which split ) is what makes them “trigonometry, but for the hyperbola.”
We also define cosecant, secant, cotangent versions for completeness:
Graphs and Behavior
Drag the slider below and watch the three core curves move together. Hide and show and on the same axes — cosh sits at their midpoint, sinh sits at their half-difference. That single visual is most of the intuition.
Interactive Hyperbolic Graphs
Drag the slider. Notice cosh(x) is the average of ex and e-x; sinh(x) is half their difference. The identity cosh²−sinh² = 1 holds at every x.
Three behaviors to commit to memory:
| Function | At x = 0 | Symmetry | Behavior for large |x| |
|---|---|---|---|
| sinh x | 0 | odd: sinh(−x) = −sinh x | ≈ ½ eˣ (for x large positive) |
| cosh x | 1 (minimum) | even: cosh(−x) = cosh x | ≈ ½ eˣ (for x large positive) |
| tanh x | 0 | odd | → +1 as x → ∞, → −1 as x → −∞ |
Two things to notice. First, everywhere — the chain never sags below its lowest point. Second, is bounded between and ; it is the squashing function that maps the whole real line into the open interval . That single property is why neural networks use it.
The Fundamental Identity
Every property of sinh and cosh flows from one equation:
It is the hyperbolic mirror of . Notice the minus sign — that is the only difference, and it changes the geometry from a circle to a hyperbola. Let's prove it in three lines from the definitions:
Confirm it numerically with the slider in the explorer above. The cell labeled cosh²−sinh² always reads , no matter how you drag .
Why “Hyperbolic”? Circle vs Hyperbola
The name comes from a perfect geometric parallel. Recall:
- The point traces the unit circle . And equals twice the area of the circular sector swept from the positive -axis to that point.
- The point traces the unit hyperbola . And equals twice the area of the hyperbolic sector swept from to that point.
That is the entire reason for the name. In trigonometry, the parameter is an angle. In hyperbolic trigonometry, the parameter is a hyperbolic angle — a swept area, not an angle in radians.
Why “hyperbolic”? Circle vs Hyperbola
On the circle, the parameter t is an angle. On the hyperbola, t is a hyperbolic angle — but in both cases t equals twice the shaded area swept from the x-axis.
Unit circle: x² + y² = 1
Unit hyperbola: x² − y² = 1
Slide t. The two shaded regions always have area t/2. That is the meaning of t for sinh and cosh — it is the hyperbolic analog of an angle, not an angle in radians.
Analogy clincher. The circle and the hyperbola differ by a single sign: vs . Every identity, derivative, and series for hyperbolic functions can be obtained from its circular cousin by carefully flipping one sign.
Algebraic Identities
Compare these side-by-side with their circular relatives. Notice how often a sign quietly flips:
| Trigonometric | Hyperbolic |
|---|---|
| sin² + cos² = 1 | cosh² − sinh² = 1 |
| sin(a + b) = sin a cos b + cos a sin b | sinh(a + b) = sinh a cosh b + cosh a sinh b |
| cos(a + b) = cos a cos b − sin a sin b | cosh(a + b) = cosh a cosh b + sinh a sinh b |
| sin(2a) = 2 sin a cos a | sinh(2a) = 2 sinh a cosh a |
| cos(2a) = cos²a − sin²a | cosh(2a) = cosh²a + sinh²a |
| 1 + tan² = sec² | 1 − tanh² = sech² |
These are not coincidence. They drop out of the definitions in one line. For example, expand :
The last step is just regrouping into the two pieces and . Try it on paper — it is two lines of algebra.
Inverse Hyperbolic Functions
Because and are strictly increasing, they have proper inverses on all of . is not one-to-one (it's even), so we restrict to to invert it. The beautiful surprise: all three inverses have closed-form logarithm expressions.
Let's derive to show how clean the algebra is. Set , then solve for . Multiply through by :
That is the quadratic formula applied to a hidden quadratic in . The plus root is taken because rules out the minus root.
The Catenary — Where cosh Really Lives
Now we earn the story we opened with. A flexible chain of uniform mass per unit length, hanging under gravity, satisfies a balance equation between tension and weight. Without doing the derivation (we'll do it carefully in Chapter 22), the resulting shape is:
The constant is the ratio of horizontal tension to weight per unit length — small means a tight, heavy chain (sharp dip); large means a light, taut chain (gentle curve). Drag the sliders below to feel it.
The Catenary — a hanging chain is exactly a cosh
Hang a uniform chain between two poles. Gravity + tension force the shape y = a · cosh(x / a). Compare it against the famous lookalike y = a + x²/(2a) (which is only a 2nd-order Taylor approximation).
Increase the span and watch the parabola peel away from the real chain. For small x/a the two agree (that's why Galileo thought the chain was a parabola), but the true shape is cosh — a fact only nailed down in 1691 by the Bernoullis and Leibniz.
Galileo missed it by one term. The Taylor series of cosh starts as For a shallow chain ( small) only the first two terms matter, so — a parabola. That's why Galileo's eye couldn't tell. The discrepancy grows as .
Famous catenaries in the real world:
- The Gateway Arch in St. Louis is an inverted weighted catenary — designed precisely so that every part of the arch is in pure compression.
- Suspension bridge cables hang very close to a parabola because the deck's weight dominates, not the cable weight. The pure catenary is the answer only when the chain itself is the load.
- The shape of an idealized hanging soap film between two rings is a catenoid, the surface of revolution of a catenary.
Worked Example (Collapsible)
Work through this by hand before peeking. The example threads almost every idea in this section through a single computation.
Worked Example — Compute every hyperbolic value at x = 1, then verify the identity, the double-angle formula, and the inverse.
Step 1. Compute and :
Step 2. Plug into the definitions:
Step 3. Check the fundamental identity:
Step 4. Use the double-angle formula :
Step 5. Invert with the log-formula :
Notice the round-trip: . The numbers and reappear inside the log — that's exactly the algebra that derived the closed-form inverse.
Plain Python: Building sinh from Scratch
Before reaching for a library, let's build ourselves from its Taylor series. Recall:
Only the odd powers survive, because is the odd part of (whose full Taylor series is ; even terms cancel when we subtract ). We'll watch the partial sum converge to term by term.
PyTorch: tanh as a Neural Activation
In deep learning, the tanh function is a squashing non-linearity: it takes any real number and maps it into the open interval . It is symmetric about the origin (unlike sigmoid, which is centered at ), which makes gradient flow through deep networks behave better. Here is the smallest meaningful neural-network forward pass that uses it.
The reason early deep networks chose over is that is zero-centered: . With sigmoid, every activation is positive, which biases gradients in one direction and slows learning. Modern networks often replace both with ReLU, but is still the default inside LSTMs, GRUs, and many attention components.
Where Hyperbolic Functions Show Up
Five places, drawn from very different fields, where you cannot avoid , , or :
| Field | Where it appears | Formula |
|---|---|---|
| Architecture / Civil eng. | Hanging chains and arches | y = a · cosh(x/a) |
| Special relativity | Velocity addition via rapidity φ | tanh(φ₁ + φ₂) is the relativistic sum |
| Mechanics | Terminal velocity with quadratic drag | v(t) = v_T · tanh(g t / v_T) |
| Deep learning | tanh activation, scaled dot-product in attention | a = tanh(W x + b) |
| Geometry / Cartography | Mercator projection latitude | y = ln(tan(π/4 + ϕ/2)) = arctanh(sin ϕ) |
Take the falling-object example for a moment. With air drag proportional to , Newton's second law has the closed-form solution . The terminal velocity is the height of the horizontal asymptote you saw in the explorer. Falling raindrops, skydivers, and ping-pong balls all trace out a curve when plotted velocity vs. time. The same shape governs how a neuron saturates. Same math, different universe.
Summary
- Definitions. , , . They are the odd and even parts of .
- Identity. . This is what puts on the hyperbola for every .
- Geometry. Trigonometric functions parametrize the unit circle; hyperbolic functions parametrize the unit hyperbola. In both cases the parameter is twice the swept area, not the arc length.
- Inverses. Every inverse has a closed-form log expression, e.g. .
- Applications. The catenary , relativistic rapidity, terminal velocity, and the neural activation all share the same underlying object.
Exercises
- Quick definitions. Without a calculator, compute and in closed form. Hint: .
- Identity hunt. Starting from the definitions, prove the double-angle formula . Then write in terms of .
- Inverse derivation. Mimic the derivation in this section to derive the closed form for . You will end up solving a linear equation in , not a quadratic.
- Catenary fit. A telephone wire hangs between two poles 60 m apart, dipping 5 m below the attachment points. Find so that matches. Solve numerically — there is no closed form for .
- Coding exercise. Extend the plain-Python series in this section so it computes from its Taylor series (only even powers!). Verify your answer against from the worked example.
- Neural net check. In the PyTorch snippet, replace with the sigmoid . By hand, predict the new outputs using , then run the code to confirm.