This is an offshoot of the question: Series Expansions in Mathematica. In that question, I thought I would simplify my problem and ask the simplest version of it. While I have gotten that answered, it seems there is still an issue with the real Mathematica code that I have.

I'm studying the Hurwitz Lerch Transcendant $\Phi(z,s,k)$ and am particularly interested only with $\Phi(z,n,\frac{1}{2})$ for $n\in {\mathbb Z}$. This function satisfies the following property. Define

f[z_, n_] :=  2^(n - 1)/Sqrt[z] (PolyLog[n, Sqrt[z]] - PolyLog[n, -Sqrt[z]])


HurwitzLerchPhi[z, n, 1/2] == f[z, n]

Now, Mathematica knows this fact. For instance, if I write

Plot[(HurwitzLerchPhi[z, n, 1/2] - f[z, n]) /. n -> 9, {z, 0.0000001,1}]
Plot[(HurwitzLerchPhi[z, n, 1/2] - f[z, n]) /. n -> 13, {z, 0.0000001,1}]
Plot[(HurwitzLerchPhi[z, n, 1/2] - f[z, n]) /. n -> 21, {z, 0.0000001,1}]
Plot[(HurwitzLerchPhi[z, n, 1/2] - f[z, n]) /. n -> 3, {z, 0.0000001,1}]

the plots are identically 0. I chose some random integers above. You can check this with other ones as well. We can also check this numerically with arbitrary accuracy.

However, if I consider the following code into Mathematica

FullSimplify[Series[HurwitzLerchPhi[1 - Sqrt[z], 3, 1/2] - f[1 - Sqrt[z], 3], {z, 0, 6}], 0 < z < 1]

I get $$ \frac{z^2}{4}+\frac{3 z^{5/2}}{8}+\frac{55 z^3}{96}+\frac{131 z^{7/2}}{192}+\frac{19219 z^4}{23040} +\frac{42493 z^{9/2}}{46080}\\\qquad \qquad \qquad \qquad +\frac{268843 z^5}{258048}+\frac{957181 z^{11/2}}{860160}+\frac{107031761 z^6}{88473600}+O\left(z^{13/2}\right) $$ which is demonstrably non-vanishing. The problem seems to occur if the argument is $1-\sqrt{z}$. For instance, there is no issue if I take the argument to be $1-z$ or $\sqrt{1-z}$, but you do get a non-zero answer with $\sqrt{1-\sqrt{z}}$.

I don't understand at all what Mathematica is doing here. Further, the issue does not seem to be one of convergence (As suggested in the answer to Series Expansions in Mathematica).

What is going on?

  • 1
    $\begingroup$ Strongly recommend that you provide the definition for f written in formatted inline code. I believe you will get more help if you do so. $\endgroup$ Dec 4, 2016 at 3:03
  • 1
    $\begingroup$ I agree with the comment about the missing f by @JackLVigne. That said, some numerical checks point to the possibility of a bug in the Series expansion. Possibly related to the issue reported in the earlier MSE note (same OP) re ArcTanh. $\endgroup$ Dec 4, 2016 at 16:19
  • $\begingroup$ @JackLaVigne - I did what you asked! $\endgroup$
    – Prahar
    Dec 6, 2016 at 1:59
  • 2
    $\begingroup$ It's due to a bug in the series expansion for HurwitzLerchPhi. $\endgroup$ Dec 6, 2016 at 14:49

1 Answer 1


That changed for the better in version 12.0. E.g.

f[z_, n_] := 2^(n - 1)/Sqrt[z] (PolyLog[n, Sqrt[z]] - PolyLog[n, -Sqrt[z]]);
FullSimplify[Series[HurwitzLerchPhi[1-Sqrt[z],3,1/2]-f[1-Sqrt[z],3],{z,0, 8}],0<z<1]

$ O\left(z^{17/2}\right)$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.