Skip to content

PolyLog ​

The polylogarithm Li⁡s(z)=∑n=1∞znns\operatorname{Li}_s(z) = \sum_{n=1}^{\infty} \dfrac{z^n}{n^s}, the a=1a = 1 slice of the Lerch transcendent.

✓ checked against that system · ! checked, with disagreements (hover a chip)WikipediaPolylogarithmMathWorldPolylogarithmWikidataQ1238449nLabpolylogarithmDLMF25.12.E10FungrimPolyLog✓Fungrim entry208da7✓52ea5f541e2e82b410d1a0ecWolfram LanguagePolyLog!
PolyLog(s, z)the polylogarithm Li⁡s(z)\operatorname{Li}_s(z) at integer order ss.
Typed signatures
TypePackageApplies
(complex | infinity, complex | infinity) -> numbercompute-enginealways
(number, number, number?) -> numberanalyticreplaces compute-enginealways

Domain: Special functions

Details

The polylogarithm Li⁡s(z)=∑n=1∞zn/ns\operatorname{Li}_s(z) = \sum_{n=1}^{\infty} z^n/n^s (DLMF 25.12.10) generalizes −ln⁡(1−z)-\ln(1-z) (its s=1s = 1 case) to arbitrary order ss. It is the a=1a = 1 slice of the Lerch transcendent, Li⁡s(z)=z Φ(z,s,1)\operatorname{Li}_s(z) = z\,\Phi(z, s, 1), and reduces to Zeta on its z=1z = 1 edge.

  • Li⁡s(z)=z Φ(z,s,1)\operatorname{Li}_s(z) = z\,\Phi(z, s, 1) in terms of the Lerch transcendent — see LerchPhi, which is how the non-integer orders are computed.
  • Li⁡s(1)=ζ(s)\operatorname{Li}_s(1) = \zeta(s): the ordinary zeta lives on the z=1z = 1 edge. See Zeta.
  • Low orders are elementary: Li⁡0(z)=z/(1−z)\operatorname{Li}_0(z) = z/(1-z), Li⁡1(z)=−ln⁡(1−z)\operatorname{Li}_1(z) = -\ln(1-z), Li⁡−1(z)=z/(1−z)2\operatorname{Li}_{-1}(z) = z/(1-z)^2, and every negative integer order is a rational function.
  • The dilogarithm Li⁡2\operatorname{Li}_2 has the special values Li⁡2(1)=π2/6\operatorname{Li}_2(1) = \pi^2/6, Li⁡2(−1)=−π2/12\operatorname{Li}_2(-1) = -\pi^2/12, and Li⁡2(12)=π2/12−(ln⁡2)2/2\operatorname{Li}_2(\tfrac12) = \pi^2/12 - (\ln 2)^2/2.
  • Convergence: the series converges for ∣z∣<1|z| < 1, and on ∣z∣=1|z| = 1 for Re⁡(s)>1\operatorname{Re}(s) > 1. Outside the disk the function continues analytically, with a branch cut along [1,∞)[1, \infty) — so Li⁡2(2)=π2/4−iπln⁡2\operatorname{Li}_2(2) = \pi^2/4 - i\pi\ln 2 is complex.
  • Integer orders (including the continuation past ∣z∣=1|z| = 1) are compute-engine's own. @enumeratio/analytic adds non-integer and complex ss by summing the Lerch series, which reaches ∣z∣≤1|z| \leq 1 only; outside that disk a non-integer order is left unevaluated rather than guessed.
  • Certified digits: for exact real ss and zz (integers, rationals or decimals) with ∣z∣<1|z| < 1, N(Li⁡s(z),d)\mathrm{N}(\operatorname{Li}_s(z), d) is proven, not just agreed on. The Lerch series is summed in ball arithmetic with its tail bounded, and the d digits are those both ends of the enclosure round to. See N.
  • As with the other numeric heads, an exact argument stays symbolic under plain evaluation — pair with N(), or pass an inexact argument.
  • Differs from Wolfram: PolyLog(2,2)PolyLog(2, 2) and other special values reduce on evaluation; Wolfram keeps PolyLog[2, 2] and needs FunctionExpand to get there. Both agree as identities.

Examples

79 more kept as data, checked against the oracles
Basic #

Li⁡2(1)=ζ(2)=π2/6\operatorname{Li}_2(1) = \zeta(2) = \pi^2/6

live ↗
InLi⁡2(1)\operatorname{Li}_{2}(1)Outπ26\frac{π^2}{6}

Li⁡2(−1)=−η(2)=−π2/12\operatorname{Li}_2(-1) = -\eta(2) = -\pi^2/12

