[Advanced] — a second family built from the same algebra, describing the hanging cable rather than the turning wheel.
Before you start
- You know the circular functions and the unit-circle definition — graphs and identities.
- You are comfortable with and — indices and logarithms.
- Helpful but not required: derivatives — derivative rules.
What you will be able to do after this lesson:
- Define , and from exponentials, and state the identity that replaces .
- Explain what is hyperbolic about them — that they parametrise exactly as the circular functions parametrise .
- Convert a circular identity into its hyperbolic counterpart using Osborn’s rule, and say why the rule has the sign change it does.
- Derive the inverse by solving a quadratic.
Study route: read 1–5, attempt the prediction in section 5, then run the lab. Block 4 answers a question that was open for 50 years.
1. Why this exists
Hang a chain between two posts. What curve does it make?
Galileo said a parabola. He was wrong, and it took until 1691 for Johann Bernoulli, Huygens and Leibniz — working independently on a challenge problem — to establish the real answer. The curve is a catenary, from Latin catena, a chain:
and is not a circular function at all. The distinction is not academic: it is the difference between a stable arch and one that fails, and every suspension bridge and overhead power line is designed around it.
The functions arise the same way in a second setting entirely. Rotation in the plane preserves and is described by and . The transformation in special relativity — a Lorentz boost — preserves , and is described by and . Same algebra, one sign changed.
2. The definitions
They are simply the even and odd parts of : any function splits uniquely into a symmetric piece and an antisymmetric piece, and for those pieces are and . Adding them recovers what you started with:
| Term | Plain-English definition | Note |
|---|---|---|
| ”cosh” — the even part of | Always ; symmetric about the -axis | |
| ”shine” or “sinch” — the odd part | Odd, strictly increasing, all reals | |
| ”tanch” — their ratio | S-shaped, asymptotes at | |
| Catenary | The curve of a hanging flexible chain | |
| Osborn’s rule | The recipe converting circular identities to hyperbolic ones | See section 4 |
3. What is hyperbolic about them
Compute directly:
Expanding both squares:
So:
Now compare the two families side by side:
| Circular | Hyperbolic | |
|---|---|---|
| Identity | ||
| Curve traced by or | Unit circle | Unit hyperbola (right branch) |
| Range of the parameter | covers it once | covers one branch |
| Periodic? | Yes, period | No — never repeats |
| Meaning of the parameter | Twice the area of the circular sector | Twice the area of the hyperbolic sector |
That last row is the deepest correspondence and the least often mentioned. In both cases the parameter is twice the swept sector area — the circular one happens to coincide with arc length, which is why we call it an angle. For the hyperbola there is no angle, but the area interpretation carries over unchanged.
The point can never reach the left branch, because always. Block 2 of the lab traces the branch.
Graphs and derivatives
| Function | Range | Shape | Derivative |
|---|---|---|---|
| U-shaped, minimum at | |||
| Odd, through the origin, increasing | |||
| S-shaped, asymptotic to |
The derivatives are worth noticing: with no minus sign, unlike . This is why and solve while and solve — a restoring force gives oscillation, a repelling one gives exponential growth.
4. Osborn’s rule
Every circular identity has a hyperbolic counterpart, obtained mechanically:
Replace and , then change the sign of any term containing a product of two sines.
Examples:
| Circular | Hyperbolic |
|---|---|
Note the third row is unchanged — it contains no product of two sines.
Why the rule works. From the definitions, and . Substituting into a circular identity produces the hyperbolic one, and each contributes a factor of ; a product of two sines contributes , which is precisely the sign change. The rule is a bookkeeping device for that substitution, and it becomes obvious once complex numbers are available — see complex numbers (reserved).
The inverse functions are logarithms
Solve for . Write :
A quadratic in . By the formula:
Since and , the minus root is negative and must be discarded. So , giving:
Similarly for , and for .
The circular inverses are nothing like this. Hyperbolic functions are built from exponentials, so their inverses are logarithms — the whole family stays inside elementary algebra.
TIP
Predict before running the lab. A chain and a parabola are hung between the same two posts, sagging by the same amount at the centre. Are they the same curve? If not, where do they differ most — near the posts, near the middle, or somewhere between? Decide before opening the answers.
5. The catenary, and why it is not a parabola
A chain of uniform weight per unit length hangs as . A cable carrying a uniform weight per unit horizontal distance — a suspension bridge deck, where the roadway is far heavier than the cable — hangs as a parabola.
So both curves are physically real; they answer different loading questions. Galileo’s error was assuming the chain case behaves like the deck case.
The two curves are genuinely different, though they look alike. Expanding as a series:
The first two terms are a parabola. The catenary is a parabola plus an correction, so for a shallow sag — where is small — the two are nearly indistinguishable, and Galileo’s guess was a good approximation for exactly that reason. As the sag deepens, the term takes over.
Block 4 of the lab measures the gap.
Worked example — runnable
Runnable example: save as hyperbolic.py in any empty directory and run python3 hyperbolic.py. Standard library only; writes no files.
"""Hyperbolic functions: definitions, the hyperbola, Osborn's rule, catenary."""
import math
EPS = 1e-12
def cosh(x):
return (math.exp(x) + math.exp(-x)) / 2
def sinh(x):
return (math.exp(x) - math.exp(-x)) / 2
def tanh(x):
return sinh(x) / cosh(x)
def arsinh(y):
"""Derived by solving t^2 - 2yt - 1 = 0 for t = e^x."""
return math.log(y + math.sqrt(y * y + 1))
def catenary(x, a):
"""A chain of uniform weight per unit length, lowest point at the origin."""
return a * cosh(x / a) - a
def matched_parabola(x, half_span, sag):
"""The parabola through the same endpoints with the same central sag."""
return sag * (x / half_span) ** 2
if __name__ == "__main__":
print("Block 1 - the definitions match the library, and cosh + sinh = e^x")
for x in (-2.5, -1.0, 0.0, 0.5, 3.0):
assert abs(cosh(x) - math.cosh(x)) < EPS
assert abs(sinh(x) - math.sinh(x)) < EPS
assert abs((cosh(x) + sinh(x)) - math.exp(x)) < EPS
print(" cosh and sinh are the even and odd parts of e^x, for every x tried")
print(f" cosh(0) = {cosh(0):.6f} (the minimum), sinh(0) = {sinh(0):.6f}")
print()
print("Block 2 - (cosh t, sinh t) traces the unit hyperbola x^2 - y^2 = 1")
print(" t cosh t sinh t cosh^2 - sinh^2")
for t in (-2.0, -1.0, 0.0, 1.0, 2.0, 5.0):
c, s = cosh(t), sinh(t)
print(f" {t:6.1f} {c:10.6f} {s:10.6f} {c*c - s*s:.10f}")
assert abs(c * c - s * s - 1) < 1e-9
print(" cosh is never below 1, so only the right branch is ever reached")
assert min(cosh(t) for t in (-5, -1, 0, 1, 5)) >= 1.0
print()
print("Block 3 - Osborn's rule, checked against the real identities")
for A, B in [(0.5, 1.3), (-1.0, 2.0), (2.5, -0.75)]:
# cos(A+B) = cosAcosB - sinAsinB -> sign flips (product of two sines)
assert abs(cosh(A + B) - (cosh(A) * cosh(B) + sinh(A) * sinh(B))) < 1e-9
# sin(A+B) = sinAcosB + cosAsinB -> unchanged (no sin*sin term)
assert abs(sinh(A + B) - (sinh(A) * cosh(B) + cosh(A) * sinh(B))) < 1e-9
# cos2A = 1 - 2sin^2 A -> cosh2A = 1 + 2sinh^2 A
assert abs(cosh(2 * A) - (1 + 2 * sinh(A) ** 2)) < 1e-9
print(" cosh(A+B), sinh(A+B) and cosh(2A) confirm the sign rule")
print(" the inverse is a logarithm, not another transcendental:")
for y in (-3.0, 0.0, 1.0, 7.5):
x = arsinh(y)
print(f" arsinh({y:5.1f}) = ln(y + sqrt(y^2+1)) = {x:10.6f} sinh(x) = {sinh(x):.6f}")
assert abs(sinh(x) - y) < 1e-9
print()
print("Block 4 - catenary versus parabola, same posts and same sag")
A_PARAM, HALF_SPAN = 1.0, 2.0
SAG = catenary(HALF_SPAN, A_PARAM)
print(f" posts at x = +/-{HALF_SPAN}, both curves sag by {SAG:.6f} at the centre")
print(" x catenary parabola difference")
worst_x, worst = 0.0, 0.0
for i in range(0, 21):
x = HALF_SPAN * i / 20
cat, par = catenary(x, A_PARAM), matched_parabola(x, HALF_SPAN, SAG)
if abs(cat - par) > worst:
worst_x, worst = x, abs(cat - par)
if i % 5 == 0:
print(f" {x:6.2f} {cat:10.6f} {par:10.6f} {cat - par:+10.6f}")
print(f" they agree at both ends and at the centre, by construction")
print(f" largest gap {worst:.6f} at x = {worst_x:.2f} - between centre and post")
assert abs(catenary(0, A_PARAM)) < EPS
assert abs(catenary(HALF_SPAN, A_PARAM) - SAG) < EPS
assert worst > 0.01, "the two curves are genuinely different"
assert 0.0 < worst_x < HALF_SPAN
print()
print(" a shallower sag makes the parabola a better approximation:")
for a in (1.0, 4.0, 16.0, 64.0):
sag = catenary(HALF_SPAN, a)
gap = max(abs(catenary(HALF_SPAN * i / 20, a)
- matched_parabola(HALF_SPAN * i / 20, HALF_SPAN, sag))
for i in range(21))
print(f" a = {a:5.1f}: sag {sag:9.6f}, largest gap {gap:.8f}")
print()
print("Block 5 - tanh saturates, which is why it was used as an activation")
for x in (0.0, 0.5, 1.0, 2.0, 5.0, 10.0):
print(f" tanh({x:5.1f}) = {tanh(x):.10f}")
assert -1 < tanh(x) < 1
print(" it never reaches 1, but by x = 10 it is within 1e-8 of it")
assert abs(tanh(10.0) - 1) < 1e-8
print()
print("hyperbolic: passed")Expected output:
Block 1 - the definitions match the library, and cosh + sinh = e^x
cosh and sinh are the even and odd parts of e^x, for every x tried
cosh(0) = 1.000000 (the minimum), sinh(0) = 0.000000
Block 2 - (cosh t, sinh t) traces the unit hyperbola x^2 - y^2 = 1
t cosh t sinh t cosh^2 - sinh^2
-2.0 3.762196 -3.626860 1.0000000000
-1.0 1.543081 -1.175201 1.0000000000
0.0 1.000000 0.000000 1.0000000000
1.0 1.543081 1.175201 1.0000000000
2.0 3.762196 3.626860 1.0000000000
5.0 74.209949 74.203211 1.0000000000
cosh is never below 1, so only the right branch is ever reached
Block 3 - Osborn's rule, checked against the real identities
cosh(A+B), sinh(A+B) and cosh(2A) confirm the sign rule
the inverse is a logarithm, not another transcendental:
arsinh( -3.0) = ln(y + sqrt(y^2+1)) = -1.818446 sinh(x) = -3.000000
arsinh( 0.0) = ln(y + sqrt(y^2+1)) = 0.000000 sinh(x) = 0.000000
arsinh( 1.0) = ln(y + sqrt(y^2+1)) = 0.881374 sinh(x) = 1.000000
arsinh( 7.5) = ln(y + sqrt(y^2+1)) = 2.712465 sinh(x) = 7.500000
Block 4 - catenary versus parabola, same posts and same sag
posts at x = +/-2.0, both curves sag by 2.762196 at the centre
x catenary parabola difference
0.00 0.000000 0.000000 +0.000000
0.50 0.127626 0.172637 -0.045011
1.00 0.543081 0.690549 -0.147468
1.50 1.352410 1.553735 -0.201325
2.00 2.762196 2.762196 +0.000000
they agree at both ends and at the centre, by construction
largest gap 0.202577 at x = 1.40 - between centre and post
a shallower sag makes the parabola a better approximation:
a = 1.0: sag 2.762196, largest gap 0.20257742
a = 4.0: sag 0.510504, largest gap 0.00263562
a = 16.0: sag 0.125163, largest gap 0.00004071
a = 64.0: sag 0.031253, largest gap 0.00000064
Block 5 - tanh saturates, which is why it was used as an activation
tanh( 0.0) = 0.0000000000
tanh( 0.5) = 0.4621171573
tanh( 1.0) = 0.7615941560
tanh( 2.0) = 0.9640275801
tanh( 5.0) = 0.9999092043
tanh( 10.0) = 0.9999999959
it never reaches 1, but by x = 10 it is within 1e-8 of it
hyperbolic: passed
The second half of block 4 is the quantitative version of Galileo’s mistake. As the sag gets shallower the gap collapses fast — which is why the wrong answer survived for so long.
Common pitfalls and traps
- Expecting periodicity. These functions never repeat. grows without bound and approaches its asymptotes. Nothing here has a period.
- Getting the identity’s sign wrong. It is , with a minus. Writing gives a false statement that is easy to miss.
- Forgetting the domain of . , so is undefined for . And is even, so its inverse needs a branch choice — conventionally the non-negative one.
- Assuming the derivative has a minus sign. . The absence of the minus is the entire difference between oscillation and growth.
- Calling a hanging chain a parabola. The correct answer depends on how the weight is distributed: uniform per unit length gives a catenary; uniform per unit horizontal distance gives a parabola.
- Computing for large arguments naively.
math.exp(800)overflows, but is a perfectly meaningful (enormous) number. The lab stays in a safe range; production code needs the scaled form.
Check your understanding
- Show and directly from the definitions.
- Use Osborn’s rule to write the hyperbolic version of .
- Evaluate exactly.
- Why can the point never reach the left branch of ?
- What is , and what does that mean for as a neural-network activation function?
Answers — open only after an attempt
- . Subtracting instead cancels the terms and leaves .
- There is no product of two sines, so nothing changes: .
- .
- Because is a sum of two positive numbers, and by AM–GM it is at least . The -coordinate is therefore always , so the point stays on the right branch.
- . As an activation function this means the output saturates: for large inputs the derivative becomes vanishingly small, so gradients almost stop flowing. This is the vanishing-gradient problem, and it is the main reason ReLU displaced in deep networks.
And the prediction from section 4: they are not the same curve. Both pass through the two posts and both have the same central sag, so they agree at exactly three points — and differ everywhere else. The largest gap falls between the centre and the posts, which the lab locates at out of a half-span of .
Practice — independent task
Implement hang_chain(span, sag): given the horizontal distance between two posts at equal height, and the required central sag, find the catenary parameter and the chain’s arc length.
- The relation is . This cannot be solved for in closed form — it is transcendental. Solve it numerically by bisection or Newton’s method, and say in a comment how you chose your bracket.
- The arc length of from to is . Derive this — the integrand simplifies beautifully because of the main identity. Show the simplification in a comment.
- Assert the chain is always longer than the straight-line distance between the posts, and longer than the span.
- Check a limiting case you can verify independently: as the sag tends to zero, arc length must tend to the span. Confirm numerically for a sequence of shrinking sags, and report the rate at which the excess shrinks.
- Compare against the parabola: for the same span and sag, compute the parabolic arc length numerically and report the relative difference for sag/span ratios of , and .
Edge cases: zero sag (degenerate — decide whether to raise or return the span); sag larger than the span; a solver bracket that fails to contain the root.
Done when: your solved reproduces the requested sag to within 1e-9, your limiting check in step 4 behaves as you predicted before running it, and your step-5 table shows the catenary and parabola converging as the sag shrinks.
Tradeoffs, limits and extensions
Numerical care with large arguments. and overflow around in double precision, even though the mathematical values are finite. Worse, for small computed as suffers catastrophic cancellation — two nearly equal numbers subtracted. Python’s math.sinh uses a series expansion near zero for this reason; the lab’s hand-written sinh does not, and would lose precision for near .
Where these turn up. Beyond the catenary: the shape of a soap film between two rings (a catenoid, the minimal surface of revolution); the Lorentz transformation, where “rapidity” is the hyperbolic angle and velocities add by addition rather than plain addition; the logistic function of statistics and machine learning, which is rescaled; and the solutions of , which is the ODE describing anything with a repelling rather than restoring force.
The arch connection. An inverted catenary is the shape in which a free-standing arch carries pure compression with no bending anywhere — Gaudí used hanging-chain models upside down to design them, and the Gateway Arch in St. Louis is a weighted catenary for the same reason.
Before moving on
You are done with this lesson when you can:
- Write the three definitions from memory and show .
- Prove by expanding, and say which curve that parametrises.
- Apply Osborn’s rule and explain where its sign change comes from.
- Derive by solving a quadratic in .
Recap for later lookup: , , ; , parametrising the right branch of ; not periodic; and , no minus signs; Osborn’s rule flips the sign of any product; ; a hanging chain is , not a parabola.
Next: Mensuration: Plane Shapes — from angles and curves to the areas they enclose.
Related
- Graphs and Identities — the circular family this one mirrors
- Indices and Logarithms — the exponentials these are built from
- Complex Numbers (reserved) — where Osborn’s rule stops being a trick
- Ordinary Differential Equations (reserved) — versus
Software engineering
Infrastructure & security
Computer science
Hardware & engineering