Integration of $\int_0^{\infty}\frac{e^{(\lambda +is)t}-e^{-(\lambda +is)t}}{e^{\pi t}-e^{-\pi t}}dt$ Integration of $$\int_0^{\infty}\frac{e^{(\lambda +is)t}-e^{-(\lambda +is)t}}{e^{\pi t}-e^{-\pi t}}dt$$
I am thinking about this integral from last half and hour but still can't figure it out how to solve this. what i was think is to make this in form
$$\int_{0}^{\infty}\frac{\sinh(\lambda+is)t}{\sinh (\pi t)} dt$$ but still this will get me nowhere. please just give me a hint how to proceed this.
Thank you.
 A: An amusing way get the answer: first extend the integration range to $-\infty, \infty$. The integrand is even in $t$, so we get a $1/2$ factor up front. I'm taking $a=\lambda+is$.
$$ I(a)=\frac{1}{2}\int_{-\infty}^{\infty} dt \ \frac{e^{at}-e^{-at}}{e^{\pi t}-e^{-\pi t}}$$
The integrand has poles at $t=in$, $n \in Z $. The pole at $t=0$ is a removable singularity. An anticlockwise contour$^\dagger$ in the complex $t$ plane will enclose all the residues for $n=1,2,3,..$, which are in the upper half plane. Courtesy of the residue theorem, we have
$$ I(a)= \sum_{n=1}^{\infty}R_n $$
$$ R_n = 2\pi i \lim_{t \rightarrow  in} (t-in) \frac{1}{2} \frac{e^{at}-e^{-at}}{e^{\pi t}-e^{-\pi t}} $$
$$ R_n =-(-1)^n \sin{(na)} $$
The sum for $I(a)$ may be performed by writing $\sin$ in exponential form and doing the two geometric sums$^\ddagger$.
$$ R_n=-\frac{1}{2i}\left[ (-e^{ia})^n- (-e^{-ia})^n \right]$$
For which we get
$$ I(a)= -\frac{1}{2i} \left[ \frac{-e^{ia}}{1+e^{ia}} - \frac{-e^{-ia}}{1+e^{-ia}} \right]$$
After simplification, this yields
$$ I(a)= \frac{1}{2} \tan \left( \frac{a}{2} \right)$$
$$\tag*{$\blacksquare$}$$
Clearly, this converges for $-\pi <a<\pi$ due to the nearest singularities in $\tan$ at $\pm \pi/2$.
$\dagger$ Along the real axis then closed in the upper plane.
$\ddagger$ As mentioned in the comments, these individual sums are divergent. Don't worry! Either we can sum $-(-1)^n \sin(na)$ directly, or regularize the individual sums. For instance, using Euler summation
$$ E_1(x)= - \sum_{n=1}^{\infty} x^n (-e^{ia})^n=\frac{xe^{ia}}{1+xe^{ia}}$$
$$ E_2(x)= - \sum_{n=1}^{\infty} x^n (-e^{-ia})^n=\frac{x}{x+e^{ia}}$$
Which converge for $x$ sufficiently small. We then have
$$I(a)= \lim_{x \rightarrow1} (E_1(x)-E_2(x))$$
Which leads to the same answer.
A: By 3.511.2 in Gradshteyn and Ryzhik,
$$
\int_0^{ + \infty } {\frac{{\sinh (zt)}}{{\sinh (\pi t)}}dt}  = \frac{1}{2}\tan \left( {\frac{z}{2}} \right)
$$
provided $\left| z \right| < \pi$. Take $z=\lambda+is$.
A: Considering $\displaystyle \mathcal{I}(\alpha, \beta) = \int_{0}^{\infty} \frac{\sinh\alpha z}{\sinh \beta z}\,\mathrm{d}z$, we show that $\displaystyle \mathcal{I}(\alpha, \beta) = \frac{\pi}{2\beta} \tan\left(\frac{\alpha \pi}{2\beta}\right)$.
Then your integral is $\displaystyle \mathcal I(\lambda+is, \pi)$. Starting with   $z \mapsto \frac{1}{\beta} \log(z)$, we have:
\begin{aligned} \displaystyle \mathcal{I}(\alpha, \beta) & = \frac{1}{\beta} \int_0^1 \frac{z^{\frac{\alpha}{\beta}} -z^{-\frac{\alpha}{\beta}}}{z^2-1}\;{dz} \\& = \frac{1}{\beta} \int_0^{1} \left( z^{-\frac{\alpha}{\beta}}-z^{\frac{\alpha}{\beta}}\right) \sum_{k \ge 0}z^{2k} \;{dz}\\& = \frac{1}{\beta} \sum_{k \ge 0}\int_0^1 z^{-\frac{\alpha}{\beta}+2k} -z^{\frac{\alpha}{\beta}+2k}\;{dz} \\& = \frac{1}{\beta} \sum_{k \ge 0} \frac{1}{1-\frac{\alpha}{\beta}+2k}-\frac{1}{1+\frac{\alpha}{\beta}+2k} \\& = \frac{1}{\beta} \sum_{k \ge 0} \frac{2\alpha /\beta }{(1+2 k)^2-(\alpha/\beta)^2}  \\& = \frac{1}{2\beta} \sum_{k ~ \text{odd} } \frac{4\alpha/\beta}{k^2-(\alpha/\beta)^2} \end{aligned}
Consider the series $\displaystyle \displaystyle \pi\cot(\pi z) = \frac{1}{z}+ \sum_{n \ge 1} \frac{2z}{z^2-n^2} $. Map $\displaystyle z \mapsto \frac{z}{2} $ and divide by two then we have:
$\displaystyle \displaystyle \frac{\pi}{2}\cot\left(\frac{\pi}{2} z\right) = \frac{1}{z}+\frac{1}{2}\sum_{n \ge 1} \frac{z}{(z/2)^2-n^2} $$\displaystyle \displaystyle =  \frac{1}{z}+ \frac{1}{2}\sum_{n \ge 1} \frac{4z}{z^2-(2n)^2} = \frac{1}{z}+\frac{1}{2}\sum_{n ~ \text{even}} \frac{4z}{z^2-n^2}$
Thus $\displaystyle \displaystyle \frac{1}{z}+\sum_{n \ge 1} \frac{2z}{z^2-n^2} -\frac{1}{z}-\frac{1}{2} \sum_{n ~ \text{even}} \frac{4z}{z^2-n^2}$ $\displaystyle \displaystyle  =\pi\cot(\pi z)-\frac{\pi}{2}\cot\left(\frac{\pi}{2} z\right) = -\frac{\pi}{2} \tan\left(\frac{z\pi}{2}\right)$
Hence  $\displaystyle \displaystyle \frac{1}{2} \sum_{n \textrm{ odd}} \frac{4z}{z^2-n^2} = -\frac{\pi}{2}\tan\left(\frac{\pi z}{2}\right)$ and so $\displaystyle  \displaystyle  \mathcal I(\alpha, \beta)=\frac{1}{2\beta} \sum_{k ~ \text{odd} } \frac{4\alpha/\beta}{(\alpha/\beta)^2-k^2} = \frac{\pi}{2\beta} \tan\left(\frac{\alpha \pi}{2\beta}\right).$
