LerchPhi[z,s,a]
gives the Lerch transcendent
.
LerchPhi
LerchPhi[z,s,a]
gives the Lerch transcendent
.
Details and Options
- Mathematical function, suitable for both symbolic and numerical manipulation.
- LerchPhi is a generalization of Zeta[s], Zeta[s,a], PolyLog and related functions. »
- For
, the Lerch transcendent is defined by
. - For
, the definition used is
, where by default any term with
is excluded. - LerchPhi is identical to HurwitzLerchPhi for
. » - LerchPhi follows the branch cut conventions of the generalized Riemann
function as given by Zeta. By contrast, HurwitzLerchPhi uses the branch cuts as defined by HurwitzZeta. » - Unlike HurwitzLerchPhi, LerchPhi by default has regularized, finite values when the defining series has terms with zero denominator. »
- LerchPhi takes the following options:
-
DoublyInfinite False whether to compute the transcendent defined by a doubly inifinite sum IncludeSingularTerm False whether to include terms for which 
- LerchPhi[z,s,a,DoublyInfinite->True] gives the sum
. - The option IncludeSingularTermFalse only affects values at
and
. » - For certain special arguments, LerchPhi automatically evaluates to exact values.
- LerchPhi can be evaluated to arbitrary numerical precision.
- LerchPhi automatically threads over lists.
- LerchPhi can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (6)
LerchPhi[2, 3, -1.5]Simple exact values are generated automatically:
LerchPhi[1, 2, 1 / 4]Plot over a subset of the reals:
Plot[LerchPhi[x, 1, 2], {x, -1, 1}]Plot over a subset of the complexes:
ComplexPlot3D[LerchPhi[z, 1, 1 / 2], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansion at the origin:
Series[LerchPhi[z, 0, 0], {z, 0, 5}]Series expansion at Infinity:
Series[LerchPhi[z, 1, 2], {z, ∞, 6}]//NormalScope (32)
Numerical Evaluation (6)
LerchPhi[7., 1, 2]LerchPhi[49., 0, 2]N[LerchPhi[7 / 3, 5, 2], 50]The precision of the output tracks the precision of the input:
LerchPhi[2.00000000000000000000000, 3, 5]LerchPhi[5. + I, I, I + 2]Evaluate efficiently at high precision:
LerchPhi[16`100, 3, 2]//TimingLerchPhi[15`1000, 4, 2];//TimingCompute worst-case guaranteed intervals using Interval and CenteredInterval objects:
LerchPhi[Interval[{0.234, 0.235}], Interval[{0.345, 0.346}], Interval[{0.456, 0.457}]]LerchPhi[CenteredInterval[3 / 4, 1 / 100], CenteredInterval[5 / 6, 1 / 100], CenteredInterval[7 / 8, 1 / 100]]Compute average-case statistical intervals using Around:
LerchPhi[Around[1 / 2, 0.01], 1, 2]Compute the elementwise values of an array:
LerchPhi[{{1 / 2, 1}, {1, 1 / 2}}, 2, 1]Or compute the matrix LerchPhi function using MatrixFunction:
MatrixFunction[LerchPhi[#, 2, 1]&, {{1 / 2, 1}, {1, 1 / 2}}]//FullSimplifySpecific Values (6)
Simple exact values are generated automatically:
Table[LerchPhi[z , 1, 1], {z, -1, 2}]
is a rational function in
and a polynomial in
if
:
LerchPhi[z, 0, a]The following is manifestly a rational function in
:
LerchPhi[z, -1, a]//TogetherPolynomialQ[%, a]LerchPhi[z,s,0] is simply PolyLog[s,z]:
LerchPhi[z, s, 0]LerchPhi[z,s,1] is PolyLog[s,z]/z:
LerchPhi[z, s, 1]LerchPhi[-1,s,a] gives expressions in Zeta:
LerchPhi[-1, s, 1]LerchPhi[-1, s, 1 / 2]LerchPhi[0, 0, 0]Approaching along the line
gives the same result:
LerchPhi[0, s, 0]Approaching along the line
gives
:
LerchPhi[0, 0, a]Approaching the origin along the line
also gives 1, but in a more interesting fashion:
LerchPhi[z, 0, 0]Limit[%, z -> 0]Find a value of z for which LerchPhi[z,1,0]=1.05:
zval = z /. FindRoot[LerchPhi[z, 1, 0] == 1.05, {z, .5}]Plot[LerchPhi[z, 1, 0], {z, -1, 1}, Epilog -> Style[Point[{zval, LerchPhi[zval, 1, 0]}], PointSize[Large], Red]]Visualization (3)
Plot the LerchPhi function:
Plot[LerchPhi[z, 1, 1 / 2], {z, -1, 1}]Plot the real part of the LerchPhi function:
ComplexContourPlot[Re[LerchPhi[z, 2, 1]], {z, -4 - 3I, 4 + 3I}, IconizedObject[«PLotOptions»]]Plot the imaginary part of the LerchPhi function:
ComplexContourPlot[Im[LerchPhi[z, 2, 1]], {z, -4 - 3I, 4 + 3I}, IconizedObject[«PlotOptions»]]ComplexPlot3D[LerchPhi[(1/2), (1/2), a], {a, -4 - 3I, 4 + 3I}]Visualize how LerchPhi and HurwitzLerchPhi agree for
but not
:
ComplexPlot3D[HurwitzLerchPhi[1 / 2, 1 / 2, a] - LerchPhi[1 / 2, 1 / 2, a], {a, -4 - 3I, 4 + 3I}, IconizedObject[«Style options»]]Function Properties (11)
Real domain of LerchPhi:
FunctionDomain[LerchPhi[x, s, a], x]FunctionDomain[LerchPhi[z, s, a], z, Complexes]Approximate function range of
:
FunctionRange[LerchPhi[x, -1 / 2, -2], x, y]//QuietLerchPhi threads elementwise over lists and matrices:
LerchPhi[{1.2, 1.5, 1.8}, 2, 2]FunctionAnalytic[LerchPhi[x, 1, 2], x]FunctionMeromorphic[LerchPhi[x, 1, 2], x]
is neither non-decreasing nor non-increasing:
FunctionMonotonicity[LerchPhi[x, 1, 2], x]FunctionInjective[LerchPhi[x, 1, 2], x]Plot[{LerchPhi[x, 1, 2], 5}, {x, -3, 2}]FunctionSurjective[LerchPhi[x, 1, 2], x]Plot[{LerchPhi[x, 1, 2], -2}, {x, -5, 1}]
is neither non-negative nor non-positive:
FunctionSign[LerchPhi[x, 1, 2], x]
has both singularity and discontinuity for
or for
:
FunctionSingularities[LerchPhi[x, 1, 2], x]FunctionDiscontinuities[LerchPhi[x, 1, 2], x]
is neither convex nor concave:
FunctionConvexity[LerchPhi[x, 1, 2], x]TraditionalForm formatting:
LerchPhi[z, s, a]//TraditionalFormDifferentiation (2)
First derivative with respect to z:
D[LerchPhi[z, s, a], z]First derivative with respect to a:
D[LerchPhi[z, s, a], a]Higher derivatives with respect to z:
Table[D[LerchPhi[z, s, a], {z, k}], {k, 1, 3}]//FullSimplifyPlot the higher derivatives with respect to z when s=2 and a=1/3:
Plot[Evaluate[% /. {s -> 2, a -> 1 / 3}], {z, -1, 1}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative"}]Series Expansions (4)
Find the Taylor expansion in
for generic
and
using Series:
Series[LerchPhi[z, s, a], {z, 0, 5}]//NormalPlots of the first three approximations around
:
terms = Normal@Table[Series[LerchPhi[z, 1, 2], {z, 0, m}], {m, 1, 5, 2}];
Plot[{LerchPhi[z, 1, 2], terms}, {z, -10, 10}, PlotRange -> {-10, 10}]Series expansion in
at a generic point:
Series[LerchPhi[x, s, a], {a, a0, 3}]//NormalSeries expansion about
when
has the singular value
and
:
Series[LerchPhi[z, 1, 2], {z, 0, 4}]Do the expansion about
instead:
Series[LerchPhi[z, 1, 2], {z, 1, 4}]Series expansion in
near
,
,
:
Series[LerchPhi[0, s, 2], {s, 1, 3}]Series expansion in
about the same point:
Series[LerchPhi[0, 1, a], {a, 2, 3}]LerchPhi can be applied to power series:
LerchPhi[x - (x^2/2) + (x^3/9) + O[x]^4, 2, 2]Options (5)
DoublyInfinite (3)
By default, LerchPhi includes only terms with positive
:
Series[LerchPhi[z, s, a], {z, 0, 2}]In a symmetric case, setting DoublyInfinite->True just doubles the result:
LerchPhi[1, 2, 0.5]LerchPhi[1, 2, 0.5, DoublyInfinite -> True]In a more general case, negative
terms have a more complicated effect:
LerchPhi[2, 3, 0.5]LerchPhi[2, 3, 0.5, DoublyInfinite -> True]IncludeSingularTerm (2)
LerchPhi by default gives regularized, finite values for
for
:
LerchPhi[2, 3, -4]Obtain the raw, infinite value by setting IncludeSingularTerm->True:
LerchPhi[2, 3, -4, IncludeSingularTerm -> True]For noninteger
, the option does not change the value:
With[{r = RandomReal[]}, LerchPhi[2, 3, -4 + r] == LerchPhi[2, 3, -4 + r, IncludeSingularTerm -> True]]Nor does it have any effect when
:
LerchPhi[2, -3, -4] == LerchPhi[2, -3, -4, IncludeSingularTerm -> True]LerchPhi[z,s,a,IncludeSingularTermTrue] is ComplexInfinity when there is a singular term and
:
LerchPhi[z, RandomReal[], -2, IncludeSingularTerm -> True]It is indeterminate if there is a singular term and
:
LerchPhi[z, I RandomReal[], -2, IncludeSingularTerm -> True]Applications (2)
Find a zero of LerchPhi:
FindRoot[LerchPhi[-1, s, 2] == 0, {s, 20I}]Central moments of a geometric probability distribution:
Sum[((n - (1 - p/p))^k p (1 - p)^n), {n, 0, Infinity}]Table[%, {k, 4}]//SimplifyProperties & Relations (10)
Obtain LerchPhi from sums:
Sum[z ^ k / ((2k + α)^2) ^ (s / 2), {k, 0, Infinity}]LerchPhi is a numeric function:
Attributes[LerchPhi]NumericQ[LerchPhi[2 + E, Pi, E]]LerchPhi[z,s,a] gives regularized, finite values when a:
LerchPhi[1 / 2, 1, 0]Plot[LerchPhi[1 / 2, 1, a], {a, -1, 1}, PlotRange -> {0, 15}, Epilog -> {AbsolutePointSize[Large], ColorData["DefaultPlotColors"][1], Point[{0, LerchPhi[1 / 2, 1, 0]}]}]HurwitzLerchPhi agrees with LerchPhi for
:
With[{z = RandomComplex[1 + I], s = RandomReal[]}, LerchPhi[z, s, 2 + I] == HurwitzLerchPhi[z, s, 2 + I]]With[{z = RandomComplex[1 + I], s = RandomReal[]}, LerchPhi[z, s, -2 + I] == HurwitzLerchPhi[z, s, -2 + I]]LerchPhi by default omits singular terms for which the denominator is zero:
LerchPhi[z, 2, -2]The term
in the defining series is omitted:
% == Sum[If[k == 2, 0, (z^k/(k + -2)^2)], {k, 0, Infinity}]//ExpandHurwitzLerchPhi, by contrast, includes these terms:
HurwitzLerchPhi[z, 2, -2]% === Sum[(z^k/(k + -2)^2), {k, 0, Infinity}]Zeta[s] equals LerchPhi[1,s,1] for Re[s]>1:
FullSimplify[Zeta[s] == LerchPhi[1, s, 1], Re[s] > 1]Zeta[s,a] equals LerchPhi[1,s,a] for Re[s]>1:
Block[{a = RandomComplex[{-2 - 2I, 2 + 2I}], s = RandomComplex[{1 - 2I, 5 + 2I}]}, Zeta[s, a] - LerchPhi[1, s, a]]HurwitzLerchPhi is different from LerchPhi in the choice of branch cuts:
{Sum[(z^k/(k + a)^s), {k, 0, Infinity}], Sum[(z^k/((k + a)^2)^s / 2), {k, 0, Infinity}]}% /. {z -> 1, s -> 3, a -> -1.5}HurwitzLerchPhi matches HurwitzZeta, while LerchPhi matches Zeta:
{HurwitzZeta[3, -1.5], Zeta[3, -1.5]}LerchPhi is a generalization of PolyLog:
PolyLog[s, z] == LerchPhi[z, s, 0]PolyLog[s, z] == z LerchPhi[z, s, 1]DirichletEta is a special case of LerchPhi:
DirichletEta[s] == LerchPhi[-1, s, 1]DirichletBeta is dilation of LerchPhi:
DirichletBeta[s] == 2^-sLerchPhi[-1, s, 1 / 2]Possible Issues (4)
A larger setting for $MaxExtraPrecision can be needed:
N[Im[LerchPhi[2, 50 + 10 I, Pi]], 20]Block[{$MaxExtraPrecision = 200}, N[Im[LerchPhi[2, 50 + 10 I, Pi]], 20]]LerchPhi uses numerical comparisons when singular terms are included:
LerchPhi[3, 2, -2.99999999999999, IncludeSingularTerm -> True]LerchPhi[3, 2, -2.999999999999999, IncludeSingularTerm -> True]For
, LerchPhi cannot always be evaluated in terms of Zeta for symbolic s:
LerchPhi[1, s, 1]With[{s = 3}, {LerchPhi[1, s, 1], Zeta[s]}]FunctionExpand[LerchPhi[1, s, 1], s > 1]With[{s = -3}, {LerchPhi[1, s, 1], Zeta[s]}]The line
is not considered to have a singular term:
LerchPhi[z, 0, 0, IncludeSingularTerm -> True]This is consistent with Sum, which considers
to be
for all
:
% == Sum[(z^k/k^0), {k, 0, Infinity}] == Sum[z^k, {k, 0, Infinity}]See Also
Zeta PolyLog HurwitzLerchPhi DirichletEta DirichletBeta AlternatingHarmonicNumber
Function Repository: ArcTanIntegral
Tech Notes
Related Links
History
Introduced in 1988 (1.0) | Updated in 2023 (13.3)
Text
Wolfram Research (1988), LerchPhi, Wolfram Language function, https://reference.wolfram.com/language/ref/LerchPhi.html (updated 2023).
CMS
Wolfram Language. 1988. "LerchPhi." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/LerchPhi.html.
APA
Wolfram Language. (1988). LerchPhi. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LerchPhi.html
BibTeX
@misc{reference.wolfram_2026_lerchphi, author="Wolfram Research", title="{LerchPhi}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LerchPhi.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_lerchphi, organization={Wolfram Research}, title={LerchPhi}, year={2023}, url={https://reference.wolfram.com/language/ref/LerchPhi.html}, note=[Accessed: 12-June-2026]}