Hyperbolic Functions
What You'll Learn: In this tutorial, you'll discover various hyperbolic functions available in Python's math module. These functions help you perform calculations involving hyperbolic trigonometric operations.
Hyperbolic Functions
math.sinh(x)- Returns the hyperbolic sine of x.Example:
pythonimport math x = math.sinh(1) print(x) # Output: 1.1752011936438014
math.cosh(x)- Returns the hyperbolic cosine of x.Example:
pythonimport math x = math.cosh(1) print(x) # Output: 1.5430806348152437
math.tanh(x)- Returns the hyperbolic tangent of x.Example:
pythonimport math x = math.tanh(1) print(x) # Output: 0.7615941559557649
math.asinh(x)- Returns the inverse hyperbolic sine of x.Example:
pythonimport math x = math.asinh(1) print(x) # Output: 0.881373587019543
math.acosh(x)- Returns the inverse hyperbolic cosine of x.Example:
pythonimport math x = math.acosh(2) print(x) # Output: 1.3169578969248166
math.atanh(x)- Returns the inverse hyperbolic tangent of x.Example:
pythonimport math x = math.atanh(0.5) print(x) # Output: 0.5493061443340548
Try It Yourself: Fun Exercises
- Explore Hyperbolic Functions:
- Use
math.sinh(),math.cosh(), andmath.tanh()to calculate the hyperbolic sine, cosine, and tangent of various values.
- Use
- Inverse Hyperbolic Functions:
- Experiment with
math.asinh(),math.acosh(), andmath.atanh()to understand how they work with different values.
- Experiment with
Summary:
In this Python tutorial, we explored various hyperbolic functions available in the math module. These functions help you perform calculations involving hyperbolic trigonometric operations. Keep experimenting and have fun with Python!