gives the hyperbolic tangent of .
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Sinh[z]/Cosh[z] is automatically converted to Tanh[z]. TrigFactorList[expr] does decomposition.
- For certain special arguments, Tanh automatically evaluates to exact values.
- Tanh can be evaluated to arbitrary numerical precision.
- Tanh automatically threads over lists.
Background & Context
- Tanh is the hyperbolic tangent function, which is the hyperbolic analogue of the Tan circular function used throughout trigonometry. Tanh[α] is defined as the ratio of the corresponding hyperbolic sine and hyperbolic cosine functions via . Tanh may also be defined as , where is the base of the natural logarithm Log.
- Tanh automatically evaluates to exact values when its argument is the (natural) logarithm of a rational number. When given exact numeric expressions as arguments, Tanh may be evaluated to arbitrary numeric precision. TrigFactorList can be used to factor expressions involving Tanh into terms containing Sinh, Cosh, Sin, and Cos. Other operations useful for manipulation of symbolic expressions involving Tanh include TrigToExp, TrigExpand, Simplify, and FullSimplify.
- Tanh threads element-wise over lists and matrices. In contrast, MatrixFunction can be used to give the hyperbolic tangent of a square matrix (i.e. the power series for the hyperbolic tangent function with ordinary powers replaced by matrix powers) as opposed to the hyperbolic tangents of the individual matrix elements.
- Tanh[x] approaches for small negative x and for large positive x. Tanh satisfies an identity similar to the Pythagorean identity satisfied by Tan, namely . The definition of the hyperbolic tangent function is extended to complex arguments by way of the identities and . Tanh has poles at values for an integer and evaluates to ComplexInfinity at these points. Tanh[z] has series expansion about the origin that may be expressed in terms of the Bernoulli numbers BernoulliB.
- The inverse function of Tanh is ArcTanh. Additional related mathematical functions include Sinh, Coth, and Tan.
Examplesopen allclose all
Basic Examples (5)
Numerical Evaluation (5)
Specific Values (4)
Plot the Tanh function:
Function Properties (12)
Tanh is defined for all real values:
Tanh achieves all real values from the open interval :
Tanh is an odd function:
Tanh has the mirror property :
Tanh is an analytic function of over the reals:
Tanh is monotonic:
Tanh is injective:
Tanh is not surjective:
Tanh is neither non-negative nor non-positive:
Tanh has no singularities or discontinuities:
Tanh is neither convex nor concave:
Indefinite integral of Tanh:
Series Expansions (4)
Function Identities and Simplifications (6)
Function Representations (4)
Representation through Tan:
Properties & Relations (13)
Basic parity and periodicity properties of Tanh are automatically applied:
Use FunctionExpand to express special values in radicals:
Obtain Tanh from sums and integrals:
Tanh appears in special cases of special functions:
Tanh is a numeric function:
Possible Issues (4)
A larger setting for $MaxExtraPrecision can be needed:
No power series exists at infinity, where Tanh has an essential singularity:
In TraditionalForm, parentheses are needed around the argument:
Wolfram Research (1988), Tanh, Wolfram Language function, https://reference.wolfram.com/language/ref/Tanh.html (updated 1996).
Wolfram Language. 1988. "Tanh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Tanh.html.
Wolfram Language. (1988). Tanh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Tanh.html