Evaluating $\int^\infty_0 \frac{\tanh(x)}{x\cosh(2x)}dx$ I am trying to evaluate $\int^\infty_0 \frac{\tanh(x)}{x\cosh(2x)}dx$ by Feynman's technique.
Let $I(b)=\int^\infty_0\frac{\tanh(bx)}{x\cosh(2x)}dx$, then $I'(b)=\int^\infty_0 sech^2(bx)sech(2x)dx$. However, I am unable to find out the integral in terms of b. Or should I use another approach? Thanks for help.
 A: We can consider a bit more general case. Let's denote
$$J(a)=\frac{1}{2}\int_{-\infty}^\infty\frac{x}{a^2+x^2}\,\frac{\tanh\pi x}{\cosh 2\pi x}dx$$
then
$$J(a)=\frac{1}{2}\Im\frac{\partial }{\partial a}\int_{-\infty}^\infty\ln(a-ix)\,\frac{\tanh\pi x}{\cosh 2\pi x}dx=\frac{1}{2}\Im\frac{\partial }{\partial a}I(a);\,a\geqslant0\tag{1}$$
and the desired integral $$J_0=\frac{1}{2}\int_{-\infty}^\infty\frac{\tanh\pi x}{x\cosh 2\pi x}dx=J(0)\tag{2}$$
Using $\,\ln(a-ix)=\ln\Gamma(a-i(x+i))-\ln\Gamma(a-ix)$ and the property $\,\displaystyle\frac{\tanh\pi (x+i)}{\cosh 2\pi (x+i)}=\frac{\tanh\pi x}{\cosh 2\pi x}\,$, we can present  the integral $\,I(a)\,$ as the integral along a rectangular contour in the complex plane $\,(-R\to R\to R+i\to-R+i\to -R )$
$$I(a)=\int_{-\infty}^\infty\ln(a-ix)\,\frac{\tanh\pi x}{\cosh 2\pi x}dx=-\oint\ln\Gamma(a-iz)\frac{\tanh\pi z}{\cosh 2\pi z}dz$$
Therefore, as we have three simple poles inside the contour,
$$I(a)=-2\pi i \underset{z=\frac{i}{4}, \frac{3i}{4}, \frac{i}{2}}{\operatorname{Res}}\ln\Gamma(a-iz)\frac{\tanh\pi z}{\cosh 2\pi z}$$
The residue evaluation is straightforward and gives
$$I(a)=-i\bigg(\ln\Gamma\Big(a+\frac{1}{4}\Big)+\ln\Gamma\Big(a+\frac{3}{4}\Big)-2\ln\Gamma\Big(a+\frac{1}{2}\Big)\bigg)$$
Using (1),
$$\boxed{\,\,J(a)=\frac{1}{2}\int_{-\infty}^\infty\frac{x}{a^2+x^2}\,\frac{\tanh\pi x}{\cosh 2\pi x}dx=\psi\Big(a+\frac{1}{2}\Big)-\frac{1}{2}\psi\Big(a+\frac{1}{4}\Big)-\frac{1}{2}\psi\Big(a+\frac{3}{4}\Big)\,\,}$$
and the initial integral
$$J_0=J(0)=\psi\Big(\frac{1}{2}\Big)-\frac{1}{2}\psi\Big(\frac{1}{4}\Big)-\frac{1}{2}\psi\Big(\frac{3}{4}\Big)=\ln 2$$
A: If we observe that the given integral is a Frullani integral we get an alternative to Feynman's technique. See
https://en.wikipedia.org/wiki/Frullani_integral
Put
\begin{equation*}
 f(x)=\dfrac{2}{e^{x}+1}.
