Gudermannian function



In mathematics, the Gudermannian function relates a hyperbolic angle measure $\psi$ to a circular angle measure $\phi$  called the gudermannian of $\psi$  and denoted $\operatorname{gd}\psi$. The Gudermannian function reveals a close relationship between the circular functions and hyperbolic functions. It was introduced in the 1760s by Johann Heinrich Lambert, and later named for Christoph Gudermann who also described the relationship between circular and hyperbolic functions in 1830. The gudermannian is sometimes called the hyperbolic amplitude as a limiting case of the Jacobi elliptic amplitude $\operatorname{am}(\psi, m)$ when parameter $m=1.$

The real Gudermannian function is typically defined for $-\infty < \psi < \infty$ to be the integral of the hyperbolic secant



\phi = \operatorname{gd} \psi \equiv \int_0^\psi \operatorname{sech} t \,\mathrm{d}t = \operatorname{arctan} (\sinh \psi).$$

The real inverse Gudermannian function can be defined for $-\tfrac12\pi < \phi < \tfrac12\pi$ as the integral of the (circular) secant



\psi = \operatorname{gd}^{-1} \phi = \int_0^\phi \operatorname{sec} t \,\mathrm{d}t = \operatorname{arsinh} (\tan \phi). $$

The hyperbolic angle measure $$\psi = \operatorname{gd}^{-1} \phi$$ is called the anti-gudermannian of $$\phi$$ or sometimes the lambertian of $$\phi$$, denoted $$\psi = \operatorname{lam} \phi.$$ In the context of geodesy and navigation for latitude $\phi$, $$k \operatorname{gd}^{-1} \phi$$ (scaled by arbitrary constant $k$ ) was historically called the meridional part of $$\phi$$ (French: latitude croissante). It is the vertical coordinate of the Mercator projection.

The two angle measures $\phi$ and $\psi$  are related by a common stereographic projection


 * $$s = \tan \tfrac12 \phi = \tanh \tfrac12 \psi,$$

and this identity can serve as an alternative definition for $\operatorname{gd}$ and $\operatorname{gd}^{-1}$  valid throughout the complex plane:


 * $$\begin{aligned}

\operatorname{gd} \psi &= {2\arctan}\bigl(\tanh\tfrac12 \psi \,\bigr), \\[5mu] \operatorname{gd}^{-1} \phi &= {2\operatorname{artanh}}\bigl(\tan\tfrac12 \phi \,\bigr). \end{aligned}$$

Circular–hyperbolic identities
We can evaluate the integral of the hyperbolic secant using the stereographic projection (hyperbolic half-tangent) as a change of variables:


 * $$\begin{align}

\operatorname{gd} \psi &\equiv \int_0^\psi \frac{1}{\operatorname{cosh} t}\mathrm{d}t = \int_0^{\tanh\frac12\psi} \frac{1-u^2}{1 + u^2}\frac{2\,\mathrm{d}u}{1 - u^2} \qquad \bigl(u = \tanh\tfrac12 t \bigr) \\[8mu] &= 2\int_0^{\tanh\frac12\psi} \frac{1}{1 + u^2} \mathrm{d}u = {2\arctan}\bigl(\tanh\tfrac12\psi\,\bigr), \\[5mu] \tan\tfrac12{\operatorname{gd} \psi} &= \tanh\tfrac12\psi. \end{align}$$

Letting $\phi = \operatorname{gd} \psi$ and $s = \tan \tfrac12 \phi = \tanh \tfrac12 \psi$  we can derive a number of identities between hyperbolic functions of $\psi$  and circular functions of $\phi.$




 * $$\begin{align}

s &= \tan \tfrac12 \phi = \tanh \tfrac12 \psi,                  \\[6mu] \frac{2s}{1 + s^2} &= \sin \phi     = \tanh \psi,               \quad & \frac{1 + s^2}{2s} &= \csc \phi     = \coth \psi,               \\[10mu] \frac{1 - s^2}{1 + s^2} &= \cos \phi = \operatorname{sech} \psi, \quad & \frac{1 + s^2}{1 - s^2} &= \sec \phi = \cosh \psi,              \\[10mu] \frac{2s}{1 - s^2}     &= \tan \phi = \sinh \psi,               \quad & \frac{1 - s^2}{2s}     &= \cot \phi = \operatorname{csch} \psi. \\[8mu] \end{align}$$

