Note

Arb was merged into FLINT in 2023.

The documentation on arblib.org will no longer be updated.

See the FLINT documentation instead.


Algorithms for polylogarithms

The polylogarithm is defined for s,zC with |z|<1 by

Lis(z)=k=1zkks

and for |z|1 by analytic continuation, except for the singular point z=1.

Computation for small z

The power sum converges rapidly when |z|1. To compute the series expansion with respect to s, we substitute ss+xC[[x]] and obtain

Lis+x(z)=d=0xd(1)dd!k=1T(k)

where

T(k)=zklogd(k)ks.

The remainder term |k=NT(k)| is bounded via the following strategy, implemented in mag_polylog_tail().

Denote the terms by T(k). We pick a nonincreasing function U(k) such that

T(k+1)T(k)=z(kk+1)s(log(k+1)log(k))dU(k).

Then, as soon as U(N)<1,

k=NT(k)T(N)k=0U(N)k=T(N)1U(N).

In particular, we take

U(k)=zB(k,max(0,s))B(klog(k),d)

where B(m,n)=(1+1/m)n. This follows from the bounds

(kk+1)s{1if s0(1+1/k)sif s<0.

and

(log(k+1)log(k))d(1+1klog(k))d.

Expansion for general z

For general complex s,z, we write the polylogarithm as a sum of two Hurwitz zeta functions

Lis(z)=Γ(v)(2π)v[ivζ(v,12+log(z)2πi)+ivζ(v,12log(z)2πi)]

in which s=1v. With the principal branch of log(z), we obtain the conventional analytic continuation of the polylogarithm with a branch cut on z(1,+).

To compute the series expansion with respect to v, we substitute vv+xC[[x]] in this formula (at the end of the computation, we map xx to obtain the power series for Lis+x(z)). The right hand side becomes

Γ(v+x)[E1Z1+E2Z2]

where E1=(i/(2π))v+x, Z1=ζ(v+x,), E2=(1/(2πi))v+x, Z2=ζ(v+x,).

When v=1, the Z1 and Z2 terms become Laurent series with a leading 1/x term. In this case, we compute the deflated series Z~1,Z~2=ζ(x,)1/x. Then

E1Z1+E2Z2=(E1+E2)/x+E1Z~1+E2Z~2.

Note that (E1+E2)/x is a power series, since the constant term in E1+E2 is zero when v=1. So we simply compute one extra derivative of both E1 and E2, and shift them one step. When v=0,1,2,, the Γ(v+x) prefactor has a pole. In this case, we proceed analogously and formally multiply xΓ(v+x) with [E1Z1+E2Z2]/x.

Note that the formal cancellation only works when the order s (or v) is an exact integer: it is not currently possible to use this method when s is a small ball containing any of 0,1,2, (then the result becomes indeterminate).

The Hurwitz zeta method becomes inefficient when |z|0 (it gives an indeterminate result when z=0). This is not a problem since we just use the defining series for the polylogarithm in that region. It also becomes inefficient when |z|, for which an asymptotic expansion would better.