Find : $\int_0^{\infty}\frac{\cos (2ax)}{x}\tanh (2πx)dx$ I'm try to Find :
$$\int_0^{\infty}\frac{\cos (2ax)}{x}\tanh (2πx)dx$$
I don't have any idea to compute this type of integration 
Thanks!
 A: Call your integral $f(a)$. We wish to prove it's $\ln\coth\frac{a}{4}$, or equivalently that $f^\prime(a)=-\frac12\operatorname{csch}\frac{a}{2},\,f(\infty)=0$. The second part comes down to verifying$$\lim_{a\to\infty}\int_0^\infty\frac{\cos 2y\tanh\frac{2\pi y}{a}dy}{y}=0,$$so let's focus on the first part. Note that $$\frac{1-y}{1+y}=1-\frac{2y}{1+y}=1+2\sum_{n\ge 1}(-1)^ny^n$$and$$\tanh 2\pi x=\frac{1-\exp-4\pi x}{1+\exp-4\pi x}=1+2\sum_{n\ge 1}(-1)^n\exp-4n\pi x$$so$$f^\prime(a)=-2\lim_{\epsilon\to0^+}\int_0^\infty \sin 2ax\exp -\epsilon xdx-4\sum_{n\ge 1}(-1)^n\int_0^\infty\sin 2ax\exp -4n\pi xdx.$$But for $b>0$,$$\int_0^\infty\sin 2ax\exp -bxdx=\Im\int_0^\infty\exp-(b-2ia)xdx=\Im\frac{1}{b-2ia}=\frac{2a}{4a^2+b^2},$$so$$f^\prime(a)=-\frac{1}{a}-2a\sum_{n\ge 1}\frac{(-1)^n}{a^2+4n^2\pi^2}=-\frac{\coth\frac{a}{4}-\tanh\frac{a}{4}}{4}$$(using @user90369's observation that $\sum_{n\ge 0}\frac{(-1)^n}{z^2+n^2}=\frac{1}{2z^2}+\frac{\pi}{4z}\left(\coth\frac{\pi z}{2}-\tanh\frac{\pi z}{2}\right)$). Double-argument formulae reduce this to the required $f^\prime(a)=-\frac12\operatorname{csch}\frac{a}{2}$.
A: As shown in this answer
$$
\frac\pi2\tanh\left(\frac\pi2x\right)=\sum_{\substack{k\in\mathbb{Z}\\k\text{ odd}}}\frac1{x-ik}\tag1
$$
Therefore,
$$
\begin{align}
\int_0^\infty\frac{\cos(2ax)}{x}\tanh(2\pi x)\,\mathrm{d}x
&=\frac12\int_{-\infty}^\infty\cos(2ax)\tanh(2\pi x)\,\frac{\mathrm{d}x}{x}\tag2\\
&=\frac12\int_{-\infty}^\infty\cos\left(\frac a2x\right)\tanh\left(\frac\pi2x\right)\,\frac{\mathrm{d}x}x\tag3\\
&=\frac12\int_{-\infty}^\infty\exp\left(\frac a2xi\right)\tanh\left(\frac\pi2x\right)\,\frac{\mathrm{d}x}x\tag4\\
&=2\sum_{k=0}^\infty\frac{\exp\left(-(2k+1)\frac a2\right)}{2k+1}\tag5\\
&=\log\left(\frac{1+e^{-a/2}}{1-e^{-a/2}}\right)\tag6\\[9pt]
&=\log(\coth(a/4))\tag7
\end{align}
$$
Explanation:
$(2)$: the integrand is even
$(3)$: substitute $x\mapsto\frac x4$
$(4)$: $\sin(x)$ is odd
$(5)$: residues from a contour circling the upper half plane
$(6)$: $\log\left(\frac{1+x}{1-x}\right)=2\sum\limits_{k=0}^\infty\frac{x^{2k+1}}{2k+1}$
$(7)$: multiply numerator and denominator by $e^{a/4}$

Residue Computation
The contours we will use will be rectangles with the real axis on the bottom and a line $y=N\pi i$ on the top and sides of $|x|=N$. The integral on all edges of the rectangle vanish, except on the real axis.
Equation $(1)$ shows that $\tanh\left(\frac\pi2x\right)$ has a residue of $\frac2\pi$ at $(2k+1)i$ for $k\in\mathbb{Z}$. At these points,
$$
\frac{\exp\left(\frac a2xi\right)}x=\frac{\exp\left(-(2k+1)\frac a2\right)}{(2k+1)i}\tag8
$$
therefore, $2\pi i$ times the residue is
$$
2\pi i\frac2\pi\frac{\exp\left(-(2k+1)\frac a2\right)}{(2k+1)i}
=4\frac{\exp\left(-(2k+1)\frac a2\right)}{2k+1}\tag9
$$
Thus, half of $2\pi i$ times the sum of the residues inside the contour gives
$$
\frac12\int_{-\infty}^\infty\exp\left(\frac a2xi\right)\tanh\left(\frac\pi2x\right)\,\frac{\mathrm{d}x}x
=2\sum_{k=0}^\infty\frac{\exp\left(-(2k+1)\frac a2\right)}{2k+1}\tag{10}
$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{\cos\pars{2ax} \over x}
\,\tanh\pars{2\pi x}\,\dd x} =
\Re\int_{0}^{\infty}\expo{2\ic ax}
\,{1 - \expo{-4\pi x} \over 1 + \expo{-4\pi x}}\,{\dd x \over x}
\\[5mm] &\ \stackrel{t\ =\ \exp\pars{-4\pi x}}{=}\,\,\,
\Re\int_{1}^{0}t^{-\ic a/\pars{2\pi}}\,{1 - t \over 1 + t}\,
{-\dd t/\pars{4\pi t} \over -\ln\pars{t}/\pars{4\pi}}
\\[5mm] = &\
\Re\int_{0}^{1}
{t^{-\ic a/\pars{2\pi} - 1} \over 1 + t}
\,{t - 1 \over \ln\pars{t}}\,\dd t =
\Re\int_{0}^{1}
{t^{-\ic a/\pars{2\pi} - 1} \over 1 + t}\
\overbrace{\int_{0}^{1}t^{y}\,\dd y}
^{\ds{t - 1 \over \ln\pars{t}}}\,\ \dd t
\\[5mm] = &\
\Re\int_{0}^{1}\int_{0}^{1}{t^{-\ic a/\pars{2\pi} - 1 + y} \over
1 + t}\,\dd t\,\dd y
\\[5mm] = &\
\Re\int_{0}^{1}\int_{0}^{1}{t^{-\ic a/\pars{2\pi} - 1 + y} -
t^{-\ic a/\pars{2\pi} + y} \over
1 - t^{2}}\,\dd t\,\dd y
\\[5mm] = &\ 
{1 \over 2}\,\Re\int_{0}^{1}\int_{0}^{1}{t^{-\ic a/\pars{4\pi} - 1 + y/2} -
t^{-\ic a/\pars{4\pi} + y/2 - 1/2} \over
1 - t}\,\dd t\,\dd y
\\[5mm] = &\
{1 \over 2}\,\Re\int_{0}^{1}
\bracks{%
\Psi\pars{-\,{a \over 4\pi}\,\ic + {y \over 2} + {1 \over 2}} -
\Psi\pars{-\,{a \over 4\pi}\,\ic + {y \over 2}}}\dd y
\end{align}

