6

I was able to evaluate the definite integral $$I=\int_0^{\infty}\frac{e^x-1}{x(e^{2x}+1)}dx=\log\Gamma\left(\frac{1}{4}\right)-\log\Gamma\left(\frac{3}{4}\right)-\log\Gamma\left(\frac{1}{2}\right)$$ by using the Malmsten's formula $$\log(\Gamma(z))=\int_0^{\infty}\left(\frac{e^{-zt}-e^{-t}}{1-e^{-t}}-(z-1)e^{-t}\right)\frac{dt}{t}$$ going backwards from the answer: $$\log(\Gamma(\frac{1}{4}))=\int_0^{\infty}\left(\frac{e^{-\frac{1}{4}t}-e^{-t}}{1-e^{-t}}-\frac{3}{4}e^{-t}\right)\frac{dt}{t}$$ $$-\log(\Gamma(\frac{3}{4}))=\int_0^{\infty}\left(\frac{-e^{-\frac{3}{4}t}+e^{-t}}{1-e^{-t}}+\frac{1}{4}e^{-t}\right)\frac{dt}{t}$$ $$-\log(\Gamma(\frac{1}{2}))=\int_0^{\infty}\left(\frac{-e^{-\frac{1}{2}t}+e^{-t}}{1-e^{-t}}+\frac{1}{2}e^{-t}\right)\frac{dt}{t}$$ By adding, $$I=\int_0^{\infty}\frac{e^{-\frac{1}{4}t}-e^{-\frac{3}{4}t}-e^{-\frac{1}{2}t}+e^{-t}}{1-e^{-t}}\frac{dt}{t}$$ and with $t=4x$, $$I=\int_0^{\infty}\frac{e^{3x}-e^{x}-e^{2x}+1}{e^{4x}-1}\frac{dx}{x}=\int_0^{\infty}\frac{(e^{2x}-1)(e^{x}-1)}{(e^{2x}-1)(e^{2x}+1)}\frac{dx}{x}=\int_0^{\infty}\frac{e^x-1}{x(e^{2x}+1)}dx.$$ I just learned this formula today. I wonder if it's possible to evaluate this integral without using this formula. Also, if I didn't know the answer I couldn't evaluate this integral!

Any idea or methods are wellcome. Thanks in advance.

Frank W
  • 5,897
Bob Dobbs
  • 10,988

3 Answers3

5

$$\frac{e^x-1}{x(e^{2x}+1)}=\frac{1}{2x\cosh x}-\frac{1}{2x}(1-\tanh x)=\frac{1}{2x}\big(\frac{1}{\cosh x}+\tanh x-1\big)$$ Therefore, integrating by part, $$I=\int_0^\infty\frac{e^x-1}{x(e^{2x}+1)}dx$$ $$=\frac{\ln x}{2}\big(\frac{1}{\cosh x}+\tanh x-1\big)\bigg|_0^\infty+\frac{1}{2}\int_0^\infty\frac{\ln x\,\sinh x}{\cosh ^2x}dx-\frac{1}{2}\int_0^\infty\frac{\ln x}{\cosh ^2x}dx$$ $$=\frac{1}{2}\int_0^\infty\frac{\ln x\,\sinh x}{\cosh ^2x}dx-\frac{1}{2}\int_0^\infty\frac{\ln x}{\cosh ^2x}dx=I_1+I_2\tag{1}$$ Adding and extracting an additional term and integrating by part the first term

$\displaystyle 2I_1=\int_0^\infty\ln x\Big(\frac{\sinh x}{\cosh^2 x}-e^{-x}\Big)dx+\int_0^\infty\ln x\,e^{-x}dx\tag*{}$

$\displaystyle =-\gamma+\int_0^\infty\Big(\frac{1}{\cosh x}-e^{-x}\Big)\frac{dx}{x}=-\gamma+\int_0^\infty e^{-x}\tanh x\frac{dx}{x}\tag*{}$

Making the substitution $e^{-2x}=t$ $\displaystyle 2I_1=-\gamma+\int_0^1\frac{t^{-\frac{1}{2}}}{\ln t}\,\frac{t-1}{t+1}dt=-\gamma+J\Big(-\frac{1}{2}\Big)\tag*{}$ where we defined $\displaystyle J(a)=\int_0^1\frac{t^a}{\ln t}\,\frac{t-1}{t+1}dt=\ln(1+a)+2\ln\frac{\Gamma(1+a)}{\Gamma^2(1+a/2)}-(2\ln2)a+\ln\frac{\pi}{2},\,\,a>-1\,\,\tag*{}$

