Chapter 12: ufunc Hyperbolic

1. What are hyperbolic functions? (intuition first)

Hyperbolic functions are the hyperbolic analogues of ordinary trigonometric functions (sin, cos, tan).

While ordinary trig functions are related to the unit circle (x² + y² = 1), hyperbolic functions are related to the unit hyperbola (x² − y² = 1).

Very simple mental picture:

  • sin, cos → circle → periodic, bounded between −1 and 1
  • sinh, cosh → hyperbola → not periodic, grow exponentially

They appear naturally whenever you have:

  • exponential growth combined with exponential decay
  • special relativity (rapidity, Lorentz factor)
  • catenary curves (hanging chains, power lines)
  • hyperbolic geometry
  • certain differential equations
  • neural network activations (very rare now, but historically)

2. The six main hyperbolic ufuncs in NumPy

Function Computes Input range Output range Inverse function
np.sinh hyperbolic sine any real (−∞, +∞) np.arcsinh
np.cosh hyperbolic cosine any real [1, +∞) np.arccosh (≥0)
np.tanh hyperbolic tangent any real (−1, 1) np.arctanh (−1,1)
np.arcsinh inverse sinh any real (−∞, +∞)
np.arccosh inverse cosh [1, +∞) [0, +∞)
np.arctanh inverse tanh (−1, 1) (−∞, +∞)

3. Basic behavior and important identities

Python

Quick intuition comparison table

Function Behavior as x → +∞ Behavior as x → −∞ At x = 0 Odd / Even
sinh(x) grows like e^x / 2 grows negative like -e^ x / 2
cosh(x) grows like e^x / 2 grows like e^ x / 2
tanh(x) approaches +1 approaches −1 0 odd

4. Visual comparison – the best way to understand

Python

Key observations you should make:

  • sinh(x) is odd, passes through origin, grows exponentially
  • cosh(x) is even, minimum value = 1 at x=0, grows exponentially
  • tanh(x) is odd, bounded between −1 and +1, looks like a stretched sigmoid
  • Larger coefficients make tanh saturate faster

5. Realistic examples & code patterns you will actually use

Pattern 1 – Hyperbolic distance / rapidity in special relativity

Python

Pattern 2 – Catenary curve (hanging chain / power cable)

Python

Pattern 3 – Hyperbolic tangent as activation function

Python

Pattern 4 – Inverse hyperbolic functions (solving for parameters)

Python

Summary – Hyperbolic ufuncs Quick Reference

Function Input range Output range Odd/Even Most common use case
np.sinh any real (−∞, +∞) odd hyperbolic sine, rapidity
np.cosh any real [1, +∞) even hyperbolic cosine, catenary
np.tanh any real (−1, 1) odd activation, bounded output
np.arcsinh any real (−∞, +∞) odd inverse sinh
np.arccosh [1, +∞) [0, +∞) inverse cosh
np.arctanh (−1, 1) (−∞, +∞) odd inverse tanh

Final teacher advice (very important)

Golden rule #1 Hyperbolic functions grow exponentially — they are not bounded (except tanh). Be careful when plotting or using them for activation (tanh saturates, sinh/cosh explode).

Golden rule #2 Use np.arctanh for bounded inputs — very useful when you need to invert tanh.

Golden rule #3 cosh(x) is always ≥ 1 — this is a very useful identity: cosh²(x) − sinh²(x) = 1 (hyperbolic analogue of cos² + sin² = 1)

Golden rule #4 When you see exponential growth combined with exponential decay, or S-shaped curves that are not sigmoid, think hyperbolic functions.

Would you like to continue with any of these next?

  • Hyperbolic identities and numerical identities check
  • How tanh became popular as activation function (and why it’s less used now)
  • Realistic mini-project: catenary curve fitting or rapidity calculation
  • Hyperbolic functions in special relativity (Lorentz transformation)
  • Comparing hyperbolic vs trigonometric functions side-by-side

Just tell me what you want to focus on next! 😊

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *