Open GoogleCodeExporter opened 9 years ago
The implementation of lerchphi is very simple. It uses a recurrence to force
Re(a) > 0, and then uses an integral representation. This is all described in
the documentation.
I'm not sure if I see the reason why it should be continuous in a (probably if
z and/or s are integers, but generally?).
If I remember correctly, I tried to make the function agree with
HurwitzLerchPhi in Mathematica, but I'm not sure if that's always the case.
There is an older function LerchPhi in Mathematica with a rather dumb branch
structure, and they introduced HurwitzLerchPhi in 7.0 specifically to address
that. So I think the Mathematica developers thought carefully about the branch
cuts, and it would probably be reasonable to copy what they did.
But I'm not sure if the current function accomplishes that. It's unfortunately
not documented precisely how Mathematica defines the analytic continuation, so
the only way to find out is by trial and error.
Original comment by fredrik....@gmail.com
on 22 Jul 2011 at 5:02
I'm not claiming that it should be continuous in a everywhere, but certainly
for Re(a) > 0, Re(s) > 0, and z not in [1, oo), I think it should. Indeed the
well-known integral representation
http://upload.wikimedia.org/math/6/a/e/6ae504b23019219cc2bad00fe0a9d47a.png
(phi(z, s, a) = 1/gamma(s) int_0^infty t^{s-1}e^{-at}/(1 - ze^{-t}} dt)
which provides an analytic continuation of the series definition into said
domain seems continuous to me. Also the integral representation you are
providing in the docs seems to have this property, although I'm not entirely
sure about the branches of arctan there.
Again I'm not claiming to be an expert at all, I'm just working to add lerchphi
etc to sympy, and trying to understand its behaviour on the way :-).
Original comment by ness...@googlemail.com
on 22 Jul 2011 at 9:40
Yes, it might be the arctangent in the integrand that's to blame. The integral
representation used is the one taken from the DLMF, although it's stated only
to be valid for Re(s) > 0, |z| < 1 there.
The Wikipedia article contains another version of the "Hermite-like integral
representation" with the branch dependence on the parameter essentially
factored out. I'm not able to work on this right now; you could try it out if
you like.
Original comment by fredrik....@gmail.com
on 23 Jul 2011 at 1:02
Original issue reported on code.google.com by
ness...@googlemail.com
on 22 Jul 2011 at 11:50