Function Repository Resource:

TripleGamma

Source Notebook

Evaluate the triple gamma function

Contributed by: Jan Mangaldan

ResourceFunction["TripleGamma"][z]

gives the triple gamma function .

Details

Mathematical function, suitable for both symbolic and numeric manipulation.
The triple gamma function is defined as for positive integers n and through analytic continuation elsewhere.
The triple gamma function satisfies the functional equation , where is is the BarnesG function.
ResourceFunction["TripleGamma"][z] has no branch cut discontinuities.
For integers and half-integers, ResourceFunction["TripleGamma"] automatically evaluates to exact values.
ResourceFunction["TripleGamma"] can be evaluated to arbitrary numerical precision.
ResourceFunction["TripleGamma"] automatically threads over lists.

Examples

Basic Examples (4) 

Evaluate triple gamma on integer values:

In[1]:=
Table[ResourceFunction["TripleGamma"][n], {n, 9}]
Out[1]=

Half-integer values:

In[2]:=
Table[ResourceFunction["TripleGamma"][n + 1/2], {n, -2, 2}]
Out[2]=

Evaluate numerically for complex arguments:

In[3]:=
ResourceFunction["TripleGamma"][2.3 + I]
Out[3]=

Plot over a subset of the reals:

In[4]:=
Plot[ResourceFunction["TripleGamma"][z], {z, -2, 3}]
Out[4]=

Scope (4) 

Evaluate numerically:

In[5]:=
ResourceFunction["TripleGamma"][0.33]
Out[5]=

Evaluate to arbitrary precision:

In[6]:=
N[ResourceFunction["TripleGamma"][1/3], 50]
Out[6]=

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

In[7]:=
ResourceFunction["TripleGamma"][0.3333333333333333333333333333]
Out[7]=

Evaluate for complex argument:

In[8]:=
ResourceFunction["TripleGamma"][0.5 - I]
Out[8]=

TripleGamma threads elementwise over lists:

In[9]:=
ResourceFunction["TripleGamma"][{2, 3, 5, 7, 11}]
Out[9]=

Applications (1) 

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

In[10]:=
Plot3D[Abs[ResourceFunction["TripleGamma"][x + I y]], {x, -5, 2}, {y, -1, 1}]
Out[10]=

Properties and Relations (2) 

Compare TripleGamma with an explicit product representation for integer argument:

In[11]:=
Table[\!\(
\*UnderoverscriptBox[\(\[Product]\), \(\[ScriptL] = 1\), \(n - 1\)]\(
\*UnderoverscriptBox[\(\[Product]\), \(k = 1\), \(\[ScriptL] - 1\)]\(
\*UnderoverscriptBox[\(\[Product]\), \(j = 1\), \(k - 1\)]j\)\)\) == ResourceFunction["TripleGamma"][n], {n, 20}]
Out[11]=

TripleGamma satisfies a functional equation involving BarnesG:

In[12]:=
ResourceFunction["TripleGamma"][z + 1] == BarnesG[z] ResourceFunction["TripleGamma"][z] /. z -> RandomComplex[1 + I, WorkingPrecision -> 20]
Out[12]=

Version History

  • 1.0.0 – 09 March 2021

Source Metadata

Related Resources

License Information