I'm computing an infinite sum of residues. I want to do something like this:
Sum[Sum[(-1)^n (2 π I) Residue[(w^(I nu + n/2) ws^(I nu - n/2))/(I nu + n/2)^2, {nu, I n/2 + I m}], {n, 1, ∞}], {m, 0, ∞}]
Evaluated like that, this gives zero. However, if I choose a specific value of m, specifically m=0,
Sum[(-1)^n (2 π I) Residue[(w^(I nu + n/2) ws^(I nu - n/2))/(I nu + n/2)^2, {nu, I n/2}], {n, 1, ∞}]
I get a nonzero result. The problem is that for generic m,
Sum[(-1)^n (2 π I) Residue[(w^(I nu + n/2) ws^(I nu - n/2))/(I nu + n/2)^2, {nu, I n/2 + I m }], {n, 1, ∞}]
is zero. It's only nonzero for $m=0$.
I thought that I could make this work by using Hold
, holding evaluation of the residue and releasing it outside the infinite sum. But it appears that applying ReleaseHold
there doesn't fix the problem, it still evaluates the Residue for the generic case before fitting in the specific ones.
Is there a way to make this work, and get the correct answer out of the infinite sum over m
?
(By the way, I know that in this case, all terms besides $m=0$ will be zero. I need the infinite sum because the same setup needs to treat cases where some of those terms are nonzero.)