live ↗
InLi⁡2(−1)\operatorname{Li}_{2}(-1)Out−π212-\frac{π^2}{12}

Li⁡4(1)=ζ(4)=π4/90\operatorname{Li}_4(1) = \zeta(4) = \pi^4/90

live ↗
InLi⁡4(1)\operatorname{Li}_{4}(1)Outπ490\frac{π^4}{90}

A machine-precision argument

live ↗
InLi⁡2(0.9)\operatorname{Li}_{2}(0.9)Out1.299 714 723 004 958 81.299\,714\,723\,004\,958\,8

Li⁡0(z)=z/(1−z)\operatorname{Li}_0(z) = z/(1-z), past the unit disk

live ↗
InLi⁡0(5.5)\operatorname{Li}_{0}(5.5)Out−1.2‾-1.\overline{2}

Li⁡3(1/2)=78ζ(3)−π212ln⁡2+16ln⁡32\operatorname{Li}_3(1/2) = \frac78\zeta(3) - \frac{\pi^2}{12}\ln 2 + \frac16\ln^3 2

live ↗
InLi⁡3(12)\operatorname{Li}_{3}(\frac{1}{2})Out−112(ln⁡(2)π2)+ln⁡(2)36+7ζ(3)8-\frac{1}{12}(\ln(2)π^2)+\frac{\ln(2)^3}{6}+\frac{7ζ(3)}{8}
live ↗
InNormal⁡(Series⁡(Li⁡2(x),x,∞,6))\operatorname{Normal}(\operatorname{Series}(\operatorname{Li}_{2}(x), x, ∞, 6))OutSeries⁡(Li⁡2(x),x,∞,6)\operatorname{Series}(\operatorname{Li}_{2}(x), x, ∞, 6)
Scope #

Threads over a list of arguments

live ↗
InLi⁡2([0.5,0.25])\operatorname{Li}_{2}(\bigl\lbrack0.5, 0.25\bigr\rbrack)Out[0.582 240 526 465 012 5,0.267 652 639 082 732 5]\bigl\lbrack0.582\,240\,526\,465\,012\,5, 0.267\,652\,639\,082\,732\,5\bigr\rbrack

A non-integer order continues past ∣z∣=1|z| = 1 to a complex value, as Wolfram does: Li5/2(2)≈2.78966−1.36380i\mathrm{Li}_{5/2}(2) \approx 2.78966 - 1.36380i

live ↗
InLi⁡2.5(2)\operatorname{Li}_{2.5}(2)Out2.789 660 332 382 777 8−1.363 803 700 539 351i2.789\,660\,332\,382\,777\,8-1.363\,803\,700\,539\,351i

Complex order and argument

live ↗
InLi⁡0.2+i(0.5−0.5i)\operatorname{Li}_{0.2+i}(0.5-0.5i)Out0.070 326 520 550 516 03−0.563 293 262 539 874 4i0.070\,326\,520\,550\,516\,03-0.563\,293\,262\,539\,874\,4i

Past z=1z = 1 the continuation is complex

live ↗
InLi⁡2(2.5)\operatorname{Li}_{2}(2.5)Out2.420 790 806 565 934−2.878 612 231 808 261i2.420\,790\,806\,565\,934-2.878\,612\,231\,808\,261i

Li⁡3(−1)=−η(3)=−34ζ(3)\operatorname{Li}_3(-1) = -\eta(3) = -\frac34\zeta(3)

live ↗
InLi⁡3(−1)\operatorname{Li}_{3}(-1)Out−3ζ(3)4-\frac{3ζ(3)}{4}

Li⁡2(2)=π2/4−iπln⁡2\operatorname{Li}_2(2) = \pi^2/4 - i\pi\ln 2 exactly

live ↗
InLi⁡2(2)\operatorname{Li}_{2}(2)Outπ24−iπln⁡(2)\frac{π^2}{4}-i π\ln(2)

Li⁡n(−1)=−(1−21−n)ζ(n)\operatorname{Li}_n(-1) = -(1 - 2^{1-n})\zeta(n) for symbolic nn

live ↗
InLi⁡n(−1)\operatorname{Li}_{n}(-1)Out(21−n−1)ζ(n)(2^{1-n}-1)ζ(n)

Li⁡−2(z)=z(1+z)/(1−z)3\operatorname{Li}_{-2}(z) = z(1+z)/(1-z)^3

live ↗
InLi⁡−2(z)\operatorname{Li}_{-2}(z)Outz×(z+1)(1−z)3\frac{z×(z+1)}{(1-z)^3}

