# What is the principal difference betwen two results of a seemingly similar sums?

Summing

 Sum[(a^2 + (b + n)^2)^(-1), {n, -Infinity, Infinity}]


gives

$$\frac{\pi \sinh (2 \pi a)}{a (\cosh (2 \pi a)-\cos (2 \pi b))}$$

whereas summing

     Sum[(a^2 + (b + 2 \[Pi] n)^2)^(-1), {n, -Infinity, Infinity}]


gives

$$\begin{array}{cc} \{ & \begin{array}{cc} \frac{\coth \left(\frac{a}{2}+\frac{i b}{2}\right)+\coth \left(\frac{a}{2}-\frac{i b}{2}\right)}{4 a} & \arg (b+i a)\geq 0 \\ \frac{\coth \left(\frac{1}{2} (a+i b)\right)}{4 a}+\frac{\coth \left(\frac{1}{2} (a-i b)\right)}{4 a}-\frac{1}{2 a} & \text{True} \\ \end{array} \\ \end{array}$$

listing two different cases. What is the source of that?

Also, putting a condition on $$a$$ to be real and positive

 Refine[Sum[(a^2 + (b + 2*\[Pi] n)^2)^(-1), {n, -Infinity,
Infinity}], {Element[{a, b}, Reals], a > 0}]


does not get rid of the "cases", as it should (because then the imaginary part of $$(b+ia)$$ is always positive), the result remains exactly the same as above. Maybe I didn't state the assumptions on $$a$$ correctly? I use Mathematica ver 11.3.0.0.

• MMA 11.0.1 evaluates the second sum to (Coth[1/2 (a - I b)] + Coth[1/2 (a + I b)] + 2 Floor[Arg[I a + b]/(2 \[Pi])])/(4 a) . Try // ComplexExpand – Ulrich Neumann May 24 at 12:51