These are commonly used as expressions for $$\operatorname{gd}$$ and $$\operatorname{gd}^{-1}$$ for real values of $$\psi$$ and $$\phi$$ with $$|\phi| < \tfrac12\pi.$$ For example, the numerically well-behaved formulas


 * $$\begin{align}

\operatorname{gd} \psi &= \operatorname{arctan} (\sinh \psi), \\[6mu] \operatorname{gd}^{-1} \phi &= \operatorname{arsinh} (\tan \phi). \end{align}$$

(Note, for $$|\phi| > \tfrac12\pi$$ and for complex arguments, care must be taken choosing branches of the inverse functions.)

We can also express $\psi$ and $\phi$  in terms of $s\colon$


 * $$\begin{align}

2\arctan s &= \phi = \operatorname{gd} \psi,                    \\[6mu] 2\operatorname{artanh} s &= \operatorname{gd}^{-1} \phi = \psi. \\[6mu] \end{align}$$

If we expand $\tan\tfrac12$ and $\tanh\tfrac12$  in terms of the exponential, then we can see that $s,$  $$\exp \phi i,$$ and $$\exp \psi$$ are all Möbius transformations of each-other (specifically, rotations of the Riemann sphere):


 * $$\begin{align}

s &= i\frac{1-e^{\phi i}}{1+e^{\phi i}} = \frac{e^\psi - 1}{e^\psi + 1}, \\[10mu] i \frac{s - i}{s + i} &= \exp \phi i \quad = \frac{e^\psi - i}{e^\psi + i}, \\[10mu] \frac{1 + s}{1 - s} &= i\frac{i+e^{\phi i}}{i-e^{\phi i}} \,= \exp \psi. \end{align}$$

For real values of $\psi$ and $\phi$  with $$|\phi| < \tfrac12\pi$$, these Möbius transformations can be written in terms of trigonometric functions in several ways,


 * $$\begin{align}

\exp \psi &= \sec \phi + \tan \phi = \tan\tfrac12 \bigl(\tfrac12\pi + \phi \bigr) \\[6mu] &= \frac{1 + \tan\tfrac12 \phi}{1 - \tan\tfrac12 \phi} = \sqrt{\frac{1+\sin \phi}{1-\sin \phi}}, \\[12mu]

\exp \phi i &= \operatorname{sech} \psi + i \tanh \psi = \tanh\tfrac12 \bigl({-\tfrac12}\pi i + \psi \bigr) \\[6mu] &= \frac{1 + i \tanh\tfrac12 \psi}{1 - i \tanh\tfrac12 \psi} = \sqrt{\frac{1 + i \sinh \psi}{1 - i \sinh \psi}}. \end{align}$$

These give further expressions for $$\operatorname{gd}$$ and $$\operatorname{gd}^{-1}$$ for real arguments with $$|\phi| < \tfrac12\pi.$$ For example,


 * $$\begin{align}

\operatorname{gd} \psi &= 2 \arctan e^\psi - \tfrac12\pi, \\[6mu] \operatorname{gd}^{-1} \phi &= \log (\sec \phi + \tan \phi). \end{align}$$

Complex values


As a function of a complex variable, $z \mapsto w = \operatorname{gd} z$ conformally maps the infinite strip $\left|\operatorname{Im}z\right| \leq \tfrac12\pi$  to the infinite strip $\left|\operatorname{Re}w\right| \leq \tfrac12\pi,$  while $w \mapsto z = \operatorname{gd}^{-1} w$  conformally maps the infinite strip $\left|\operatorname{Re}w\right| \leq \tfrac12\pi$  to the infinite strip $ \left|\operatorname{Im}z\right| \leq \tfrac12\pi.$