Interval arithmetic in zz, proven: Li⁡2′(z)=Φ(z,1,1)\operatorname{Li}_2'(z) = \Phi(z, 1, 1) keeps one sign, so the image is the values at the ends, rounded outward

live ↗
InLi⁡2(Interval(0.7,0.8))\operatorname{Li}_{2}(\mathrm{Interval}(0.7, 0.8))OutInterval(0.889 377 624 286 038,1.074 794 600 008 25)\mathrm{Interval}(0.889\,377\,624\,286\,038, 1.074\,794\,600\,008\,25)

Three arguments: the Nielsen generalized polylogarithm Sn,p(z)S_{n,p}(z), with S1,2(1)=ζ(3)S_{1,2}(1) = \zeta(3)

live ↗
InLi⁡1(2)\operatorname{Li}_{1}(2)Outζ(3)ζ(3)

S2,2(1)=π4/360S_{2,2}(1) = \pi^4/360

live ↗
InLi⁡2(2)\operatorname{Li}_{2}(2)Outπ4360\frac{π^4}{360}

S1,2(1/2)=ζ(3)/8−ln⁡32/6S_{1,2}(1/2) = \zeta(3)/8 - \ln^3 2/6

live ↗
InLi⁡1(2)\operatorname{Li}_{1}(2)Out0.094 753 004 230 127 70.094\,753\,004\,230\,127\,7

To 30 significant digits, past a double's reach

live ↗
InN(Li⁡2(12),30)N(\operatorname{Li}_{2}(\frac{1}{2}), 30)Out0.582 240 526 465 012 505 902 656 320 160.582\,240\,526\,465\,012\,505\,902\,656\,320\,16

Li0(z)=z1−z\mathrm{Li}_0(z)=\frac{z}{1-z}, so Li0(5)=−54\mathrm{Li}_0(5)=-\frac54

live ↗
InLi⁡0(5)\operatorname{Li}_{0}(5)Out−54-\frac{5}{4}

A 50-digit value of Li1(1/3)=−ln⁡(2/3)\mathrm{Li}_1(1/3) = -\ln(2/3)

live ↗
InN(Li⁡1(13),50)N(\operatorname{Li}_{1}(\frac{1}{3}), 50)Out0.405 465 108 108 164 381 978 013 115 464 349 136 571 990 423 462 490.405\,465\,108\,108\,164\,381\,978\,013\,115\,464\,349\,136\,571\,990\,423\,462\,49

Applies to a diagonal matrix entry by entry

live ↗
InLi⁡2([[12,0],[0,12]])\operatorname{Li}_{2}(\bigl\lbrack\bigl\lbrack\frac{1}{2}, 0\bigr\rbrack, \bigl\lbrack0, \frac{1}{2}\bigr\rbrack\bigr\rbrack)Out[[Li⁡2(12),0],[0,Li⁡2(12)]]\bigl\lbrack\bigl\lbrack\operatorname{Li}_{2}(\frac{1}{2}), 0\bigr\rbrack, \bigl\lbrack0, \operatorname{Li}_{2}(\frac{1}{2})\bigr\rbrack\bigr\rbrack

Lis(0)=0\mathrm{Li}_s(0)=0 for any order

live ↗
InLi⁡1(0)\operatorname{Li}_{1}(0)Out00

Differentiation lowers the order: ∂zLin(z)=Lin−1(z)/z\partial_z \mathrm{Li}_n(z)=\mathrm{Li}_{n-1}(z)/z

live ↗
IndLi⁡n(z)dz\frac{\mathrm{d}\operatorname{Li}_{n}(z)}{\mathrm{d}z}OutLi⁡n−1(z)z\frac{\operatorname{Li}_{n-1}(z)}{z}

MatrixFunction agrees with direct threading for a diagonal matrix

