Tanh
Tanh[z]
gives the hyperbolic tangent of .
Details
- 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. »
- Tanh can be used with Interval and CenteredInterval objects. »
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.
Examples
open allclose allBasic Examples (5)
Scope (46)
Numerical Evaluation (5)
The precision of the output tracks the precision of the input:
Tanh can take complex number inputs:
Evaluate Tanh efficiently at high precision:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix Tanh function using MatrixFunction:
Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:
Or compute average-case statistical intervals using Around:
Specific Values (4)
Values of Tanh at fixed purely imaginary points:
Zero of Tanh:
Find the zero using Solve:
Simple exact values are generated automatically:
More complicated cases require explicit use of FunctionExpand:
Visualization (3)
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:
While it is not analytic on the complex plane, it is meromorphic:
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:
TraditionalForm formatting:
Integration (3)
Indefinite integral of Tanh:
Definite integral of an odd integrand over an interval centered at the origin is 0:
Series Expansions (4)
Integral Transforms (2)
Function Identities and Simplifications (6)
Function Representations (4)
Representation through Tan:
Representation through Bessel functions:
Applications (4)
Properties & Relations (13)
Basic parity and periodicity properties of Tanh are automatically applied:
Expressions containing hyperbolic functions do not automatically simplify:
Use Refine, Simplify, and FullSimplify to simplify expressions containing Tanh:
Use FunctionExpand to express special values in radicals:
Compose with inverse functions:
Numerically find a root of a transcendental equation:
Obtain Tanh from sums and integrals:
Tanh appears in special cases of special functions:
Tanh is a numeric function:
Possible Issues (4)
Machine-precision input is insufficient to give a correct answer:
With exact input, the answer is correct:
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:
Text
Wolfram Research (1988), Tanh, Wolfram Language function, https://reference.wolfram.com/language/ref/Tanh.html (updated 2021).
CMS
Wolfram Language. 1988. "Tanh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Tanh.html.
APA
Wolfram Language. (1988). Tanh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Tanh.html