Analytically continued by reflections to the whole complex plane, $z \mapsto w = \operatorname{gd} z$ is a periodic function of period $2\pi i$  which sends any infinite strip of "height" $2\pi i$  onto the strip $-\pi< \operatorname{Re}w \leq \pi.$  Likewise, extended to the whole complex plane, $w \mapsto z = \operatorname{gd}^{-1} w$  is a periodic function of period $2\pi$  which sends any infinite strip of "width" $2\pi$  onto the strip $-\pi < \operatorname{Im}z \leq \pi.$ For all points in the complex plane, these functions can be correctly written as:


 * $$\begin{aligned}

\operatorname{gd} z &= {2\arctan}\bigl(\tanh\tfrac12 z \,\bigr), \\[5mu] \operatorname{gd}^{-1} w &= {2\operatorname{artanh}}\bigl(\tan\tfrac12 w \,\bigr). \end{aligned}$$

For the $\operatorname{gd}$ and $\operatorname{gd}^{-1}$  functions to remain invertible with these extended domains, we might consider each to be a multivalued function (perhaps $\operatorname{Gd}$  and $\operatorname{Gd}^{-1}$, with $\operatorname{gd}$  and $\operatorname{gd}^{-1}$  the principal branch) or consider their domains and codomains as Riemann surfaces.

If $u + iv = \operatorname{gd}(x + iy),$ then the real and imaginary components $u$  and $v$  can be found by:



\tan u = \frac{\sinh x}{\cos y}, \quad \tanh v = \frac{\sin y}{\cosh x}. $$

(In practical implementation, make sure to use the 2-argument arctangent, $u = \operatorname{atan2}(\sinh x, \cos y)$ .)

Likewise, if $x + iy = \operatorname{gd}^{-1}(u + iv),$ then components $x$  and $y$  can be found by:



\tanh x = \frac{\sin u}{\cosh v}, \quad \tan y = \frac{\sinh v}{\cos u}. $$

Multiplying these together reveals the additional identity

\tanh x\, \tan y = \tan u\, \tanh v. $$

Symmetries
The two functions can be thought of as rotations or reflections of each-other, with a similar relationship as $\sinh iz = i \sin z$ between sine and hyperbolic sine:
 * $$\begin{aligned}

\operatorname{gd} iz     &= i \operatorname{gd}^{-1} z, \\[5mu] \operatorname{gd}^{-1} iz &= i \operatorname{gd} z. \end{aligned}$$

The functions are both odd and they commute with complex conjugation. That is, a reflection across the real or imaginary axis in the domain results in the same reflection in the codomain:
 * $$\begin{aligned}

\operatorname{gd} (-z)      &= -\operatorname{gd} z, &\quad \operatorname{gd} \bar z  &= \overline{\operatorname{gd} z}, &\quad \operatorname{gd} (-\bar z) &= -\overline{\operatorname{gd} z}, \\[5mu] \operatorname{gd}^{-1} (-z) &= -\operatorname{gd}^{-1} z, &\quad \operatorname{gd}^{-1} \bar z  &= \overline{\operatorname{gd}^{-1} z}, &\quad \operatorname{gd}^{-1} (-\bar z) &= -\overline{\operatorname{gd}^{-1} z}. \end{aligned}$$

The functions are periodic, with periods $2\pi i$ and $2\pi$ :
 * $$\begin{aligned}

\operatorname{gd} (z + 2\pi i) &= \operatorname{gd} z, \\[5mu] \operatorname{gd}^{-1} (z + 2\pi) &= \operatorname{gd}^{-1} z. \end{aligned}$$

A translation in the domain of $\operatorname{gd}$ by $\pm\pi i$  results in a half-turn rotation and translation in the codomain by one of $\pm\pi,$  and vice versa for $\operatorname{gd}^{-1}\colon$


 * $$\begin{aligned}