The evaluation of this integral is in the Addendum below. Letting $a=-\frac{1}{2}$

$\displaystyle J\Big(-\frac{1}{2}\Big)=2\ln\pi-\ln2-4\ln\Gamma\Big(\frac{3}{4}\Big)\tag*{}$ and

$\displaystyle I_1=-\frac{\gamma}{2}+\ln\pi-\frac{\ln2}{2}-2\ln\Gamma\Big(\frac{3}{4}\Big)\tag{2}$

Now we are evaluating $I_2$: $\displaystyle I_2=-\frac{1}{2}\int_0^\infty\frac{\ln x}{\cosh^2x}dx\tag*{}=-\frac{\pi}{4}\int_{-\infty}^\infty\frac{\ln(\pi x)}{\cosh^2(\pi x)}dx$

$\displaystyle I_2=-\frac{\ln \pi}{4}\int_{-\infty}^\infty\frac{d x}{\cosh^2x}-\frac{\pi}{4}\int_{-\infty}^\infty\frac{\ln x}{\cosh^2(\pi x)}dx=I_{2A}+I_{2B}\tag{3}$

$$I_{2A}=-\frac{\ln \pi}{4}\int_{-\infty}^\infty\frac{d x}{\cosh^2x}=-\frac{\ln \pi}{4}\tanh x\bigg|_{-\infty}^\infty=-\frac{\ln \pi}{2}\tag{4}$$ To evaluate $I_{2B}$ we note that $$I_{2B}=-\frac{\pi}{8}\int_{-\infty}^\infty\frac{\ln (x^2)}{\cosh^2(\pi x)}dx=-\frac{\pi}{4}\Re\int_{-\infty}^\infty\frac{\ln (-ix)}{\cosh^2(\pi x)}dx$$ Using the fact that $$\ln a=\ln\Gamma(x+1)-\ln\Gamma(x)\,\,\text{and that}\,\,\cosh^2(\pi(x+i))=\cosh^2(\pi x)$$ we can present the integral as the integral in the complex plane along the closed rectangular contour: $-R\to R\to R+i\to -R+i\to-R$ (the integrals along the added side paths $R\to R+i$ and $-R+i\to-R$ tend to zero at $R\to\infty$). $$I_{2B}=-\frac{\pi}{4}\Re\int_{-\infty}^\infty\frac{\ln (-ix)}{\cosh^2(\pi x)}dx=\frac{\pi}{4}\Re\int_{-\infty}^\infty\frac{\ln \Gamma(-ix)}{\cosh^2(\pi x)}dx-\frac{\pi}{4}\Re\int_{-\infty}^\infty\frac{\ln \Gamma(-i(x+i))}{\cosh^2(\pi x)}dx$$ $$=\frac{\pi}{4}\Re\oint\frac{\ln \Gamma(-iz)}{\cosh^2(\pi z)}dz=\frac{\pi}{4}\Re \,\bigg(2\pi i\underset{z=i/2}{\operatorname{Res}}\,\frac{\ln \Gamma(-iz)}{\cosh^2(\pi z)}\bigg)$$ (because we have one double pole inside the contour). The residue evaluation is straightforward: $$I_{2B}=-\frac{1}{2}\psi\big(\frac{1}{2}\big)=\frac{\gamma}{2}+\ln 2\tag{5}$$ Putting (4) and (5) into (3), and (3) and (2) into (1), we get: $$I=I_1+I_2=-2\Gamma\Big(\frac{3}{4}\Big)+\frac{\ln 2}{2}+\frac{\ln \pi}{2}\tag{6}$$ Using the Euler' reflection formula $\Gamma\big(\frac{1}{4}\big)\Gamma\big(\frac{3}{4}\big)=\frac{\pi}{\sin\frac{\pi}{4}}=\sqrt2\,\pi$, we get the desired result.


$\bf{Addendum}$

The integrand does not have singularities on the interval; taking the derivative with respect to $a$

