polylog -- the polylogarithm
function
Introductionpolylog(n,x) represents the polylogarithm
function Li(n, x) of index n at the point
x.
Call(s)polylog(n, x)
Parametersn |
- | an arithmetical expression representing an integer |
x |
- | an arithmetical expression |
Returnsan arithmetical expression.
x
Side
EffectsWhen called with a floating point argument x, the
function is sensitive to the environment variable DIGITS which determines the numerical
working precision.
Related
Functions
Detailspolylog(n,x)=sum(x^k/k^n, k=1..infinity).This function is extended to the whole complex plane by analytic continuation.
n is an integer and x a floating point
number, then a floating point result is computed.n is an integer <=1, then an explicit
expression is returned for any input parameter x. If
n is an integer >1 or if n is a
symbolic expression, then an unevaluated call of polylog
is returned, unless x is a floating point number. If
n is a numerical value, but not an integer, then an error
occurs.dilog). The values
polylog(n,0)=0 and polylog(n,1)=zeta(n) are
implemented for any n. Furthermore,
polylog(n,-1)=(2^(1-n)-1)*zeta(n) for any
n<>1.polylog(2,x) coincides
with dilog(1-x).
Example
1Explicit results are returned for integer indices n<=1:
>> polylog(-5, x), polylog(-1, x), polylog(0, x), polylog(1, x)
2 3 4 5
x + 26 x + 66 x + 26 x + x x x
------------------------------, --------, -----, -ln(1 - x)
6 2 1 - x
(1 - x) (1 - x)
An unevaluated call is returned if the index is an integer n>1 or a symbolic expression:
>> polylog(2, x), polylog(n^2 + 1, 2), polylog(n + 1, 2.0)
2
polylog(2, x), polylog(n + 1, 2), polylog(n + 1, 2.0)
Floating point values are computed for integer indices n and floating point arguments x:
>> polylog(-5, -1.2), polylog(10, 100.0 + 3.2*I)
-0.2326930882, 104.9131863 + 11.44600047 I
An error occurs if n is a numerical value, but not an integer:
>> polylog(5/2, x)
Error: first argument must be an integer [polylog]
Some special symbolic values are implemented:
>> polylog(4, 1), polylog(5, -1), polylog(2, I)
4 2
PI 15 zeta(5) PI
---, - ----------, I CATALAN - ---
90 16 48
>> assume(n <> 1): polylog(n, -1)
1 - n
- zeta(n) (1 - 2 )
>> unassume(n): polylog(n, -1)
polylog(n, -1)
Example
2For indices n>=1, the real interval
[1,infinity) is a branch cut. The values returned by
polylog jump when crossing this cut:
>> polylog(3, 1.2 + I/10^1000) - polylog(3, 1.2 - I/10^1000)
0.1044301529 I
Example
3The functions diff, float, limit, and series handle expressions involving
polylog:
>> diff(polylog(n, x), x), float(polylog(4, 3 + I))
polylog(n - 1, x)
-----------------, 3.177636803 + 1.859135861 I
x
>> series(polylog(4, sin(x)), x = 0)
2 3 4 5
x 25 x 13 x 1523 x 6
x + -- - ----- - ----- + ------- + O(x )
16 162 768 405000
Background
polylog(n,x)
=limit(polylog(n,x+eps*I), eps=0, Right)
=limit(polylog(n,x+eps*I), eps=0, Left) - 2*PI*I*ln(x)^(n-1)/(n-1)!.