# Intriguing Poisson sum with hyperbolic function

I've been playing with lots of Poisson sums lately, and I thought this one to be interesting: $$\sum_{k\in\mathbb{Z}}\left(\frac{1}{(k+x)\sinh{(k+x)\pi q}}-\frac{1}{\pi q (k+x)^2}\right)$$I want to find a closed form for this sum and its derivatives over $x$ when $x=0$ and $q=1$. Since its poles are of the form $k+\frac{in}{q}\,(k,n\text { integers})$ with double-order poles at the integers, I figure its expression may include trigonometric and theta functions...but I can't figure anything beyond its singularities. Any help would be appreciated.

I've managed to turn the sum into a Fourier series $\left(-4\sum_{k\ge 1}\ln(1+e^{-2k\pi / q})\cos{2k\pi x}\right)\quad\;$, but even with its simplicity, I haven't been able to crack it.

(Edit) I think I have a way to evaluate the Fourier series: if I expand the cosines into Taylor series, then I just have to sum series of the form $$\sum_{k \ge 1}k^{2n}\ln(1+e^{-2k\pi/q})$$ which I can rewrite as $$\sum_{m\ge 1}\frac{(-1)^{m-1}}m\sum_{k\ge 1}k^{2n}e^{-2km\pi/q}$$and since $\displaystyle{\sum_{k\ge 1}e^{-2km\pi/q}=\frac1{e^{2m\pi/q}-1}}$, $\displaystyle{\sum_{k\ge 1}k^2e^{-2km\pi/q}=\frac14\frac{\cosh{\frac{m\pi}q}}{\sinh^3{\frac{m\pi}q}}}$ and subsequent sums consist of a hyperbolic cosine times an odd reciprocal polynomial in the hyperbolic sine, I've reduced my problem to evaluating sums of the form $$\sum_{m \ge 1}\frac{(-1)^{m-1}}m \frac{\cosh{\frac{m\pi}q}}{\sinh^{2n+1}{\frac{m\pi}q}}$$which is also $\displaystyle{\int{\sum_{k\ge 1}\frac{(-1)^{k-1}\sinh{kz}}{\sinh^{2n+1}{\frac{k\pi}q}}\, dz}}$ with $z=\frac{i\pi}q$. But here I am stuck.

