# Hyperbolic tangent and hyperbolic cotangent

Hyperbolic tangent graph
Hyperbolic cotangent graph

Hyperbolic tangent and hyperbolic cotangent are hyperbolic functions . They are also called hyperbolic or hyperbolic tangent or Hyperbelkotangens or hyperbolic cotangent .

## Spellings

 Hyperbolic tangent: ${\ displaystyle y = \ tanh \, x}$ Hyperbolic cotangent: ${\ displaystyle y = \ coth \, x}$

## Definitions

${\ displaystyle \ tanh x = {\ frac {\ sinh x} {\ cosh x}} = {\ frac {\ mathrm {e} ^ {x} - \ mathrm {e} ^ {- x}} {\ mathrm {e} ^ {x} + \ mathrm {e} ^ {- x}}} = {\ frac {\ mathrm {e} ^ {2x} -1} {\ mathrm {e} ^ {2x} +1} } = 1 - {\ frac {2} {\ mathrm {e} ^ {2x} +1}}}$
${\ displaystyle \ coth x = {\ frac {\ cosh x} {\ sinh x}} = {\ frac {\ mathrm {e} ^ {x} + \ mathrm {e} ^ {- x}} {\ mathrm {e} ^ {x} - \ mathrm {e} ^ {- x}}} = {\ frac {\ mathrm {e} ^ {2x} +1} {\ mathrm {e} ^ {2x} -1} } = 1 + {\ frac {2} {\ mathrm {e} ^ {2x} -1}}}$

Here and denote the hyperbolic sine or hyperbolic cosine . ${\ displaystyle \ sinh x}$${\ displaystyle \ cosh x}$

## properties