live ↗
InMatrixFunction(()↦Li⁡2(_1⁡),[[12,0],[0,12]])\mathrm{MatrixFunction}(()↦\operatorname{Li}_{2}(\operatorname{\_1}), \bigl\lbrack\bigl\lbrack\frac{1}{2}, 0\bigr\rbrack, \bigl\lbrack0, \frac{1}{2}\bigr\rbrack\bigr\rbrack)Out[[Li⁡2(12),0],[0,Li⁡2(12)]]\bigl\lbrack\bigl\lbrack\operatorname{Li}_{2}(\frac{1}{2}), 0\bigr\rbrack, \bigl\lbrack0, \operatorname{Li}_{2}(\frac{1}{2})\bigr\rbrack\bigr\rbrack
live ↗
InFullSimplify(Series⁡(Li⁡n(x),x,x0,2))\mathrm{FullSimplify}(\operatorname{Series}(\operatorname{Li}_{n}(x), x, \mathrm{x0}, 2))OutLi⁡n(x0)+1x0((x−x0)Li⁡n−1(x0))+(Li⁡n−2(x0)−Li⁡n−1(x0))(x−x0)22x02+O((x−x0)3)\operatorname{Li}_{n}(\mathrm{x0})+\frac{1}{\mathrm{x0}}((x-\mathrm{x0})\operatorname{Li}_{n-1}(\mathrm{x0}))+\frac{(\operatorname{Li}_{n-2}(\mathrm{x0})-\operatorname{Li}_{n-1}(\mathrm{x0}))(x-\mathrm{x0})^2}{2\mathrm{x0}^2}+O\left((x-\mathrm{x0})^3\right)
Applications #

Li⁡1/2(1)=ζ(1/2)\operatorname{Li}_{1/2}(1) = \zeta(1/2) — a non-integer order, from @enumeratio/analytic

live ↗
InLi⁡0.5(1)\operatorname{Li}_{0.5}(1)Out−1.460 354 508 809 586 812 89-1.460\,354\,508\,809\,586\,812\,89

Li⁡1/2(1/2)=0.80612672…\operatorname{Li}_{1/2}(1/2) = 0.80612672\ldots, via the Lerch series

live ↗
InLi⁡0.5(0.5)\operatorname{Li}_{0.5}(0.5)Out0.806 126 723 042 852 20.806\,126\,723\,042\,852\,2

Li⁡5/2(−1/2)=−0.46229778…\operatorname{Li}_{5/2}(-1/2) = -0.46229778\ldots — the alternating side, Euler-transformed

live ↗
InLi⁡2.5(−0.5)\operatorname{Li}_{2.5}(-0.5)Out−0.462 297 782 190 063 46-0.462\,297\,782\,190\,063\,46

Li⁡2(1/3)\operatorname{Li}_2(1/3) to 40 digits, proven: at an exact argument the series bounds its own error, and both ends of the enclosure round to these digits

live ↗
InN(Li⁡2(13),40)N(\operatorname{Li}_{2}(\frac{1}{3}), 40)Out0.366 213 229 977 063 487 616 746 297 664 262 763 802 10.366\,213\,229\,977\,063\,487\,616\,746\,297\,664\,262\,763\,802\,1

Li⁡5/2(−1/2)\operatorname{Li}_{5/2}(-1/2) to 40 digits, proven the same way at a non-integer order

live ↗
InN(Li⁡52(−12),40)N(\operatorname{Li}_{\frac{5}{2}}(-\frac{1}{2}), 40)Out−0.462 297 782 190 063 438 189 164 323 274 546 489 886 9-0.462\,297\,782\,190\,063\,438\,189\,164\,323\,274\,546\,489\,886\,9
Properties #

Li⁡1(z)=−ln⁡(1−z)\operatorname{Li}_1(z) = -\ln(1 - z), symbolically

live ↗
InLi⁡1(z)\operatorname{Li}_{1}(z)Out−ln⁡(1−z)-\ln(1-z)

Li⁡−1(z)=z/(1−z)2\operatorname{Li}_{-1}(z) = z/(1-z)^2 — negative orders are rational

live ↗
InLi⁡−1(z)\operatorname{Li}_{-1}(z)Outz(1−z)2\frac{z}{(1-z)^2}

Li⁡2(1/2)=π2/12−(ln⁡2)2/2\operatorname{Li}_2(1/2) = \pi^2/12 - (\ln 2)^2/2

live ↗
InLi⁡2(0.5)+0.5ln⁡(2)2=π212\operatorname{Li}_{2}(0.5)+0.5\ln(2)^2=\frac{π^2}{12}OutTrue\mathrm{True}

Li⁡s(1)=ζ(s)\operatorname{Li}_s(1) = \zeta(s) for symbolic ss

live ↗
InLi⁡s(1)\operatorname{Li}_{s}(1)Outζ(s)ζ(s)

ddxLi⁡n(x)=Li⁡n−1(x)/x\frac{d}{dx}\operatorname{Li}_n(x) = \operatorname{Li}_{n-1}(x)/x

live ↗
IndLi⁡n(x)dx\frac{\mathrm{d}\operatorname{Li}_{n}(x)}{\mathrm{d}x}OutLi⁡n−1(x)x\frac{\operatorname{Li}_{n-1}(x)}{x}

An argument on the unit circle is rewritten in Cartesian form