where $\ds{\Psi}$ is the
  Digamma Function and I used identity $\mathbf{\color{black}{6.3.22}}$ of A & S Table.

Then,
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{\cos\pars{2ax} \over x}
\,\tanh\pars{2\pi x}\,\dd x}
\\[5mm] = &\
\Re\bracks{%
\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + {y \over 2} + {1 \over 2}}} -
\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + {y \over 2}}}}
_{\ y\ =\ 0}^{\ y\ =\ 1}
\end{align}

$\ds{\Gamma}$ is the Gamma Function.

Moreover,
\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{\infty}{\cos\pars{2ax} \over x}
\,\tanh\pars{2\pi x}\,\dd x}
\\[5mm] = &\
\Re\left[%
\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + 1}} -
\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic +
{1 \over 2}}}\right.
\\[2mm] &\ \left.
\phantom{\,\,}-\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + {1 \over 2}}} +
\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic}}\right]
\\[8mm] = &\
\Re\ln\pars{\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + 1}
\Gamma\pars{{a \over 4\pi}\,\ic}}}
\\[2mm] &\
\!\!\!\!\!
-\Re\ln\pars{\ln\pars{\Gamma\pars{-\,{a \over 4\pi}\,\ic + {1 \over 2}}\Gamma\pars{{a \over 4\pi}\,\ic + {1 \over 2}}}}
\label{1}\tag{1}
\\[8mm] = &\
\Re\ln\pars{\pi \over
\sin\pars{\pi\braces{a\ic/\bracks{4\pi}}}} -
\Re\ln\pars{\pi \over
\sin\pars{\pi\braces{a\ic/\bracks{4\pi} + 1/2}}}
\label{2}\tag{2}
\\[5mm] = &\
-\ln\pars{\sinh\pars{a \over 4}} +
\ln\pars{\cosh\pars{a \over 4}} =
\bbx{\ln\pars{\coth\pars{a \over 4}}}
\end{align}

In \eqref{1} and \eqref{2} I used the Euler Reflection Formula
$\pars{~\mbox{see}\ \mathbf{\color{black}{6.1.17}}\
\mbox{in A & S Table}}$.

