# Evaluation of definite integrals with exponential integrand in Fourier sine transform

I was going through a question on finding the Fourier sine transform of the following function: $$\frac{e^{ax}+e^{-ax}}{e^{\pi x}-e^{-\pi x}}.$$

Attempt:

So I got stuck with the following integral: $$\int_{0}^\infty \frac{e^{(a+ip)x}-e^{-(a+ip)x}dx}{e^{\pi x}-e^{-\pi x}} = \frac{1}{2} \tan {\frac{a+ip}{2}}$$

The second one which i guess must be quite similar to the former that I encountered in another similar question is:

$$\int_{0}^\infty \frac{e^{(a+ip)x}+e^{-(a+ip)x}dx}{e^{\pi x}-e^{-\pi x}} = \frac{1}{2} \sec {\frac{a+ip}{2}}$$

I am not able to understand how to proceed with these two. Any help would be appreciated.

• Regarding the Fourier transform, see here. – Maxim Apr 1 at 17:37

Note that we can write for $$|a|<\pi$$
\begin{align} \int_0^\infty \frac{e^{(a+ip)x}-e^{-(a+ip)x}}{\left(e^{\pi x}-e^{-\pi x}\right)}\,dx&=\int_0^\infty \frac{e^{-\pi x}\left(e^{(a+ip)x}-e^{-(a+ip)x}\right)}{1-e^{-2\pi x}}\,dx\\\\ &=\sum_{n=0}^\infty \int_0^\infty e^{-(2n+1)\pi x}\left(e^{(a+ip)x}-e^{-(a+ip)x}\right)\\\\ &=\sum_{n=0}^\infty\left(\frac{1}{(2n+1)\pi -(a+ip)}-\frac{1}{(2n+1)\pi +(a+ip)}\right)\\\\ &=-\frac12\sum_{n=-\infty}^\infty \frac{1}{\frac{a+ip}{2}+\frac\pi2+n\pi}\tag1\\\\ &=\frac12\tan\left(\frac{a+ip}{2}\right)\tag2 \end{align}
where in going from $$(1)$$ to $$(2)$$ we noted that right-hand side of $$(1)$$ was the partial fraction representation of $$-\cot\left(\frac{a+ip}{2}+\frac\pi2\right)=\tan\left(\frac{a+ip}{2}\right)$$ (See THIS ANSWER and the Appendix of THIS ONE).