Specifying that k
is a positive integer can be done with Assumptions->And[Element[k,Integers],k>0]
but that alone does not seem to do it here.
I just did a bit of detective work to see where the problem could potentially come from, but do not expect a solution. So using
Series[LerchPhi[z,-1,b],{z,1,0}]
Series[LerchPhi[z,-2,b],{z,1,0}]
one sees that there is a 2nd order pole at $z=1$ in the first case, a 3rd order pole at $z=1$ in the second case, and this continues predictably. In fact LerchPhi[z,-1,b]
is rational in $z$, actually a polynomial in $1/(z-1)$, and evaluates to a rational expression even before Series
does its work. Same for LerchPhi[z,-2,b]
and so on.
However
Series[LerchPhi[z,-a,b],{z,1,0}]
evaluates to
LerchPhi[1+O[z-1]^1,-a,b]
and that is also the case when adding Assumptions->And[Element[a,Integers],a>0]
and one can start to guess where the trouble comes from. For comparison,
Series[unknownsymbol[z,-a,b],{z,1,0}]
evaluates to
unknownsymbol[1,-a,b]+O[z-1]^1
Interestingly
Limit[(z-1)*LerchPhi[z,-a,b],z->1]
is left unevaluated, which is not wrong, but
With[{z=Exp[x]},
Limit[(z-1)*LerchPhi[z,-a,b],x->0]]
evaluates to 0
, even if we add Assumptions->...
, which is not right.
As someone who has never myself thought much about the algorithmic side of such symbolic computations, which is clearly a very difficult problem in general, and as someone who is regularly impressed by what Mathematica can do, I guess here one could have hoped, from a naive user perspective, that Mathematica would recognize that it does not know the answer, and that it would leave things unevaluated. On the other hand, explicitly evaluating the limit in your post requires cancellations among various terms of the Laurent series at $z=1$, where the order of the poles depends on k
. For symbolic k
, that seems somewhat subtle for an algorithm to figure out. I usually expect that I need to do work myself, often interactive work with the computer, if there is something slightly subtle going on. Now in this particular case one can figure out, thanks to Mathematica and OEIS and some guesstrapolation, that the limit is -1/(2*k)*BernoulliB[2*k,-n]
.
In
is incorrect. You can look upIn
in the help system and see how it is used.Element[k,Reals]
would be better. But simpler,k>0
meansk
must also be Real because>
is meaningless for complex values. Just a fumbling guess, do you perhaps need to tell it anything about the domain ofn
? Don't know. $\endgroup$