$\displaystyle J'(a)=\int_0^1\frac{t^a(t-1)}{(1+t)}dt=\int_0^1 t^adt-2\int_0^1\frac{t^a}{1+t}dt=\frac{1}{1+a}+J_0\tag*{}$ where $\displaystyle J_0=-2\int_0^1(1-t+t^2-t^3+...)t^a\,dt=-2\Big(\frac{1}{1+a}-\frac{1}{2+a}+\frac{1}{3+a}-...\Big)\tag*{}$ $\displaystyle =-2\lim_{N\to\infty}\Big(\sum_{k=1}^N\frac{1}{k+a}-\sum_{k=1}^{N/2}\frac{1}{k+a/2}\Big)\tag*{}$

Given that $\psi(1+a)=-\gamma-\lim_{N\to\infty}\sum_{k=1}^N \Big(\frac{1}{k+a}-\frac{1}{k}\Big)\,;\,\,\psi(x)$ - digamma-function. $\displaystyle J(a)=-2\Big(-\psi(1+a)+\psi(1+a/2)+\lim_{N\to\infty}\sum_{k=N/2+1}^N\frac{1}{k}\Big)=2\Big(\psi(1+a)-\psi(1+a/2)-\ln2\Big)\tag*{}$

Using $\psi(x)=\frac{d}{dx}\ln\Gamma(x)$ and taking the antiderivative $\displaystyle J(a)=\int^aJ'(x)dx+C=\ln(1+a)+2\ln\Gamma(1+a)-4\ln\Gamma(1+a/2)-(2\ln2)a+C\tag*{}$

where $C$ is some constant. To define $C$ we see that at $a\to\infty\,\, I(a)\to0$.

Using the asymptotic $\Gamma(1+a)=\sqrt{2\pi a}\big(\frac{a}{e}\big)^a\,$ at $\,a\to\infty$

$\displaystyle J(a)\sim\ln a-2\ln\sqrt{2\pi}+\ln a-2a\ln a-2a\tag*{}$

$\displaystyle +\ln a+4\ln\sqrt{2\pi}-2\ln (a/2)-2a\ln (a/2)+2a-(2\ln2)a+C\tag*{}$

$\displaystyle J(a\to\infty)\to-2\ln\sqrt{2\pi}+2\ln2+C=\ln\frac{2}{\pi}+\,C=0\tag*{}$ $\displaystyle \,\,\Rightarrow\,\,\boxed{\,\,C=\ln\frac{\pi}{2}\,\,}\tag*{}$ Finally, we get for $J(a)$ $\displaystyle \boxed{\,\,J(a)=\ln(1+a)+2\ln\frac{\Gamma(1+a)}{\Gamma^2(1+a/2)}-(2\ln2)a+\ln\frac{\pi}{2}\,\,}\tag*{}$

Svyatoslav
  • 15,657
4

This is not a full solution, but it is the best I got.

Let $I$ be the original integral. Then

$$ \eqalign{ I &= \int_{0}^{\infty}\frac{e^{x}-1}{x\left(e^{2x}+1\right)}dx \cr &= \int_{0}^{\infty}\frac{\left(e^{x}-1\right)e^{x}}{x\left(e^{2x}+1\right)e^{x}}dx \cr &= \int_{1}^{\infty}\left(\frac{x-1}{x\left(1+x^{2}\right)\ln\left(x\right)}\right)dx \cr &= \int_{1}^{\infty}\int_{0}^{1}\frac{x^{t}}{x\left(1+x^{2}\right)}dtdx \cr &= \int_{1}^{\infty}\int_{0}^{1}\frac{x^{t-1}}{1+x^{2}}dtdx \cr &= \int_{1}^{\infty}\int_{0}^{1}\sum_{n=0}^{\infty}\frac{t^{n}\ln\left(x\right)^{n}}{xn!+x^{3}n!}dtdx \cr &= \sum_{n=0}^{\infty}\frac{1}{n!\left(n+1\right)}\int_{1}^{\infty}\frac{\ln\left(x\right)^{n}}{x+x^{3}}dx \cr &= \frac{1}{2}\sum_{n=0}^{\infty}\left(\frac{2^{n}-1}{4^{n}\left(n+1\right)}\sum_{k=1}^{\infty}\frac{1}{k^{n+1}}\right) \cr &= \frac{1}{2}\sum_{n=0}^{\infty}\sum_{k=1}^{\infty}\frac{2^{n}-1}{4^{n}k^{n+1}\left(n+1\right)} \cr &= \frac{1}{2}\ln{(2\pi)} - 2\ln{\Gamma(3/4)}. } $$