\operatorname{gd} ({\pm \pi i} + z) &= \begin{cases} \pi - \operatorname{gd} z \quad &\mbox{if }\ \  \operatorname{Re} z \geq 0, \\[5mu] -\pi - \operatorname{gd} z \quad &\mbox{if }\ \  \operatorname{Re} z < 0, \end{cases} \\[15mu]

\operatorname{gd}^{-1} ({\pm \pi} + z) &= \begin{cases} \pi i - \operatorname{gd}^{-1} z \quad &\mbox{if }\ \  \operatorname{Im} z \geq 0, \\[3mu] -\pi i - \operatorname{gd}^{-1} z \quad &\mbox{if }\ \  \operatorname{Im} z < 0. \end{cases} \end{aligned}$$

A reflection in the domain of $\operatorname{gd}$ across either of the lines $x \pm \tfrac12\pi i$  results in a reflection in the codomain across one of the lines $\pm \tfrac12\pi + yi,$  and vice versa for $\operatorname{gd}^{-1}\colon$


 * $$\begin{aligned}

\operatorname{gd} ({\pm \pi i} + \bar z) &= \begin{cases}

\pi - \overline{\operatorname{gd} z} \quad &\mbox{if }\ \  \operatorname{Re} z \geq 0, \\[5mu] -\pi - \overline{\operatorname{gd} z} \quad &\mbox{if }\ \  \operatorname{Re} z < 0, \end{cases} \\[15mu]

\operatorname{gd}^{-1} ({\pm \pi} - \bar z) &= \begin{cases} \pi i + \overline{\operatorname{gd}^{-1} z} \quad &\mbox{if }\ \  \operatorname{Im} z \geq 0, \\[3mu] -\pi i + \overline{\operatorname{gd}^{-1} z} \quad &\mbox{if }\ \  \operatorname{Im} z < 0. \end{cases} \end{aligned}$$

This is related to the identity

\tanh\tfrac12 ({\pi i} \pm z) = \tan\tfrac12 ({\pi} \mp \operatorname{gd} z). $$

Specific values
A few specific values (where $\infty$ indicates the limit at one end of the infinite strip):
 * $$\begin{align}

\operatorname{gd}(0) &= 0, &\quad {\operatorname{gd}}\bigl({\pm {\log}\bigl(2 + \sqrt3\bigr)}\bigr) &= \pm \tfrac13\pi, \\[5mu] \operatorname{gd}(\pi i) &= \pi, &\quad {\operatorname{gd}}\bigl({\pm \tfrac13}\pi i\bigr) &= \pm {\log}\bigl(2 + \sqrt3\bigr)i, \\[5mu] \operatorname{gd}({\pm \infty}) &= \pm\tfrac12\pi, &\quad {\operatorname{gd}}\bigl({\pm {\log}\bigl(1 + \sqrt2\bigr)}\bigr) &= \pm \tfrac14\pi, \\[5mu] {\operatorname{gd}}\bigl({\pm \tfrac12}\pi i\bigr) &= \pm \infty i, &\quad {\operatorname{gd}}\bigl({\pm \tfrac14}\pi i\bigr) &= \pm {\log}\bigl(1 + \sqrt2\bigr)i, \\[5mu]

&& {\operatorname{gd}}\bigl({\log}\bigl(1 + \sqrt2\bigr) \pm \tfrac12\pi i\bigr) &= \tfrac12\pi \pm {\log}\bigl(1 + \sqrt2\bigr)i, \\[5mu] && {\operatorname{gd}}\bigl({-\log}\bigl(1 + \sqrt2\bigr) \pm \tfrac12\pi i\bigr) &= -\tfrac12\pi \pm {\log}\bigl(1 + \sqrt2\bigr)i.

\end{align}$$

Derivatives
As the Gudermannian and inverse Gudermannian functions can be defined as the antiderivatives of the hyperbolic secant and circular secant functions, respectively, their derivatives are those secant functions:


 * $$\begin{align}

\frac{\mathrm d}{\mathrm d z} \operatorname{gd} z     &= \operatorname{sech} z, \\[10mu] \frac{\mathrm d}{\mathrm d z} \operatorname{gd}^{-1} z &= \sec z. \end{align}$$

