We are searching in our group for closed forms of derivatives of hypergeometric functions. This leads to expressions like

$\sum\limits_{m=2}^\infty \frac{z^m\Gamma[m-1/2]H_m}{2m^2\sqrt{\pi}\Gamma[m]}$

where $H_m$ denotes the m-th harmonic number. Now trying to evaluate this in Mathematica 12.0 using

Sum[(z^m*Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]*Gamma[m]), {m, 2, Infinity}]

returns 0. But in this case we actually know a rather complicated closed form expression for this sum in terms of logs and polylogs which are non-vanishing. Moreover, taking the case $z=1$, Mathematica 12.0 evaluates the sum correctly, i.e.

Sum[Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]*Gamma[m]), {m, 2, Infinity}]

returns $\frac{7 \sqrt{\pi }-\frac{2 \pi ^{5/2}}{3}}{2 \sqrt{\pi }}$ which is correct and non-zero. Thus the result form the original command seems to be wrong. Are we missing something? Is there a way to prevent these wrong evaluations? We would like to use Mathematica to compute some series with a priori unknown closed forms and that behaviour is worrying us.

  • 1
    $\begingroup$ Sum[(z^m*Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]* Gamma[m]), {m, 1, Infinity}] returns the input in version on Windows 10. $\endgroup$
    – user64494
    Nov 25, 2020 at 17:29
  • $\begingroup$ Replacing z with (1/z) avoids the 0 result. It also cannot find the sum, suggesting it cannot find a general formula. Sum finds a sum for any rational number z = p/q that I've tried. $\endgroup$
    – Michael E2
    Nov 25, 2020 at 17:29
  • $\begingroup$ It should be noticed Sum[(Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]* Gamma[m]), {m, 1, Infinity}] returns the input in version on Windows 10. It seems Sum[Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]*Gamma[m]), {m, 2, Infinity}] is implemented in Mathematica as a table value. $\endgroup$
    – user64494
    Nov 25, 2020 at 17:38
  • $\begingroup$ The summation starting at 1 is not summed also in 12.0. But replacing z by 1/z does not change the behaviour. $\endgroup$
    – Rohbar
    Nov 25, 2020 at 18:11
  • $\begingroup$ Sum[((1/2)^m*Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]* Gamma[m]), {m, 1, Infinity}] returns the input, but Sum[((1/2)^m*Gamma[-(1/2) + m]*HarmonicNumber[m])/(2*m^2*Sqrt[Pi]* Gamma[m]), {m, 2, Infinity}] produces $\frac{1}{4} \left(-8 \text{Li}_2\left(-2 \left(\sqrt{2}+1\right)\right)+8 \text{Li}_2\left(2 \sqrt{2}-3\right)+8 \text{Li}_2\left(-2 \sqrt{2}-3\right)-8 \sqrt{2}+...+8 \log (2) \left(\sqrt{2}+\log \left(2-\sqrt{2}\right)-\log \left(\sqrt{2}+2\right)\right)+4 \log \left(\sqrt{2}-1\right) \left(\sqrt{2}+\log (16)-2 \log \left(\sqrt{2}+2\right)\right)\right)$. $\endgroup$
    – user64494
    Nov 25, 2020 at 19:00

1 Answer 1


The sum is equal to

4 - z/2 - 4*Sqrt[1 - z]*(1 + ArcTanh[Sqrt[1 - z]] - Log[2] + 
Log[Sqrt[z/(1 - z)]]) - 2*PolyLog[2, (1 - Sqrt[1 - z])^2/z]

You may get results like this via inserting the integral representation of

HarmonicNumber[m]=Integrate[(1 - t^m)/(1 - t), {t, 0, 1}]

into the sum and exchange sum and integral operations. So in most cases it is more involved than just typing a sum into a notebook.

  • $\begingroup$ This gives a nice way to get Mathematica to give the correct result(+1 for that). This would be a perfect approach if Mathematica would just return the sum unevaluated. But the problem is that Mathematica claims that the Sum command is strong enough and gives the wrong result for the sum starting with m=2 instead of leaving it unevaluated. $\endgroup$
    – Rohbar
    Nov 26, 2020 at 12:51
  • $\begingroup$ One should always check a symbolic result for numeric correctness or at least plausibility. I would consider this a minor bug only. $\endgroup$
    – Andreas
    Nov 26, 2020 at 21:10

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.