Alternating sine series with a quadratic denominator (source code)

= Alternating sine series with a quadratic denominator
{title2=$\sum_{n\in\mathbb Z}(-1)^n n\sin(nx)/(a^2+n^2)=-\pi\sinh(ax)/\sinh(a\pi)$}

For real $a\ne0$ and $|x|<\pi$, integrate $z\sin(xz)/((a^2+z^2)\sin\pi z)$ around a thin positively oriented strip containing the integers. Its integer <residues> give the series. Closing the two strip sides outward instead gives minus the sum of the residues at $z=\pm ia$, each $\sinh(ax)/(2\sinh(a\pi))$. The factor $|x|<\pi$ ensures exponential decay on those closures. The bilateral series is interpreted by symmetric partial sums; at $a=0$ its continuous extension is $-x$ with the zero-index summand defined to be zero.