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)

 

  • sinh(x) = (e^x - e^-x)/2
  • cosh(x) = (e^x + e^-x)/2

  • tanh(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 numbers

    • arccosh → x ≥ 1

    • arctanh → -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 calculations

  • Be careful with domains of inverse functions


🎯 Practice Exercises

  1. Compute sinh, cosh, tanh for [0,1,2,3].

  2. Compute arcsinh, arccosh, arctanh for [0,1,2] or [0,0.5,0.8].

  3. Verify identity: cosh(x)^2 - sinh(x)^2 = 1 for x = [0,1,2].

CodeCapsule

Sanjit Sinha — Web Developer | PHP • Laravel • CodeIgniter • MySQL • Bootstrap Founder, CodeCapsule — Student projects & practical coding guides. Email: info@codecapsule.in • Website: CodeCapsule.in

You may also like...

Leave a Reply

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