Argument-addition identities
By combining hyperbolic and circular argument-addition identities,


 * $$\begin{align}

\tanh(z + w) &= \frac{\tanh z + \tanh w}{1 + \tanh z \, \tanh w }, \\[10mu] \tan(z + w) &= \frac{\tan z  + \tan w }{1 - \tan z  \, \tan w  }, \end{align}$$

with the circular–hyperbolic identity,

\tan \tfrac12 (\operatorname{gd} z) = \tanh \tfrac12 z, $$

we have the Gudermannian argument-addition identities:


 * $$\begin{align}

\operatorname{gd}(z + w) &= 2 \arctan \frac {\tan \tfrac12(\operatorname{gd} z) + \tan\tfrac12(\operatorname{gd} w)} {1 + \tan\tfrac12(\operatorname{gd} z) \, \tan\tfrac12(\operatorname{gd} w)}, \\[12mu] \operatorname{gd}^{-1}(z + w) &= 2 \operatorname{artanh} \frac {\tanh\tfrac12(\operatorname{gd}^{-1} z) + \tanh\tfrac12(\operatorname{gd}^{-1} w)} {1 - \tanh\tfrac12(\operatorname{gd}^{-1} z) \, \tanh\tfrac12(\operatorname{gd}^{-1} w)}. \end{align}$$

Further argument-addition identities can be written in terms of other circular functions, but they require greater care in choosing branches in inverse functions. Notably,


 * $$\begin{align}

\operatorname{gd}(z + w) &= u + v, \quad \text{where}\ \tan u = \frac{\sinh z}{\cosh w},\ \tan v = \frac{\sinh w}{\cosh z}, \\[10mu] \operatorname{gd}^{-1}(z + w) &= u + v, \quad \text{where}\ \tanh u = \frac{\sin z}{\cos w},\ \tanh v = \frac{\sin w}{\cos z}, \end{align}$$

which can be used to derive the per-component computation for the complex Gudermannian and inverse Gudermannian.

In the specific case $z = w,$ double-argument identities are


 * $$\begin{align}

\operatorname{gd}(2z) &= 2 \arctan (\sin(\operatorname{gd} z)), \\[5mu] \operatorname{gd}^{-1}(2z) &= 2 \operatorname{artanh}(\sinh(\operatorname{gd}^{-1}z)). \end{align}$$

Taylor series
The Taylor series near zero, valid for complex values $z$ with $|z| < \tfrac12\pi,$  are


 * $$\begin{align}

\operatorname{gd} z &= \sum_{k=0}^\infty \frac{E_k}{(k+1)!}z^{k+1} = z - \frac16z^3 + \frac1{24}z^5 - \frac{61}{5040}z^7 + \frac{277}{72576}z^9 - \dots, \\[10mu] \operatorname{gd}^{-1} z &= \sum_{k=0}^\infty \frac{|E_k|}{(k+1)!}z^{k+1} = z + \frac16z^3 + \frac1{24}z^5 + \frac{61}{5040}z^7 + \frac{277}{72576}z^9 + \dots, \end{align}$$

where the numbers $E_{k}$ are the Euler secant numbers, 1, 0, -1, 0, 5, 0, -61, 0, 1385 ... (sequences, , and  in the OEIS). These series were first computed by James Gregory in 1671.

Because the Gudermannian and inverse Gudermannian functions are the integrals of the hyperbolic secant and secant functions, the numerators $E_{k}$ and $|E_{k}|$  are same as the numerators of the Taylor series for $ψ$ and $ϕ = gd ψ$, respectively, but shifted by one place.

The reduced unsigned numerators are 1, 1, 1, 61, 277, ... and the reduced denominators are 1, 6, 24, 5040, 72576, ... (sequences and  in the OEIS).

