The Gudermannian function is defined by

$gdz=\underset{0}{\overset{z}{\int}}dtsecht=\underset{0}{\overset{z}{\int}}\frac{dt}{cosht}$

This integral can be evaluated in a number of ways. With the substitution $u=sinht$ , one has

$gdz=\underset{0}{\overset{sinhz}{\int}}\frac{du}{{cosh}^{2}t}=\underset{0}{\overset{sinhz}{\int}}\frac{du}{1+{u}^{2}}={tan}^{-1}(sinhz)$

With the substitution $u=tanht$ , one has

$gdz=\underset{0}{\overset{tanhz}{\int}}ducosht=\underset{0}{\overset{tanhz}{\int}}\frac{du}{\sqrt{1-{u}^{2}}}={sin}^{-1}(tanhz)$

With the substitution $u=tanh\frac{t}{2}$ , one has

$gdz=2\underset{0}{\overset{tanh\frac{z}{2}}{\int}}du\frac{{cosh}^{2}\frac{t}{2}}{cosht}=2\underset{0}{\overset{tanh\frac{z}{2}}{\int}}\frac{du}{1+{u}^{2}}=2{tan}^{-1}(tanh\frac{z}{2})$

With the substitution $u={e}^{t}$ , one has

$gdz=\underset{1}{\overset{{e}^{z}}{\int}}\frac{du}{{e}^{t}cosht}=2\underset{1}{\overset{{e}^{z}}{\int}}\frac{du}{1+{u}^{2}}=2{tan}^{-1}\left({e}^{z}\right)-\frac{\pi}{2}$

One could continue, but these are enough cases for the following question: which of these expressions is most appropriate on the entire complex plane?

On the real axis, all four expressions return the same value. This can be seen by plotting them all together or in pairs. Label the four solutions A, B, C and D in order for conciseness:

But what happens on the rest of the complex plane? Visualize all simultaneously with the same coloring as in the previous graphic:

Inspecting the visualizations is unfortunately not decisive. There is no single branch cut that would make one expression more convenient for organizing the complex behavior. The most regular of the graphs would appear to be that for expression A: it has fewer rough edges than the others, where values change more quickly. It is certainly more aesthetically pleasing than the asymmetric behavior of expression D.

Since the function is defined by an integral, this can also be evaluated on the entire complex plane. Comparing this value to those of all four expressions anywhere on the the complex plane allows one to make a decisive choice of complex form:

The variable is entered here as a string of the sort one normally uses to express complex numbers.

Varying the point of evaluation on the complex plane indicates that many times all four expressions return values that are either identical or differ by a sign. It is the locations where they differ that indicate that expression C matches the integral all the time, apart from the imaginary axis where the evaluation of the integral clearly goes awry. Expression C is the most appropriate representation of the Gudermannian function on the complex plane.

Of available commercial packages, apparently only Mathematica includes a native implementation of the Gudermannian. Curiously the documentation for this function states that expression C is the correct complex form, but evaluating `FunctionExpand[Gudermannian[z]]`

in a recent version or on WolframAlpha indicates clearly that it uses expression D. This is extremely odd even from an visual point of view: as noted above expression D is asymmetric in ways that set it far apart from the other three expressions. Odd choice indeed...

The inverse Gudermannian function is also defined by an integral

${gd}^{-1}z=\underset{0}{\overset{z}{\int}}dtsect$

that can be evaluated in a variety of ways. Its most appropriate representation on the entire complex plane will naturally be a simple inverse of expression C:

$gdz=2{tan}^{-1}(tanh\frac{z}{2})\phantom{\rule{2em}{0ex}}\leftrightarrow \phantom{\rule{2em}{0ex}}{gd}^{-1}z=2{tanh}^{-1}(tan\frac{z}{2})$

These two expressions will be used henceforward in Math.