## Definitions

### General

The hyperbolic tangent function is defined as:

\[ \tanh{x} = \frac{\sinh{x}}{\cosh{x}} = \frac{\mathrm{e}^x-\mathrm{e}^{-x}}{\mathrm{e}^x+\mathrm{e}^{-x}} \]

The graph of the hyperbolic tangent function is shown in the figure below. It is a monotonic function unlike the trigonometric tangent, which is periodic .

### Series

All hyperbolic functions can be defined in an infinite series form. Hyperbolic tangent function can be written as:

\[ \begin{split} \tanh x & = \sum_{n=1}^{\infty}\frac{ 2^{2n} (2^{2n}-1) B_{2n} x^{2n-1}}{(2n)!} = \\ & = x - \frac{x^3}{3} + \frac{2 x^5}{15} - \frac{17 x^7}{315} \cdots \end{split} \]

The above series converges for \( -\frac{pi}{2} < x < \frac{pi}{2}\). B_{n} denotes the n-th Bernulli number.

From the expanded form of the series it can be seen that the higher terms become insignificant, for values of x close to zero, resulting in the following quite useful approximation:

\[ \tanh x \approx x, \quad x \to 0 \]

### Properties

The derivative of the hyperbolic tangent function is:

\[ \left(\tanh{x}\right)' = 1-\tanh^2{x} = \frac{1}{\cosh^2{x}} \]

The integral of the hyperbolic tangent is given by:

\[ \int \tanh{x} \, \mathrm{d}x = \ln\left(\cosh{x}\right) +C \]

### Identities

\[ \begin{split} & \tanh{\left(-x\right)} & = -\tanh{x} \\ \\ & \tanh{x} & = \frac{1}{\coth{x}} \\ \\ & \tanh{\left(2 x\right)} & = \frac{2\tanh{x}}{1+\tanh^2{x}} \\ \\ & \tanh{\left(x + y\right)} & = \frac{\tanh{x}+\tanh{y}}{1+\tanh{x}\tanh{y}} \\ \\ & \tanh{\left(\frac{x}{2}\right)} & = \frac{\sinh{x}}{\cosh{x}+1} \\ \\ & \tanh^2{x} & = 1-\mathrm{sech}^2\,{x} \\ \\ \end{split} \]