According to WolframAlpha, my steps are correct. However, I am clueless about how to prove $$\int_{1}^{\infty}\frac{\ln^{n}\left(x\right)}{x+x^{3}}dx\ =\ \frac{\left(2^{n}-1\right)n!}{2^{\left(2n+1\right)}}\zeta{(n+1)},$$

and the last equality, too. If someone could fill in the blanks, I would appreciate it.

Accelerator
  • 4,923
  • 1
    The first blank is easy. I even did see it. Let $x=e^{\frac{v}{2}}$, then you get $\frac{1}{2^{n+1}}\int_{0}^{\infty}\frac{v^n}{e^v+1}dv=\frac{\Gamma(n+1)}{2^{n+1}}\eta(n+1)=\frac{n!}{2^{n+1}}(1-2^{-n})\zeta(n+1)=\frac{(2^{n}-1)n!}{2^{2n+1}}\zeta(n+1)$ – Bob Dobbs Sep 20 '22 at 08:17
  • 1
    Second gap is too complicated. I also noticed that your last result is not equal to the value of the integral. – Bob Dobbs Sep 20 '22 at 19:40
  • 1
    My bad, it should be a 2 instead of a 4. – Accelerator Sep 20 '22 at 20:37
  • $n=0$ sums must be separated like https://www.wolframalpha.com/input?i=integral_1%5Einfty+1%2F%28x%2Bx%5E3%29 – Bob Dobbs Sep 21 '22 at 15:23
  • 1
    That formula solves the second gap: $\ln\Gamma(z+1)==-\gamma z+\sum_{n=1}^{\infty}\frac{\zeta(n+1)}{n+1}(-z)^{n+1}dz$ for $|z|<1$... (https://en.wikipedia.org/wiki/Gamma_function) Let $z=-\frac{1}{2}$ and $z=-\frac{1}{4}$ and then take their required linear combination. Plus $\frac{\ln2}{2}$, which is the sum of $n=0$ terms. – Bob Dobbs Sep 21 '22 at 15:37
1

I think this is a more natural solution:

$\begin{align} \int_0^{\infty}\frac{e^x-1}{x(e^{2x}+1)}dx &=\int_0^{\infty}\frac{e^x-1}{x}\frac{e^{-2x}}{1+e^{-2x}}dx \\ &=\int_0^{\infty}\sum_{n=0}^{\infty}\frac{x^n}{(n+1)!}\sum_{k=1}^{\infty}(-1)^{k+1}e^{-2kx}dx\\ &=\sum_{n=0}^{\infty}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{(n+1)!}\int_0^{\infty}x^ne^{-2kx}dx \\ &=\sum_{n=0}^{\infty}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{(n+1)!}\frac{n!}{2^{n+1}k^{n+1}}\\ &=\sum_{n=0}^{\infty}\frac{1}{2^{n+1}(n+1)}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k^{n+1}}\\ &=\frac{\ln2}{2}+\sum_{n=1}^{\infty}\frac{1}{2^{n+1}(n+1)}\eta(n+1)\\ &=\frac{\ln2}{2}+\sum_{n=1}^{\infty}\frac{1}{2^{n+1}(n+1)}(1-2^{-n)}\zeta(n+1)\\ &=\frac{\ln2}{2}+\sum_{n=1}^{\infty}\frac{2^n-1}{2^{2n+1}(n+1)}\sum_{k=1}^{\infty}\frac{1}{k^{n+1}}\\ &=\frac{\ln2}{2}+\frac{1}{2}\sum_{n=1}^{\infty}\sum_{k=1}^{\infty}\frac{2^n-1}{4^{n}k^{n+1}(n+1)}\\ &=\frac{\ln2}{2}+\ln\Gamma(\frac{1}{2})-2\ln\Gamma(\frac{3}{4})\\ &=\frac{\ln(2\pi)}{2}-2\ln\Gamma(\frac{3}{4})\\ \end{align}$

Bob Dobbs
  • 10,988