live ↗
InLi⁡3(exp⁡(13iπ))\operatorname{Li}_{3}(\exp(\frac{1}{3}i π))OutLi⁡3(12+32i)\operatorname{Li}_{3}(\frac{1}{2}+\frac{\sqrt{3}}{2}i)

Known value · Wolfram MathematicalFunctionData, PolyLog

The conjugate point on the unit circle, e−iπ/3e^{-i\pi/3}

live ↗
InLi⁡3(exp⁡((−13i)π))\operatorname{Li}_{3}(\exp((-\frac{1}{3}i)π))OutLi⁡3(12−32i)\operatorname{Li}_{3}(\frac{1}{2}-\frac{\sqrt{3}}{2}i)

Known value · Wolfram MathematicalFunctionData, PolyLog

A point at angle 2π/32\pi/3 on the unit circle

live ↗
InLi⁡3(exp⁡(23iπ))\operatorname{Li}_{3}(\exp(\frac{2}{3}i π))OutLi⁡3(31/22i−12)\operatorname{Li}_{3}(\frac{3^{1/2}}{2}i-\frac{1}{2})

Known value · Wolfram MathematicalFunctionData, PolyLog

FunctionExpand only normalises the argument, the dilogarithm stays

live ↗
InFunctionExpand(Li⁡2(exp⁡(1/3iπ)))\mathrm{FunctionExpand}(\operatorname{Li}_{2}(\exp(1/3i π)))OutLi⁡2(12+32i)\operatorname{Li}_{2}(\frac{1}{2}+\frac{\sqrt{3}}{2}i)
live ↗
InLi⁡2(12)−Li⁡2(−1)\operatorname{Li}_{2}(\frac{1}{2})-\operatorname{Li}_{2}(-1)Outπ212+Li⁡2(12)\frac{π^2}{12}+\operatorname{Li}_{2}(\frac{1}{2})

Known value · Wolfram MathematicalFunctionData, PolyLog, FunctionalEquations

live ↗
In−Li⁡2(−13)2+Li⁡2(−1)+Li⁡2(13)-\frac{\operatorname{Li}_{2}(-\frac{1}{3})}{2}+\operatorname{Li}_{2}(-1)+\operatorname{Li}_{2}(\frac{1}{3})Out−Li⁡2(−13)2−π212+Li⁡2(13)-\frac{\operatorname{Li}_{2}(-\frac{1}{3})}{2}-\frac{π^2}{12}+\operatorname{Li}_{2}(\frac{1}{3})

Known value · Wolfram MathematicalFunctionData, PolyLog, FunctionalEquations

live ↗
InLi⁡2(14)−2(Li⁡2(−12)+Li⁡2(12))\operatorname{Li}_{2}(\frac{1}{4})-2(\operatorname{Li}_{2}(-\frac{1}{2})+\operatorname{Li}_{2}(\frac{1}{2}))Out−2Li⁡2(−12)−2Li⁡2(12)+Li⁡2(14)-2\operatorname{Li}_{2}(-\frac{1}{2})-2\operatorname{Li}_{2}(\frac{1}{2})+\operatorname{Li}_{2}(\frac{1}{4})

Known value · Wolfram MathematicalFunctionData, PolyLog, FunctionalEquations

live ↗
InLi⁡2(−1)+Li⁡2(0)+Li⁡2(12)\operatorname{Li}_{2}(-1)+\operatorname{Li}_{2}(0)+\operatorname{Li}_{2}(\frac{1}{2})OutLi⁡2(12)−π212\operatorname{Li}_{2}(\frac{1}{2})-\frac{π^2}{12}

Known value · Wolfram MathematicalFunctionData, PolyLog, FunctionalEquations

Possible issues #

An exact argument stays symbolic under plain evaluation -- pair with N() or pass 0.5 instead

live ↗
InLi⁡2(12)\operatorname{Li}_{2}(\frac{1}{2})OutLi⁡2(12)\operatorname{Li}_{2}(\frac{1}{2})
About
Examples125
Checked againstWolfram Language 106 agree15 differ2 unevaluated1 errorSageMath 88 agree4 unevaluatedSymPy 107 agree8 differ3 unevaluatedmpmath 89 agree3 unevaluated
CrosswalkWikipediaMathWorldWikidatanLabDLMFFungrimFungrim entry ×5Wolfram LanguageSageMathSymPympmath

Implementation

mappedwolframpackages/oracle/src/mappings.ts
mappedsympypackages/oracle/src/mappings.ts
mappedmpmathpackages/oracle/src/mappings.ts
mappedsagepackages/oracle/src/mappings.ts

See also: LerchPhi, Zeta, HurwitzZeta, Ln