Function Repository Resource:

NielsenG

Source Notebook

Evaluate the Nielsen function G

Contributed by: Jan Mangaldan

ResourceFunction["NielsenG"][z]

gives the Nielsen function g(z).

Details

Mathematical function, suitable for both symbolic and numerical manipulation.
.
ResourceFunction["NielsenG"][z] has a branch cut discontinuity in the complex z plane running from - to 0.
For certain special arguments, ResourceFunction["NielsenG"] automatically evaluates to exact values.
ResourceFunction["NielsenG"] can be evaluated to arbitrary numerical precision.
ResourceFunction["NielsenG"] automatically threads over lists.

Examples

Basic Examples (3) 

Evaluate numerically:

In[1]:=
ResourceFunction["NielsenG"][2.8]
Out[1]=

Plot over a subset of the reals:

In[2]:=
Plot[ResourceFunction["NielsenG"][x], {x, 0, 20}]
Out[2]=

Series expansion at the origin:

In[3]:=
Series[ResourceFunction["NielsenG"][x], {x, 0, 10}]
Out[3]=

Scope (4) 

Evaluate for complex arguments:

In[4]:=
ResourceFunction["NielsenG"][2.5 + I]
Out[4]=

Evaluate to high precision:

In[5]:=
N[ResourceFunction["NielsenG"][2], 50]
Out[5]=

The precision of the output tracks the precision of the input:

In[6]:=
ResourceFunction["NielsenG"][2.0000000000000000000000000000000000000]
Out[6]=

NielsenG threads elementwise over lists:

In[7]:=
ResourceFunction["NielsenG"][{1.2, 1.5, 1.8}]
Out[7]=

Simple exact values are generated automatically:

In[8]:=
ResourceFunction["NielsenG"][0]
Out[8]=
In[9]:=
ResourceFunction["NielsenG"][\[Infinity]]
Out[9]=

Applications (1) 

Plot the logarithm of the absolute value in the complex plane:

In[10]:=
ComplexContourPlot[Log[Abs[ResourceFunction["NielsenG"][z]]], {z, 10}]
Out[10]=

Properties and Relations (3) 

Express CosIntegral and SinIntegral in terms of NielsenF and NielsenG:

In[11]:=
CosIntegral[z] == Sin[z] ResourceFunction["NielsenF"][z] - Cos[z] ResourceFunction["NielsenG"][z] // FullSimplify
Out[11]=
In[12]:=
SinIntegral[z] == \[Pi]/2 - Cos[z] ResourceFunction["NielsenF"][z] - Sin[z] ResourceFunction["NielsenG"][z] // FullSimplify
Out[12]=

NielsenG is the Laplace transform of :

In[13]:=
LaplaceTransform[t/(1 + t^2), t, z] == ResourceFunction["NielsenG"][z] // FullSimplify
Out[13]=

A representation of NielsenG in terms of MeijerG:

In[14]:=
ResourceFunction["NielsenG"][z] == 1/(2 Sqrt[\[Pi]])
    MeijerG[{{0}, {}}, {{0, 0, 1/2}, {}}, z/2, 1/2] // FullSimplify
Out[14]=

Possible Issues (3) 

NielsenG is automatically expanded in terms of CosIntegral and SinIntegral:

In[15]:=
ResourceFunction["NielsenG"][x]
Out[15]=

Plugging in a large complex argument after expansion leads to inaccurate numerical results:

In[16]:=
% /. x -> N[-15 + 20 I, 25]
Out[16]=

Evaluate the function directly:

In[17]:=
ResourceFunction["NielsenG"][N[-15 + 20 I, 25]]
Out[17]=

Version History

  • 1.0.0 – 10 March 2021

Source Metadata

Related Resources

Author Notes

The function named here as the Nielsen auxiliary function G is mentioned in both Abramowitz and Stegun and the Digital Library of Mathematical Functions (DLMF), but only referred to as an "auxiliary function" for the sine and cosine integrals Si(z) and Ci(z). I named the function after Niels Nielsen, since he considers the function (in a slightly different form and notation) in his treatise Theorie des Integrallogarithmus und verwandter Transzendenten. I carefully constructed the general definition so that it is consistent with the chosen branch cut structure of ExpIntegralE and CosIntegral in Mathematica.

License Information