NumPy Hyperbolic Functions
🌊 NumPy Hyperbolic Functions
NumPy provides hyperbolic functions that operate element-wise on arrays. Hyperbolic functions are analogues of trigonometric functions but for a hyperbola instead of a circle.
1. Basic Hyperbolic Functions
| Function | Description |
|---|---|
np.sinh(x) | Hyperbolic sine sinh(x) |
np.cosh(x) | Hyperbolic cosine cosh(x) |
np.tanh(x) | Hyperbolic tangent tanh(x) |
1 2 3 4 5 6 7 | import numpy as np x = np.array([0, 1, 2]) print("sinh:", np.sinh(x)) # [0. 1.17520119 3.62686041] print("cosh:", np.cosh(x)) # [1. 1.54308063 3.76219569] print("tanh:", np.tanh(x)) # [0. 0.76159416 0.96402758] |
sinh(x) = (e^x - e^-x)/2cosh(x) = (e^x + e^-x)/2tanh(x) = sinh(x)/cosh(x)
 2. Inverse Hyperbolic Functions
| Function | Description |
|---|---|
np.arcsinh(x) | Inverse hyperbolic sine |
np.arccosh(x) | Inverse hyperbolic cosine |
np.arctanh(x) | Inverse hyperbolic tangent |
Returns values in radians
Domain:
arcsinh→ all real numbersarccosh→ x ≥ 1arctanh→ -1 < x < 1
 3. Applications
Engineering: signal processing, transmission lines
Mathematics: solving hyperbolic equations
Physics: special relativity, rapidity calculation
 4. Notes & Tips
Use NumPy arrays for vectorized computations
Combine with other functions (like
np.exp,np.log) for advanced calculationsBe careful with domains of inverse functions
🎯 Practice Exercises
Compute sinh, cosh, tanh for
[0,1,2,3].Compute arcsinh, arccosh, arctanh for
[0,1,2]or[0,0.5,0.8].Verify identity:
cosh(x)^2 - sinh(x)^2 = 1forx = [0,1,2].