History
The function and its inverse are related to the Mercator projection. The vertical coordinate in the Mercator projection is called isometric latitude, and is often denoted $\psi.$ In terms of latitude $\phi$  on the sphere (expressed in radians) the isometric latitude can be written


 * $$\psi = \operatorname{gd}^{-1} \phi = \int_0^\phi \sec t \,\mathrm{d}t.$$

The inverse from the isometric latitude to spherical latitude is $\phi = \operatorname{gd} \psi.$ (Note: on an ellipsoid of revolution, the relation between geodetic latitude and isometric latitude is slightly more complicated.)

Gerardus Mercator plotted his celebrated map in 1569, but the precise method of construction was not revealed. In 1599, Edward Wright described a method for constructing a Mercator projection numerically from trigonometric tables, but did not produce a closed formula. The closed formula was published in 1668 by James Gregory.

The Gudermannian function per se was introduced by Johann Heinrich Lambert in the 1760s at the same time as the hyperbolic functions. He called it the "transcendent angle", and it went by various names until 1862 when Arthur Cayley suggested it be given its current name as a tribute to Christoph Gudermann's work in the 1830s on the theory of special functions. Gudermann had published articles in Crelle's Journal that were later collected in a book which expounded $\sinh$ and $\cosh$  to a wide audience (although represented by the symbols $\mathfrak{Sin}$  and $\mathfrak{Cos}$ ).

The notation $\operatorname{gd}$ was introduced by Cayley who starts by calling $\phi = \operatorname{gd} u$  the Jacobi elliptic amplitude $\operatorname{am} u$  in the degenerate case where the elliptic modulus is $m = 1,$  so that $\sqrt{1 + m\sin\!^2\,\phi}$  reduces to $\cos \phi.$ This is the inverse of the integral of the secant function. Using Cayley's notation,



u = \int_0 \frac{d\phi}{\cos \phi} = {\log\, \tan}\bigl(\tfrac14\pi + \tfrac12 \phi\bigr). $$

He then derives "the definition of the transcendent",



\operatorname{gd} u = {\frac1i \log\, \tan} \bigl(\tfrac14\pi + \tfrac12 ui\bigr), $$

observing that "although exhibited in an imaginary form, [it] is a real function of $ u$ ".

The Gudermannian and its inverse were used to make trigonometric tables of circular functions also function as tables of hyperbolic functions. Given a hyperbolic angle $\psi$, hyperbolic functions could be found by first looking up $\phi = \operatorname{gd} \psi$ in a Gudermannian table and then looking up the appropriate circular function of $\phi$ , or by directly locating $\psi$  in an auxiliary $$\operatorname{gd}^{-1}$$ column of the trigonometric table.

Generalization
The Gudermannian function can be thought of mapping points on one branch of a hyperbola to points on a semicircle. Points on one sheet of an n-dimensional hyperboloid of two sheets can be likewise mapped onto a n-dimensional hemisphere via stereographic projection. The hemisphere model of hyperbolic space uses such a map to represent hyperbolic space.

Applications



 * The angle of parallelism function in hyperbolic geometry is the complement of the gudermannian, $$\mathit{\Pi}(\psi) = \tfrac12\pi - \operatorname{gd} \psi.$$
 * On a Mercator projection a line of constant latitude is parallel to the equator (on the projection) at a distance proportional to the anti-gudermannian of the latitude.
 * The Gudermannian function (with a complex argument) may be used to define the transverse Mercator projection.
 * The Gudermannian function appears in a non-periodic solution of the inverted pendulum.
 * The Gudermannian function appears in a moving mirror solution of the dynamical Casimir effect.
 * If an infinite number of infinitely long, equidistant, parallel, coplanar, straight wires are kept at equal potentials with alternating signs, the potential-flux distribution in a cross-sectional plane perpendicular to the wires is the complex Gudermannian function.
 * The Gudermannian function is a sigmoid function, and as such is sometimes used as an activation function in machine learning.
 * The (scaled and shifted) Gudermannian function is the cumulative distribution function of the hyperbolic secant distribution.
 * A function based on the Gudermannian provides a good model for the shape of spiral galaxy arms.