# Hyperbolic functions

mpmath.cosh(x, **kwargs)

  Computes the hyperbolic cosine of \(x\), \(\cosh(x) = (e^x + e^{-x})/2\). Values and limits include:

      >>> from mpmath import mp, cosh, inf, chop, taylor, nprint, cos
      >>> mp.dps = 25
      >>> mp.pretty = True
      >>> cosh(0)
      1.0
      >>> cosh(1)
      1.543080634815243778477906
      >>> cosh(-inf), cosh(+inf)
      (inf, inf)

  The hyperbolic cosine is an even, convex function with a global minimum at \(x = 0\), having a Maclaurin series that starts:

      >>> nprint(chop(taylor(cosh, 0, 5)))
      [1.0, 0.0, 0.5, 0.0, 0.0416667, 0.0]

  Generalized to complex numbers, the hyperbolic cosine is equivalent to a cosine with the argument rotated in the imaginary direction, or \(\cosh x = \cos ix\):

      >>> cosh(2+3j)
      (-3.724545504915322565473971 + 0.5118225699873846088344638j)
      >>> cos(3-2j)
      (-3.724545504915322565473971 + 0.5118225699873846088344638j)

mpmath.sinh(x, **kwargs)

  Computes the hyperbolic sine of \(x\), \(\sinh(x) = (e^x - e^{-x})/2\). Values and limits include:

      >>> from mpmath import mp, sinh, inf, chop, taylor, nprint, j
      >>> mp.dps = 25
      >>> mp.pretty = True
      >>> sinh(0)
      0.0
      >>> sinh(1)
      1.175201193643801456882382
      >>> sinh(-inf), sinh(+inf)
      (-inf, inf)

  The hyperbolic sine is an odd function, with a Maclaurin series that starts:

      >>> nprint(chop(taylor(sinh, 0, 5)))
      [0.0, 1.0, 0.0, 0.166667, 0.0, 0.00833333]

  Generalized to complex numbers, the hyperbolic sine is essentially a sine with a rotation \(i\) applied to the argument; more precisely, \(\sinh x = -i \sin ix\):

      >>> sinh(2+3j)
      (-3.590564589985779952012565 + 0.5309210862485198052670401j)
      >>> j*sin(3-2j)
      (-3.590564589985779952012565 + 0.5309210862485198052670401j)

mpmath.tanh(x, **kwargs)

  Computes the hyperbolic tangent of \(x\), \(\tanh(x) = \sinh(x)/\cosh(x)\). Values and limits include:

      >>> from mpmath import mp, tanh, inf, nprint, chop, taylor, j
      >>> mp.dps = 25
      >>> mp.pretty = True
      >>> tanh(0)
      0.0
      >>> tanh(1)
      0.7615941559557648881194583
      >>> tanh(-inf), tanh(inf)
      (-1.0, 1.0)

  The hyperbolic tangent is an odd, sigmoidal function, similar to the inverse tangent and error function. Its Maclaurin series is:

      >>> nprint(chop(taylor(tanh, 0, 5)))
      [0.0, 1.0, 0.0, -0.333333, 0.0, 0.133333]

  Generalized to complex numbers, the hyperbolic tangent is essentially a tangent with a rotation \(i\) applied to the argument; more precisely, \(\tanh x = -i \tan ix\):

      >>> tanh(2+3j)
      (0.9653858790221331242784803 - 0.009884375038322493720314034j)
      >>> j*tan(3-2j)
      (0.9653858790221331242784803 - 0.009884375038322493720314034j)

mpmath.sech(z)

  Computes the hyperbolic secant of \(x\), \(\mathrm{sech}(x) = \frac{1}{\cosh(x)}\).

mpmath.csch(z)

  Computes the hyperbolic cosecant of \(x\), \(\mathrm{csch}(x) = \frac{1}{\sinh(x)}\).

mpmath.coth(z)

  Computes the hyperbolic cotangent of \(x\), \(\mathrm{coth}(x) = \frac{\cosh(x)}{\sinh(x)}\).

## Inverse hyperbolic functions

mpmath.acosh(x, **kwargs)

  Computes the inverse hyperbolic cosine of \(x\), \(\mathrm{cosh}^{-1}(x) = \log(x+\sqrt{x+1}\sqrt{x-1})\).

mpmath.asinh(x, **kwargs)

  Computes the inverse hyperbolic sine of \(x\), \(\mathrm{sinh}^{-1}(x) = \log(x+\sqrt{1+x^2})\).

mpmath.atanh(x, **kwargs)

  Computes the inverse hyperbolic tangent of \(x\), \(\mathrm{tanh}^{-1}(x) = \frac{1}{2}\left(\log(1+x)-\log(1-x)\right)\).

mpmath.asech(z)

  Computes the inverse hyperbolic secant of \(x\), \(\mathrm{sech}^{-1}(x) = \cosh^{-1}(1/x)\).

mpmath.acsch(z)

  Computes the inverse hyperbolic cosecant of \(x\), \(\mathrm{csch}^{-1}(x) = \sinh^{-1}(1/x)\).

mpmath.acoth(z)

  Computes the inverse hyperbolic cotangent of \(x\), \(\mathrm{coth}^{-1}(x) = \tanh^{-1}(1/x)\).