Hyperbolic tangent Hyperbolic cotangent
Domain of definition ${\ displaystyle - \ infty ${\ displaystyle - \ infty  ; ${\ displaystyle x \ neq 0}$
Range of values ${\ displaystyle -1 ${\ displaystyle - \ infty  ; ${\ displaystyle 1
periodicity no no
monotony strictly monotonously increasing ${\ displaystyle x <0}$strictly monotonically falling strictly monotonically falling
${\ displaystyle x> 0}$
Symmetries Point symmetry to the origin of coordinates Point symmetry to the origin of coordinates
Asymptotes ${\ displaystyle x \ to + \ infty \ colon f \ left (x \ right) \ to +1}$
${\ displaystyle x \ to - \ infty \ colon f \ left (x \ right) \ to -1}$
${\ displaystyle x \ to + \ infty \ colon f \ left (x \ right) \ to +1}$
${\ displaystyle x \ to - \ infty \ colon f \ left (x \ right) \ to -1}$
zeropoint ${\ displaystyle x = 0}$ no
Jump points no no
Poles no ${\ displaystyle x = 0}$
Extremes no no
Turning points ${\ displaystyle \ left (0,0 \ right)}$ no

## Special values

The hyperbolic cotangent has two fixed points, i.e. i.e., there are two , so ${\ displaystyle u \ in \ mathbb {R}}$

${\ displaystyle \ coth \, u = u}$.

They are included (sequence A085984 in OEIS ) ${\ displaystyle u _ {\ pm} = \ pm 1 {,} 19967864 \ dots}$

## Inverse functions

The hyperbolic tangent is a bijection . The inverse function is called the hyperbolic areatangens . It is defined for numbers x from the interval and takes all real numbers as a value. It can be expressed using the natural logarithm : ${\ displaystyle \ tanh \ colon \ mathbb {R} \ rightarrow (-1,1)}$${\ displaystyle (-1.1)}$

${\ displaystyle \ operatorname {artanh} x = {\ frac {1} {2}} \ ln {\ frac {1 + x} {1-x}}.}$

The following applies to the inversion of the hyperbolic cotangent:

${\ displaystyle \ operatorname {arcoth} x = {\ frac {1} {2}} \ ln {\ frac {x + 1} {x-1}}}$

## Derivatives

${\ displaystyle {\ frac} {\ mathrm {d} x}} \ tanh x = 1- \ tanh ^ {2} x = {\ frac {1} {\ cosh ^ {2} x }} = \ operatorname {six} ^ {2} x}$
${\ displaystyle {\ frac {\ mathrm {d}} {\ mathrm {d} x}} \ coth x = 1- \ coth ^ {2} x = - {\ frac {1} {\ sinh ^ {2} x}} = - \ operatorname {csch} ^ {2} x}$

The -th derivative is given by ${\ displaystyle n}$

${\ displaystyle {\ frac {\ mathrm {d} ^ {n}} {\ mathrm {d} z ^ {n}}} \ tanh z = {\ frac {2 ^ {n + 1} \ mathrm {e} ^ {2z}} {(1+ \ mathrm {e} ^ {2z}) ^ {n + 1}}} \ sum _ {k = 0} ^ {n-1} (- 1) ^ {k} A_ {n, k} \, \ mathrm {e} ^ {2kz}}$

with the Euler numbers A n, k .

${\ displaystyle \ tanh (\ alpha + \ beta) = {\ frac {\ tanh \ alpha + \ tanh \ beta} {1+ \ tanh \ alpha \, \ tanh \ beta}}}$

Similarly:

${\ displaystyle \ coth (\ alpha + \ beta) = {\ frac {1+ \ coth \ alpha \, \ coth \ beta} {\ coth \ alpha + \ coth \ beta}}}$

## Integrals

${\ displaystyle \ int \ tanh x \, \ mathrm {d} x = \ ln \ cosh x + C}$
${\ displaystyle \ int \ coth x \, \ mathrm {d} x = \ ln | {\ sinh x} | + C}$

## Further representations

### Series developments

${\ displaystyle \ tanh x = \ operatorname {sgn} x \ left [1+ \ sum \ limits _ {k = 1} ^ {\ infty} (- 1) ^ {k} \, 2 \, \ mathrm {e } ^ {- 2k | x |} \ right]}$
${\ displaystyle \ coth x = {\ frac {1} {x}} + \ sum \ limits _ {k = 1} ^ {\ infty} {\ frac {2x} {k ^ {2} \ pi ^ {2 } + x ^ {2}}}}$

The beginning of the Taylor series of the hyperbolic tangent is:

${\ displaystyle \ tanh x = \ sum \ limits _ {n = 1} ^ {\ infty} (- 1) ^ {n-1} \ cdot {\ frac {2 ^ {2n} (2 ^ {2n} - 1)} {(2n)!}} \ Cdot B_ {2n} \ cdot x ^ {2n-1} = x - {\ frac {1} {3}} x ^ {3} + {\ frac {2} {15}} x ^ {5} + \ cdots}$

Those are the Bernoulli numbers . The radius of convergence of this series is . ${\ displaystyle B_ {n}}$${\ displaystyle \ pi / 2}$

### Continued fraction representation

Johann Heinrich Lambert showed the following formula:

${\ displaystyle \ tanh x = {\ frac {x} {1 + {\ cfrac {x ^ {2}} {3 + {\ cfrac {x ^ {2}} {5+ \ ldots}}}}}} }$

## Numerical calculation

Basically, the hyperbolic tangent can be calculated using the well-known formula

${\ displaystyle \ tanh x = {\ frac {\ mathrm {e} ^ {2x} -1} {\ mathrm {e} ^ {2x} +1}}}$

calculated if the exponential function is available. However, there are the following problems: ${\ displaystyle {e} ^ {x}}$

• Large positive operands trigger an overflow, although the end result can always be represented
• For operands close to 0 there is a numerical cancellation, which makes the result imprecise

Case 1 : is a large positive number with : ${\ displaystyle x}$${\ displaystyle {x}> k \ cdot {\ frac {\ ln 10} {2}}}$

${\ displaystyle \ tanh x = + 1}$,
where the number of significant decimal digits is the number type used, which is double 16 for the 64-bit floating point type .${\ displaystyle k}$

Case 2 : is a small negative number with : ${\ displaystyle x}$${\ displaystyle {x} <- k \ cdot {\ frac {\ ln 10} {2}}}$

${\ displaystyle \ tanh x = -1}$

Case 3 : is close to 0, e.g. B. for : ${\ displaystyle x}$${\ displaystyle -0 {,} 1

${\ displaystyle \ tanh x = {\ frac {\ sinh x} {\ mathrm {e} ^ {x} - \ sinh x}}}$
${\ displaystyle \ sinh x}$can be calculated here very precisely using the Taylor series .${\ displaystyle \ sinh x = x + {\ frac {x ^ {3}} {3!}} + {\ frac {x ^ {5}} {5!}} + {\ frac {x ^ {7}} {7!}} + \ Dots}$

Case 4 : All others : ${\ displaystyle x}$

${\ displaystyle \ tanh x = {\ frac {\ mathrm {e} ^ {2x} -1} {\ mathrm {e} ^ {2x} +1}}}$

## Differential equation

${\ displaystyle \ tanh}$ solves the following differential equations:

${\ displaystyle f ^ {\ prime} = 1-f ^ {2}}$ or
${\ displaystyle {\ frac {1} {2}} f ^ {\ prime \ prime} = f ^ {3} -f = f (f ^ {2} -1)}$

with and${\ displaystyle f (0) = 0}$${\ displaystyle f ^ {\ prime} (\ infty) = 0}$

## Complex arguments

${\ displaystyle \ tanh (x + i \, y) = {\ frac {\ sinh (2x)} {\ cosh (2x) + \ cos (2y)}} + i \, {\ frac {\ sin (2y )} {\ cosh (2x) + \ cos (2y)}}}$
${\ displaystyle \ tanh (i \, y) = i \, \ tan y}$
${\ displaystyle \ coth (x + i \, y) = {\ frac {\ sinh (2x)} {\ cosh (2x) - \ cos (2y)}} + i \, {\ frac {- \ sin ( 2y)} {\ cosh (2x) - \ cos (2y)}}}$
${\ displaystyle \ coth (i \, y) = - i \, \ cot y}$

## Applications in physics

• Tangent and cotangent hyperbolicus can be used to describe the time dependency of the speed when falling with air resistance or when throwing downwards, if a turbulent flow is assumed for the flow resistance ( Newton friction ). The coordinate system is placed in such a way that the location axis points upwards. A differential equation of the form with the gravitational acceleration g and a constant k > 0 with the unit 1 / m then applies to the speed . There is then always a limit speed that is reached for, and the following applies: ${\ displaystyle {\ dot {v}} = - g + kv ^ {2}}$ ${\ displaystyle v _ {\ mathrm {g}} = - {\ sqrt {\ frac {g} {k}}} <0}$${\ displaystyle t \ to \ infty}$
• when falling or throwing downwards with an initial speed lower than the limit speed: with${\ displaystyle v (t) = v _ {\ mathrm {g}} \ cdot \ tanh \ left ({\ sqrt {gk}} t + c \ right)}$${\ displaystyle c = \ operatorname {artanh} {\ frac {v (0)} {v _ {\ mathrm {g}}}} \ geq 0}$
• when throwing downwards with an initial speed greater than the limit speed: with${\ displaystyle v (t) = v _ {\ mathrm {g}} \ cdot \ coth \ left ({\ sqrt {gk}} t + c \ right)}$${\ displaystyle c = \ operatorname {arcoth} {\ frac {v (0)} {v _ {\ mathrm {g}}}}> 0}$
• In the special theory of relativity the relationship between speed v and rapidity is given by with the speed of light c.${\ displaystyle \ theta}$${\ displaystyle v = c \ cdot \ tanh \ theta}$
• The hyperbolic tangent also describes the thermal occupation of a two-state system in quantum mechanics : If n is the total occupation of the two states and E is their energy difference, then the difference between the occupation numbers results , where the Boltzmann constant and T the is absolute temperature .${\ displaystyle \ delta n = n \ cdot \ tanh {\ frac {E} {2k _ {\ mathrm {B}} T}}}$${\ displaystyle k _ {\ mathrm {B}}}$
${\ displaystyle B_ {J} (x) = {\ frac {1} {J}} \ left [\ left (J + {\ frac {1} {2}} \ right) \ coth \ left (J \, x + {\ frac {x} {2}} \ right) - {\ frac {1} {2}} \ coth {\ frac {x} {2}} \ right]}$
• The hyperbolic cotangent also occurs in cosmology : the evolution of the Hubble parameter over time in a flat universe that essentially contains only matter and dark energy (which is a good model for our actual universe) is described by , being a characteristic Is the time scale and the limit value of the Hubble parameter for is ( is the current value of the Hubble parameter, the density parameter for dark energy). (This result is obtained easily from the temporal behavior of the scale parameter, consisting of the Friedmann equations can be derived.) The time dependence of the density parameter of dark energy on the other hand joins the hyperbolic tangent on .${\ displaystyle H (t) = H_ {g} \ coth {\ frac {t} {t_ {ch}}}}$${\ displaystyle t_ {ch} = {\ frac {2} {3H_ {g}}}}$${\ displaystyle H_ {g} = {\ sqrt {\ Omega _ {\ Lambda, 0}}} H_ {0}}$${\ displaystyle t \ to \ infty}$${\ displaystyle H_ {0}}$${\ displaystyle \ Omega _ {\ Lambda, 0}}$${\ displaystyle \ Omega _ {\ Lambda} (t) = \ tanh ^ {2} (t / t_ {ch})}$