LerchPhi
The Lerch transcendent — a common generalization of the polylogarithm and the Hurwitz zeta. Provided by @enumeratio/analytic.
Lerch transcendentMathWorldLerchTranscendentWikidataQ1546155DLMF25.14.E1FungrimLerchPhiFungrim entryd6fbc8Wolfram LanguageLerchPhi!LerchPhi(z, s, a)the Lerch transcendent .Typed signatures
| Type | Package | Applies |
|---|---|---|
(complex, complex, complex) -> number | analyticreplaces compute-engine | always |
(complex, complex, complex) -> number | compute-engine | always |
Details
- At it is the Hurwitz zeta: , so . See HurwitzZeta.
- It carries the polylogarithm: — e.g. .
- At it is the Dirichlet eta: , so .
- And the Dirichlet beta / Catalan's constant:
- — the geometric series (and its continuation), independent of , for all .
- Convergence: the series converges for (any , ), and on only for ; elsewhere it is defined by analytic continuation in .
- Poles at , from the singular term, as for HurwitzZeta.
- Numeric evaluation sums the series directly for (geometric convergence), routes through the Euler–Maclaurin Hurwitz kernel, and sums real (the rim included) by a van Wijngaarden Euler transform, so the alternating and Catalan cases reach machine precision. Past it is continued by the Hermite-type integral representation, , with other shifted by ; on the cut, real , it takes the side below, as mpmath and Wolfram do. Where the terms cancel below double precision, or the incomplete gamma can't be trusted (near the negative real axis past ), it stays unevaluated rather than guess.
- Certified digits: for exact real , and (integers, rationals or decimals) with and , is proven. The series is summed in ball arithmetic, and its tail after a term is bounded by , where bounds every later ratio of terms; the d digits are those both ends of the enclosure round to. See N.
Plot
Examples
385 more kept as data, checked against the oraclesScope #
past the unit disk, by the integral representation (mpmath: 0.00202500995700991 + 0.00332789753681356i)
live ↗Inexact arguments evaluate numerically without N() — a float operand means a float answer, as HurwitzZeta and Zeta already do
live ↗by analytic continuation: at , via the Hermite-integral continuation (lerch-continuation.ts)
live ↗Past it is continued; on the cut, real , it takes the side below, as mpmath and Wolfram do
live ↗Applications #
to 40 digits, proven: the series' tail is bounded, and both ends of the enclosure round to these digits
live ↗Properties #
Phi(z, s, 1) = Li_s(z)/z for any s, here as (1+i)*Li_2((1-i)/2) -- confirmed numerically against Wolframs closed form in Catalans constant
live ↗Possible issues #
Where the continuation's terms cancel below double precision it stays unevaluated rather than guess
live ↗About
| Examples | 415 |
|---|---|
| Checked against | Wolfram Language 381 agree31 differ1 unevaluatedSymPy 405 agree3 differ3 unevaluated3 errormpmath 400 agree3 differ3 unevaluated3 errorJulia 294 agree115 error |
| Crosswalk | WikipediaMathWorldWikidataDLMFFungrimFungrim entryWolfram LanguageSymPympmathJulia |
Implementation
notatioThe defining series, converging for |z| < 1 (and for |z| = 1 with Re(s) > 1); ζ(s, a) is its z = 1 edge and Li_s(z) its a = 1 slice.
typescriptpackages/ce-patches/src/compute-engine/numerics/lerch-phi.tsThe direct series, which covers |z| ≤ 1; z = 1 hands off to HurwitzZeta and inherits its closed forms.
wgslpackages/symbols/analysis/analytic/src/shader.ts:zetaWGSLProduces a colour per pixel — complex Φ, domain-coloured.
wolframpackages/oracle/src/mappings.tsFor a + k < 0, Wolfram sums ((a+k)²)^(−s/2), the generalized-zeta convention; mpmath, SymPy and ours take (a+k)^(−s), principal.
sympypackages/oracle/src/mappings.tsFor a + k < 0, Wolfram sums ((a+k)²)^(−s/2), the generalized-zeta convention; mpmath, SymPy and ours take (a+k)^(−s), principal.
mpmathpackages/oracle/src/mappings.tsFor a + k < 0, Wolfram sums ((a+k)²)^(−s/2), the generalized-zeta convention; mpmath, SymPy and ours take (a+k)^(−s), principal.
juliapackages/oracle/src/mappings.ts See also: HurwitzZeta, Zeta, Gamma, PolyLog