I've found an integral representation for my series: With $$S(z,a;q):=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\sum_{k\in\mathbb Z}\frac{e^{-2(a+k)\pi qz}}{\sinh(a+k)\pi q},$$ \begin{align}\int_0^{i/q}S(z,a;q)\,dz&=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\int_0^{i/q}\sum_{k\in\mathbb Z}\frac{e^{-2(a+k)\pi qz}}{\sinh(a+k)\pi q}\,dz\\[2ex] &=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\sum_{k\in\mathbb Z}\frac1{\sinh(a+k)\pi q}\frac{e^{-2(a+k)i\pi}-1}{-2(a+k)\pi q}\\[2ex] &=\frac{\varphi(a,q)}{2\varphi'(0,q)}\sum_{k\in\mathbb Z}\frac{e^{-2ai\pi-2ki\pi}-1}{-(a+k)\sinh(a+k)\pi q}\\[2ex] &=\frac{\varphi(a,q)}{2\varphi'(0,q)}(1-e^{-2ai\pi})\sum_{k\in\mathbb Z}\frac1{(a+k)\sinh(a+k)\pi q}\tag1. \end{align}And $$S(z,a;q)$$ just happens to be the quotient of two theta functions (see proof in the appendix below): $$S=\phi(z+a,q)/\phi(z,q)$$, where \begin{align}\phi(z,q):&=\sum_{k\in\mathbb Z}(-1)^ke^{-\pi q(k+z)^2}\\[2ex] &=e^{-\pi qz^2}\prod_{k\ge1}(1-e^{-2k\pi q})(1-e^{-(2k-1)\pi q+2\pi qz})(1-e^{-(2k-1)\pi q-2\pi qz})\tag2\\[3ex] \phi(z,q)&=\varphi(z\!+\!1/2,q) \end{align} The identity $$\phi(z+i/q,q)=e^{\pi/q-2i\pi z}\phi(z,q)$$ (which can be derived directly from $$(2)$$) leads to $$S(z+i/q,a;q)=e^{-2ai\pi}S(z,a;q)$$, implying double periodicity for $$a\in\mathbb Q$$. Thus the expression $$(1)$$, in principle, will have a closed form in terms of log-theta functions when $$a$$ is rational.
## Proof that $$S(z,a;q)$$ is a quotient of theta functions
To prove $$S$$ has such a representation, create a quotient product with $$(2)$$:\begin{align}\frac{\phi(z+a,q)}{\phi(z,q)}&=e^{-\pi q(z+a)^2+\pi qz^2}\prod_{k\ge1}\bigg(\frac{1-e^{-(2k-1)\pi q+2\pi q(z+a)}}{1-e^{-(2k-1)\pi q+2\pi qz}}\bigg)\bigg(\frac{1-e^{-(2k-1)\pi q-2\pi q(z+a)}}{1-e^{-(2k-1)\pi q-2\pi qz}}\bigg)\\[3ex] &=e^{-2a\pi qz-a^2\pi q}\prod_{k\ge1}\bigg(\frac{1-e^{-(2k-1)\pi q+2\pi qz}\cdot e^{2a\pi q}}{1-e^{-(2k-1)\pi q+2\pi qz}}\bigg)\bigg(\frac{1-e^{-(2k-1)\pi q-2\pi qz}\cdot e^{-2a\pi q}}{1-e^{-(2k-1)\pi q-2\pi qz}}\bigg)\\[3ex] &=e^{-2a\pi qz-a^2\pi q}\prod_{k\ge1}\bigg(e^{2a\pi q}+\frac{1-e^{2a\pi q}}{1-e^{-(2k-1)\pi q+2\pi qz}}\bigg)\bigg(e^{-2a\pi q}+\frac{1-e^{-2a\pi q}}{1-e^{-(2k-1)\pi q-2\pi qz}}\bigg) \end{align}Expanding the product will produce a constant (w.r.t. $$z$$) and terms with denominators $$(1-e^{-(2k-1)\pi q+2\pi qz})(1-e^{-(2n-1)\pi q-2\pi qz})$$, and using partial fraction decomposition,\begin{align}\frac1{(1-e^{-(2k-1)\pi q+2\pi qz})(1-e^{-(2n-1)\pi q-2\pi qz})}&=\frac{e^{(2n-1)\pi q+2\pi qz}}{(1-e^{-(2k-1)\pi q+2\pi qz})(e^{(2n-1)\pi q+2\pi qz}-1)}\\[4ex] &=\frac1{1-e^{-(2k-1)\pi q+2\pi qz}}+\frac1{(1-e^{-(2k-1)\pi q+2\pi qz})(e^{(2n-1)\pi q+2\pi qz}-1)}\\[3ex] &=\frac1{1-e^{-(2k-1)\pi q+2\pi qz}}\\ &\quad+\frac1{e^{-(2n-1)\pi q}-e^{(2k-1)\pi q}}\bigg(\frac{e^{-(2n-1)\pi q}}{1-e^{-(2k-1)\pi q+2\pi qz}}-\frac{e^{(2k-1)\pi q}}{1-e^{(2n-1)\pi q+2\pi qz}}\bigg)\\[2ex] &\cong A+\frac B{1-e^{-(2k-1)\pi q+2\pi qz}}+\frac C{1-e^{-(2n-1)\pi q-2\pi qz}}; \end{align}thus the quotient function can be written as \begin{align}&e^{-2a\pi qz-a^2\pi q}\Bigg[D(a,q)+\sum_{k\ge1}\bigg(\frac{E_k}{1-e^{-(2k-1)\pi q+2\pi qz}}+\frac{F_k}{1-e^{-(2k-1)\pi q-2\pi qz}}\bigg)\Bigg]\\ &=e^{-2a\pi qz-a^2\pi q}\Bigg[D(a,q)+\sum_{k\ge1}\bigg(E_k+\frac{E_k}{e^{(2k-1)\pi q-2\pi qz}-1}+F_k+\frac{F_k}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\Bigg]\\ &=e^{-2a\pi qz-a^2\pi q}\Bigg[D_1(a,q)+\sum_{k\ge1}\bigg(\frac{E_k}{e^{(2k-1)\pi q-2\pi qz}-1}+\frac{F_k}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\Bigg]. \end{align}Now I need to consult a functional identity for $$\phi(z,q)$$:$$\phi(z+1,q)=-\phi(z,q)$$(it can be derived from $$\phi$$'s series definition).
So \begin{align}\frac{\phi(z+1+a,q)}{\phi(z+1,q)}&=e^{-2a\pi q(z+1)-a^2\pi q}\Bigg[D_1(a,q)+\sum_{k\ge1}\bigg(\frac{E_k}{e^{(2k-1)\pi q-2\pi q(z+1)}-1}+\frac{F_k}{e^{(2k-1)\pi q+2\pi q(z+1)}-1}\bigg)\Bigg]\\[2ex] &=e^{-2a\pi qz-a^2\pi q-2a\pi q}\Bigg[D_1(a,q)+\sum_{k\ge1}\bigg(\frac{E_k}{e^{(2k-3)\pi q-2\pi qz}-1}+\frac{F_k}{e^{(2k+1)\pi q+2\pi qz}-1}\bigg)\Bigg]\\[2ex] &=e^{-2a\pi qz-a^2\pi q-2a\pi q}\Bigg[D_1(a,q)+\frac{E_1}{e^{-\pi q-2\pi qz}-1}+\frac{E_2}{e^{\pi q-2\pi qz}-1}\\ &\quad+\sum_{k\ge3}\bigg(\frac{E_k}{e^{(2k-3)\pi q-2\pi qz}-1}+\frac{F_{k-1}}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\Bigg]\\[2ex] &=e^{-2a\pi qz-a^2\pi q-2a\pi q}\Bigg[D_1(a,q)-\frac{E_1}{e^{\pi q+2\pi qz}-1}-E_1+\frac{E_2}{e^{\pi q-2\pi qz}-1}\\ &\quad+\sum_{k\ge2}\bigg(\frac{E_{k+1}}{e^{(2k-1)\pi q-2\pi qz}-1}+\frac{F_{k-1}}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\Bigg] \end{align} and since $$\frac{\phi(z+1+a,q)}{\phi(z+1,q)}=\frac{\phi(z+a,q)}{\phi(z,q)}$$, you can equate terms with like denominators:$$D_1(a,q)=e^{-2a\pi q}(D_1(a,q)-E_1)$$ $$E_1=e^{-2a\pi q}E_2$$ $$F_1=-e^{-2a\pi q}E_1$$ $$E_{k\ge2}=e^{-2a\pi q}E_{k+1}$$ $$F_{k\ge2}=e^{-2a\pi q}F_{k-1}$$ So now\begin{align}e^{a^2\pi q+2a\pi qz}\frac{\phi(z+a,q)}{\phi(z,q)}&=\frac{E_1}{1-e^{2a\pi q}}+\sum_{k\ge1}\bigg(\frac{e^{(2k-2)a\pi q}E_1}{e^{(2k-1)\pi q-2\pi qz}-1}+\frac{e^{-(2k-2)a\pi q}\cdot-e^{-2a\pi q}E_1}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\\ &=\frac{E_1}{1-e^{2a\pi q}}+E_1\sum_{k\ge1}\bigg(\frac{e^{(2k-2)a\pi q}}{e^{(2k-1)\pi q-2\pi qz}-1}-\frac{e^{-2ak\pi q}}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg) \end{align}and $$E_1$$ requires only the calculation of one residue: \begin{align}\lim_{z\to1/2}e^{a^2\pi q+2a\pi qz}(e^{\pi q-2\pi qz}-1)\frac{\phi(z+a,q)}{\phi(z,q)}&=e^{a^2\pi q+a\pi q}\cdot-\varphi(a,q)\frac{-2\pi qe^{\pi q-\pi q}}{\phi'(1/2,q)}\\ &=-2\pi qe^{a^2\pi q+a\pi q}\frac{\varphi(a,q)}{\varphi'(0,q)} \end{align}After some minor simplifications, we have$$e^{2a\pi qz}\frac{\phi(z+a,q)}{\phi(z,q)}=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\Bigg[\operatorname{csch}a\pi q-2\sum_{k\ge1}\bigg(\frac{e^{(2k-1)a\pi q}}{e^{(2k-1)\pi q-2\pi qz}-1}-\frac{e^{(1-2k)a\pi q}}{e^{(2k-1)\pi q+2\pi qz}-1}\bigg)\Bigg]$$ Now I'm going to write the summand as geometric series: I get$$e^{(2k-1)a\pi q}\sum_{n\ge1}e^{-(2k-1)n\pi q+2n\pi qz}-e^{-(2k-1)a\pi q}\sum_{n\ge1}e^{-(2k-1)n\pi q-2n\pi qz}$$Then I swap the indices and sum over $$k$$:\begin{align}e^{2a\pi qz}\frac{\phi(z+a,q)}{\phi(z,q)}&=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\Bigg[\operatorname{csch}a\pi q\\ &\quad-2\sum_{n\ge1}\bigg(e^{(-a+n)\pi q+2n\pi qz}\frac{e^{2\pi q(a-n)}}{1-e^{2\pi q(a-n)}}-e^{(a+n)\pi q-2n\pi qz}\frac{e^{2\pi q(-a-n)}}{1-e^{2\pi q(-a-n)}}\bigg)\Bigg]\\[3ex] &=\frac{\pi q\varphi(a,q)}{\varphi'(0,q)}\Bigg[\operatorname{csch}a\pi q+\sum_{n\ge1}\bigg(\frac{e^{2n\pi qz}}{\sinh \pi q(a-n)}+\frac{e^{-2n\pi qz}}{\sinh\pi q(a+n)}\bigg)\Bigg]\tag{\square} \end{align}