The Gudermannian function is defined by

gdz =0 z dtsecht =0 z dtcosht

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

gdz =0 sinhz du cosh2t =0 sinhz du 1+u2 =tan1 (sinhz)

With the substitution u=tanht  , one has

gdz =0 tanhz ducosht =0 tanhz du 1-u2 =sin1 (tanhz)

With the substitution u=tanht2  , one has

gdz =20 tanhz2 du cosh2 t2 cosht =20 tanhz2 du 1+u2 =2tan1 (tanhz2)

With the substitution u=et  , one has

gdz =1 ez du etcosht =21 ez du 1+u2 =2tan1 (ez) -π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

gd1z =0z 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 tan1 (tanhz2) gd1z =2 tanh1 (tanz2)

These two expressions will be used henceforward in Math.

Uploaded 2021.06.16