\end{equation*}
Then
\begin{gather*}
\int_{0}^{\infty}\dfrac{\tanh(x)}{x\cosh(2x)}\,\mathrm{d}x = \int_{0}^{\infty}\dfrac{2(e^{2x}-1)e^{2x}}{x(e^{2x}+1)(e^{4x}+1)} \,\mathrm{d}x = \\[2ex]
\int_{0}^{\infty}\dfrac{1}{x}\left(\dfrac{2}{e^{2x}+1}-\dfrac{2}{e^{4x}+1}\right)\,\mathrm{d}x = \int_{0}^{\infty}\dfrac{f(2x)-f(4x)}{x}\,\mathrm{d}x = \\[2ex]
\left(f(\infty)-f(0)\right)\ln\frac{2}{4} = \ln(2).
\end{gather*}
A: This integral can be done via Feynman's technique and Digamma function. First, I rewrote the integral as a more convient form.
$$
I=\int_0^{\infty}{\frac{\tanh \left( x \right)}{x\cosh \left( 2x \right)}\mathrm{d}x}=2\int_0^{\infty}{\frac{e^{2x}\left( e^{2x}-1 \right) ^2}{x\left( e^{8x}-1 \right)}\mathrm{d}x}
$$
Then I define $I\left( t \right) $ as follows
$$
I\left( t \right) \stackrel{\mathrm{def}}{=}\int_0^{\infty}{\frac{e^{tx}\left( e^{2x}-1 \right) ^2}{x\left( e^{8x}-1 \right)}\mathrm{d}x}
$$
Where $t\in\left(-\infty, 2\right)$. Then
\begin{align*}
I'\left( t \right) &=\int_0^{\infty}{\frac{\left( e^{2x}-1 \right) ^2e^{-8x}}{1-e^{-8x}}e^{tx}\mathrm{d}x}
\\&
=\int_0^{\infty}{\left( e^{\left( t-4 \right) x}-2e^{\left( t-6 \right) x}+e^{\left( t-8 \right) x} \right) \sum_{n=0}^{\infty}{e^{-8nx}}\mathrm{d}x}
\\&
=\sum_{n=0}^{\infty}{\int_0^{\infty}{e^{-\left( 8n+4-t \right) x}-2e^{-\left( 8n+6-t \right) x}+e^{-\left( 8n+8-t \right) x}\mathrm{d}x}}
\\&
=\sum_{n=0}^{\infty}{\frac{1}{8n+4-t}-\frac{2}{8n+6-t}+\frac{1}{8n+8-t}}
\\&
=\frac{1}{8}\sum_{n=0}^{\infty}{\frac{1}{n+\frac{4-t}{8}}-\frac{2}{n+\frac{6-t}{8}}+\frac{1}{n+\frac{8-t}{8}}}
\\&
=\frac{1}{8}\left[ 2\mathrm{\psi}_0\left( \frac{6-t}{8} \right) -\mathrm{\psi}_0\left( \frac{8-t}{8} \right) -\mathrm{\psi}_0\left( \frac{4-t}{8} \right) \right] 
\end{align*}
Due to the way how Digamma function was defined, we can actually integrate this quite easily. The expression reduces substantially, and we got the answer $\ln(2)$
\begin{align*}
I&=2\int_{-\infty}^2{I'\left( t \right) \mathrm{d}x}
\\&
=\frac{1}{4}\int_{-\infty}^2{\left[ 2\mathrm{\psi}_0\left( \frac{6-t}{8} \right) -\mathrm{\psi}_0\left( \frac{8-t}{8} \right) -\mathrm{\psi}_0\left( \frac{4-t}{8} \right) \right] \mathrm{d}x}
\\&
=\left. 2\ln \left( \frac{\Gamma \left( \frac{8-t}{8} \right) \Gamma \left( \frac{4-t}{8} \right)}{\Gamma \left( \frac{6-t}{8} \right) \Gamma \left( \frac{6-t}{8} \right)} \right) \right|_{-\infty}^{2}=2\ln \left( \csc \left( \frac{\pi}{4} \right) \right) =\ln \left( 2 \right) 
\end{align*}
A: Using
$$ \int_0^1\frac{x^p-x^q}{\ln x}\mathrm{d}x=\ln\bigg(\frac{p+1}{q+1}\bigg) $$
one has
\begin{eqnarray}
I&=&\int_0^{\infty}{\frac{\tanh \left( x \right)}{x\cosh \left( 2x \right)}\mathrm{d}x}=-\int_0^{1}{\frac{2x(1-x^2)}{(1+x^2)(1+x^4)\ln x}\mathrm{d}x}\\
&=&-\int_0^{1}{\frac{2x(1-x^2)^2}{(1-x^8)\ln x}\mathrm{d}x}=-\int_0^{1}{\frac{\sum_{k=0}^\infty2x(1-x^2)^2x^{8k}}{\ln x}\mathrm{d}x}\\
&=&-2\sum_{k=0}^\infty\int_0^{1}{\frac{x^{8k+1}-2x^{8k+3}+x^{8k+5}}{\ln x}\mathrm{d}x}\\
&=&-2\sum_{k=0}^\infty\ln\bigg(\frac{(4k+1)(4k+3)}{(4k+2)^2}\bigg).
\end{eqnarray}
Let
$$ S_n = \prod_{k=0}^n\frac{(4k+1)(4k+3)}{(4k+2)^2}=\frac{\sqrt\pi\Gamma(2n+\frac52)}{4^{n+1}\Gamma^2(n+\frac32)}. $$
Using the Sterling formula
$$ \Gamma(z)\approx \sqrt{\frac{2\pi}{z}}(\frac{z}{e})^z$$
one has
$$ \lim_{n\to\infty} S_n=\lim_{n\to\infty}\frac{\sqrt{\frac{2\pi}{2n+\frac52}}(\frac{2n+\frac52}{e})^{2n+\frac52}}{4^{n+1}\bigg(\sqrt{\frac{2\pi}{n+\frac32}}(\frac{n+\frac32}{e})^{n+\frac32}\bigg)^2}=\frac1{\sqrt2}$$
which imples
$$ I = -2\ln \frac1{\sqrt2}=\ln2. $$
