Evaluate the following integral involving hyperbolic functions

78 Views Asked by At

The following is an integral from MIT integration bee 2023: $$\int_0^{\infty} \frac{\tanh(x)}{x\cosh(2x)} dx.$$ I tried substituting $u=\cosh(x)$, but that just made the integral even more complicated. Does one need to use tools from complex analysis?

2

There are 2 best solutions below

0
On

Its easier, as such a problem should be. Extend the contour to $(-\infty,\infty)$ over all of the real axis and make it a closed contour by a shift $a$ of the real line in the imaginary direction, until $\cosh(x + i a) $ changes sign.

Then its value is 4* the residue at the encircled pole

      ComplexPlot3D[ 1/x Sinh[ x]/(Cosh[x] Cosh[2 x]), 
            {x, -18 - 3 I, 18 + 3 I},  PlotRange -> {0, 12}]

enter image description here

0
On

As this is the task from a competition, there should be a concise solution. If we do not know a shortcut, we can use complex integration to get the answer.

Let's consider a bit more general integral ($a\geqslant0$) $$I(a)=\frac12\int_{-\infty}^\infty\frac x{x^2+a^2}\,\frac{\tanh \pi x}{\cosh 2\pi x}dx$$ then the initial integral $$I_0=\int_0^\infty\frac{\tanh x}{x\,\cosh 2 x}dx=\int_0^\infty\frac{\tanh \pi x}{x\,\cosh 2\pi x}dx=I(a=0)$$ We can present $I(a)$ in the form $$I(a)=\frac12\Im\,\frac{\partial}{\partial a}\int_{-\infty}^\infty\ln(a-ix)\frac{\tanh \pi x}{\cosh 2\pi x}dx$$ Considering the rectangular contour in the complex plane $-R\to R\to R+i\to-R+i\to-R\,(R\to\infty)$, and using the fact that $\,\frac{\tanh \pi (x+i)}{\cosh 2\pi (x+i)}=\frac{\tanh \pi x}{\cosh 2\pi x}\,$, and that $\,\ln(a-ix)=\ln\Gamma(a-i(x+i))-\ln\Gamma(a-ix)$, we can present $I(a)$ as the integral along this rectangular contour: $$I(a)=-\frac12\Im\,\frac{\partial}{\partial a}\oint \ln\Gamma(a-iz)\frac{\tanh \pi z}{\cosh 2\pi z} dz=-\frac12\Im\,\left(2\pi i \sum \operatorname{Res}\frac{\ln\Gamma(a-iz)\tanh \pi z}{\cosh 2\pi z}\right)$$ There are three simple poles inside the contour (at $z=\frac i4,\, \frac i2,\,\frac{3i}4$). Evaluating residues, $$I(a)=-\frac12\,\frac{\partial}{\partial a} \left(\ln\Gamma\big(a+\frac14\big)+\ln\Gamma\big(a+\frac34\big)-2\ln\Gamma\big(a+\frac12\big)\right)$$ $$=\frac12\left(2\psi\big(a+\frac12\big)-\psi\big(a+\frac14\big)-\psi\big(a+\frac34\big)\right)$$ Taking the derivatives of logarithm of both sides of the gamma-function duplication formula $\,\,\Gamma(z)\Gamma\big(z+\frac12\big)=2^{1-2z}\sqrt\pi\,\Gamma(2z)$ $$\psi(z)+\psi\big(z+\frac12\big)=-2\ln2+2\psi(2z)$$ Taking $z=a+\frac14$ $$\boxed{\,\,I(a)=\psi\Big(a+\frac12\Big)-\psi\Big(2a+\frac12\Big)+\ln 2\,\,}$$ Choosing a special value ($a=0$), we do get $\ln2$ as a result.