It would be great if someone can help me do these integrals - using numerical integration on Mathematica it seems that these converge - in what follows $a \in \mathbb{R}$ and $q \in \mathbb{N}$ and $n \in \mathbb{Z}$


* $\int \_0 ^\infty dx\text{ } tanh (\pi \sqrt{x} )[ \frac{1}{x + a^2 + (\frac{n}{q})^2 } - \frac{1}{x + a^2 + n^2 } ] $
* $\int\_0 ^\infty dx \text{ }\frac{tanh(\pi \sqrt{x})}{\sqrt{x + a^2 } } [ coth (\pi q \sqrt{x + a^2 } ) - coth (\pi \sqrt{x + a^2 } ) ] $


I am wondering if there is some complex analysis trick that can help here...



Request for help with two integrals
Here is my attempt at the first one:
\begin{multline\*}
\int\limits\_0^\infty\tanh(\pi\sqrt x)\left(\frac1{x+c^2}-\frac1{x+d^2}\right)dx\\=2\int\limits\_0^\infty y\tanh(\pi y)\left(\frac1{y^2+c^2}-\frac1{y^2+d^2}\right)dy\\=\frac2\pi\int\limits\_0^\infty\sum\_{k\in\mathbb Z}\frac{y^2}{y^2+(k+\frac12)^2}\left(\frac1{y^2+c^2}-\frac1{y^2+d^2}\right)dy\\=\frac2\pi\int\limits\_0^\infty\sum\_{k\in\mathbb Z}\frac{(d^2-c^2)y^2}{(y^2+(k+\frac12)^2)(y^2+c^2)(y^2+d^2)}dy\\=\frac{2(d^2-c^2)}\pi\sum\_{k\in\mathbb Z}\int\limits\_0^\infty\frac{y^2}{(y^2+(k+\frac12)^2)(y^2+c^2)(y^2+d^2)}dy\\=(|d|-|c|)\sum\_{k\in\mathbb Z}\frac1{(|k+\frac12|+|c|)(|k+\frac12|+|d|)}\\=\sum\_{k\in\mathbb Z}\left(\frac1{|k+\frac12|+|c|}-\frac1{|k+\frac12|+|d|}\right)\\=2(\psi(|d|+\frac12)-\psi(|c|+\frac12))
\end{multline\*}
I believe the second integral can be treated similarly by expanding $\coth$ into elementary fractions too.


Just don't ask me whether all this was legitimate :)


