3

I know such integral: $\int_0^{\infty}\frac{\ln x}{e^x}\,dx=-\gamma$. What about the integral $\int_0^{\infty}\frac{\ln x}{e^x+1}\,dx$?

The answer seems very nice: $-\frac{1}{2}{\ln}^22$ but how it could be calculated? I tried integration by parts but the limit $\displaystyle{\lim_{x\to 0}\ln x\ln(1+e^{-x})}$ doesn't exist. Or I can also write the following equality $$\int_0^{\infty}\frac{\ln x}{e^x+1}\,dx=\lim\limits_{t\to 0}\frac{d}{dt}\left(\int_0^{\infty}\frac{x^t}{e^x+1}\, dx\right)$$ but I don't know what to do next.

baranka
  • 73
  • 1
    The quantity in the second integral is a well known integral that converges to a scalar multiple of the product of the gamma and zeta functions, unfortunately it seems the derivative of that product at $t=0$ is undefined since it involves a $\zeta(1)$ term. – Ninad Munshi Apr 06 '20 at 23:34

5 Answers5

5

Integrating by parts can obtain \begin{align*} I& :=\int_0^{\infty}\frac{\ln x}{e^x+1}\mathrm{d}x=\int_0^1+\int_1^{\infty}\\ & =\int_0^1\ln\left(\frac{1+e^{-x}}{2}\right)\frac{\mathrm{d}x}{x}\\ & \ \ \ +\int_1^{\infty}\ln\left(1+e^{-x}\right)\frac{\mathrm{d}x}{x}\\ & =\int_0^1\Bigl.\ln\left(\frac{1-e^{-xy}}{y}\right)\Bigr|_{y=1}^{y=2}\frac{\mathrm{d}x}{x}\\ & \ \ \ +\int_1^{\infty}\Bigl.\ln\left(1-e^{-xy}\right)\Bigr|_{y=1}^{y=2}\frac{\mathrm{d}x}{x}\\ & =\iint_{[0,1]\times [1,2]}\left(\frac{1}{e^{xy}-1}-\frac{1}{xy}\right)\mathrm{d}x\mathrm{d}y\\ & \ \ \ +\iint_{[1,\infty)\times [1,2]}\frac{\mathrm{d}x\mathrm{d}y}{e^{xy}-1}\\ & =\int_1^2\Bigl.\ln\left(\frac{1-e^{-xy}}{x}\right)\Bigr|_{x=0}^{x=1}\frac{\mathrm{d}y}{y}\\ & \ \ \ +\int_1^2\Bigl.\ln\left(1-e^{-xy}\right)\Bigr|_{x=1}^{x=\infty}\frac{\mathrm{d}y}{y}\\ & =-\int_1^2\frac{\ln y}{y}\mathrm{d}y=-\frac{\ln^2 2}{2}. \end{align*}

MathRoc
  • 860
4

Since : $$ \left(\forall x\in\mathbb{R}_{+}^{*}\right),\ \frac{1}{\mathrm{e}^{x}+1}=\sum_{n=1}^{+\infty}{\left(-1\right)^{n-1}\mathrm{e}^{-nx}} $$

And, using the result you gave, we have : \begin{aligned} \int_{0}^{+\infty}{\mathrm{e}^{-nx}\ln{x}\,\mathrm{d}x}=\frac{1}{n}\int_{0}^{+\infty}{\mathrm{e}^{-x}\ln{\left(\frac{x}{n}\right)}\,\mathrm{d}x}&=\frac{1}{n}\int_{0}^{+\infty}{\mathrm{e}^{-x}\ln{x}\,\mathrm{d}x}-\frac{\ln{n}}{n}\int_{0}^{+\infty}{\mathrm{e}^{-x}\,\mathrm{d}x}\\&=-\frac{\gamma +\ln{n}}{n} \end{aligned}

Thus : \begin{aligned}\int_{0}^{+\infty}{\frac{\ln{x}}{\mathrm{e}^{x}+1}\,\mathrm{d}x}&=\gamma\sum_{n=1}^{+\infty}{\frac{\left(-1\right)^{n}}{n}}+\sum_{n=1}^{+\infty}{\left(-1\right)^{n}\frac{\ln{n}}{n}}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(*\right)\end{aligned}

Since $ x\mapsto\frac{\ln{x}}{x} $ is positive and decreasing on $ \left]1,+\infty\right[ $, $ \left(\sum\limits_{k=1}^{n}{f\left(k\right)}-\int\limits_{1}^{n}{f\left(x\right)\mathrm{d}x}\right)_{n} $ converges to some constant $ \ell $, thus : \begin{aligned} \sum_{k=1}^{n}{\frac{\ln{k}}{k}}&=\int_{1}^{n}{\frac{\ln{x}}{x}\,\mathrm{d}x}+\ell+\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right)=\frac{\ln^{2}{n}}{2}+\ell+\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right) \end{aligned}

Now let $ n $ be a positive integer, we have :\begin{aligned} \sum_{k=1}^{2n}{\left(-1\right)^{k}\frac{\ln{k}}{k}}&=\sum_{k=1}^{n}{\frac{\ln{\left(2k\right)}}{2k}}-\sum_{k=0}^{n-1}{\frac{\ln{\left(2k+1\right)}}{2k+1}}\\&=\sum_{k=1}^{n}{\frac{\ln{\left(2k\right)}}{k}}-\sum_{k=1}^{2n}{\frac{\ln{k}}{k}}\\ &=\ln{2}\sum_{k=1}^{n}{\frac{1}{k}}+\sum_{k=1}^{n}{\frac{\ln{k}}{k}}-\sum_{k=1}^{2n}{\frac{\ln{k}}{k}}\\ &=\ln{2}\left(\ln{n}+\gamma +\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right)\right)+\left(\frac{\ln^{2}{n}}{2}+\ell+\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right)\right)-\left(\frac{\ln^{2}{\left(2n\right)}}{2}+\ell+\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right)\right)\\ \sum_{k=1}^{2n}{\left(-1\right)^{k}\frac{\ln{k}}{k}}&=-\frac{\ln^{2}{2}}{2}+\gamma\ln{2}+\underset{\overset{n\to +\infty}{}}{\mathcal{o}}\left(1\right) \end{aligned}

Meaning : $$ \sum_{n=1}^{+\infty}{\left(-1\right)^{n}\frac{\ln{n}}{n}}=-\frac{\ln^{2}{2}}{2}+\gamma\ln{2} $$

Hence, $ \left(*\right) $ becames : $$ \int_{0}^{+\infty}{\frac{\ln{x}}{\mathrm{e}^{x}+1}\,\mathrm{d}x}=-\gamma\ln{2}-\frac{\ln^{2}{2}}{2}+\gamma\ln{2}=-\frac{\ln^{2}{2}}{2} $$

CHAMSI
  • 9,222
1

\begin{align*} \int_{0}^{\infty}\frac{\ln x}{e^x+1} \, {\rm d}x &= \lim_{s \rightarrow 1}\int_{0}^{\infty} \frac{\partial }{\partial s} \frac{x^{s-1}}{e^x+1} \, {\rm d}x \\ &= \lim_{s \rightarrow 1}\frac{\mathrm{d} }{\mathrm{d} s} \int_{0}^{\infty} \frac{x^{s-1}}{e^x+1} \, {\rm d}x\\ &= \lim_{s \rightarrow 1}\frac{\mathrm{d} }{\mathrm{d} s} \mathcal{M} \left \{ \frac{1}{e^x+1} \right \}\\ &= \lim_{s \rightarrow 1}\frac{\mathrm{d} }{\mathrm{d} s} \left ( \Gamma(s) \zeta(s) \right ) \\ &= \lim_{s \rightarrow 1} \left [\Gamma'(s) \zeta(s) + \Gamma (s) \zeta'(s) \right ] \\ &= \lim_{s \rightarrow 1}\left [\Gamma (s)\psi(s) \zeta(s) + \Gamma (s) \zeta'(s) \right ] \\ &=\lim_{s \rightarrow 1} \Gamma(s) \left [ \psi(s) \zeta(s) + \zeta'(s) \right ] \\ &= - \frac{\ln^2 2}{2} \end{align*}

0

Noticing that $$ \int_0^{\infty} \frac{\ln x}{e^x+1} d x=\left.\frac{\partial}{\partial a} I(a)\right|_{a=1} $$ where $$ \begin{aligned} I(a)&=\int_0^{\infty} \frac{x^{a-1}}{e^x+1} d x \\& =\int_0^{\infty} \frac{e^{-x} x^{a-1}}{1+e^{-x}} d x \\ & =\sum_{n=0}^{\infty}(-1)^n \int_0^{\infty} e^{-(n+1) x} x^{a-1} d x \\ & =\sum_{n=0}^{\infty} \frac{(-1)^n \Gamma(a)}{(n+1)^a} \\ & =\Gamma(a) \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^a} \\ \\ \end{aligned} $$ $$ \frac{\partial}{\partial a}I(a)=-\Gamma(a) \sum_{n=1}^{\infty} \frac{(-1)^n \ln n}{n^a}+\Gamma^{\prime}(a) \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^a} $$

Putting $a=1$ yields $$ \begin{aligned} \int_0^{\infty} \frac{\ln x}{e^x+1} d x & =-\Gamma(1) \sum_{n=1}^{\infty} \frac{(-1)^n \ln n}{n}+\Gamma’(1) \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n} \\ & =-\frac{1}{2} \ln 2(\ln 2-2 \gamma)-\gamma \ln 2 \cdots (*)\\ & =-\frac{1}{2} \ln ^2 2 \end{aligned} $$ Details for (*) please refer to the post.

Lai
  • 31,615
0

Finding an antiderivative is a non-starter, but there are a lot of levers to work with in an integral like this.

First idea: a series. $\frac1{e^x+1}=e^{-x}-e^{-2x}+e^{-3x}-e^{-4x}+\cdots$ for $x>0$. We have to be careful with the behavior near zero, and then we need $\int_0^{\infty} e^{-nx}\ln x\,dx$, which again requires careful treatment near zero... I might revisit this, but forging ahead as we are now looks like a bad idea.

Second idea : complex analysis. We want to close this to a contour... there's a singularity at zero, cut an arc around that... the numerator is predictable on rays from the origin, and the denominator is predictable on (some) rays parallel to the $x$-axis. No, those don't line up; this looks unproductive.

Third idea: introduce another variable. Specifically, something to kill that logarithm: $\ln x$ is the derivative of $x^t$ (with respect to $t$) at $t=0$... Let $I(t)=\int_0^{\infty}\frac{x^t}{e^x+1}\,dx$. We want to find $I'(0)$. \begin{align*}I(t) &= \int_0^{\infty}\frac{x^t}{e^x+1}\,dx\\ &= \int_0^{\infty}x^t\sum_{n=1}^{\infty}(-1)^{n-1} e^{-nx}\,dx\\ &= \sum_{n=1}^{\infty} (-1)^{n-1}\int_0^{\infty} x^t e^{-nx}\,dx\\ &= \sum_{n=1}^{\infty} (-1)^{n-1}\int_0^{\infty} \left(\frac{y}{n}\right)^t e^{-y}\cdot\frac1n\,dy\\ &= \sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^{t+1}}\int_0^{\infty} y^t e^{-y}\,dy\\ I(t) &= \Gamma(t+1)\cdot (1-2^{-t})\cdot\zeta(t+1)\end{align*}That's the formula Tolaso quoted, in slightly different terms. The point we're interested in is a removable singularity (removed in the $\eta$ formulation), and the manipulations need some justification, but there it is. Differentiating that? As $t\to 0^+$, $(1-2^{-t})\approx \ln 2\cdot t-\frac{\ln^2 2}{2}\cdot t^2$, $\zeta(t+1)\approx \frac1t+\gamma$, and $\Gamma(t+1)$ is ... something I don't know off the top of my head, and can't look up quickly. I only know the second term for the zeta function because I worked it up for an old thread.

There really should be a better way here.

OK, what else can we do with the pieces here? Trying the old standby $\ln x=\int_1^x \frac1y\,dy$ leads to an indirect version of integration by parts, at least if we leave the triangular domains alone (and I don't see a reasonable alternative). Not really productive, especially as it makes the singularity at zero harder to handle. Trying to write that denominator as an integral? No. Just no.

That leaves - going back to that series we started with. It helps a little to pair off the terms; $\frac1{e^x+1}=\frac{e^{-x}-e^{-2x}}{1-e^{-2x}}=(e^{-x}-e^{-2x})+(e^{-3x}-e^{-4x})+\cdots$, and we can avoid convergence issues by treating it all as a series of positive terms. The integral we seek is \begin{align*}S &= \int_0^{\infty} \frac{\ln x}{e^x+1}\,dx\\ &= \int_0^{\infty} \sum_{n=1}^{\infty} \ln x\left(e^{-(2n-1)x}-e^{2nx}\right)\,dx\\ &= \sum_{n=1}^{\infty} \int_0^{\infty} \ln x\cdot e^{-(2n-1)x} - \ln x\cdot e^{2nx}\,dx\\ &= \sum_{n=1}^{\infty} J(2n-1)-J(2n)\end{align*}Now, we need $J(s)=\int_0^{\infty} e^{-sx}\ln x\,dx$. Substitute $y=sx$; the integral becomes $J(s)=\frac1s\int_0^{\infty}e^{-y}(\ln y-\ln s)\,dy=\frac{-\ln s}{s}+\frac1s\int_0^{\infty} e^{-y}\ln y\,dy=\frac{J(1)}{s}-\frac{\ln s}{s}.$ Continuing the previous calculation, \begin{align*}S &= \sum_{n=1}^{\infty} J(2n-1)-J(2n)\\ &= \sum_{n=1}^{\infty} \frac{J(1)}{2n-1}-\frac{J(1)}{2n}-\frac{\ln(2n-1)}{2n-1}+\frac{\ln(2n)}{2n}\\ &= \sum_{m=1}^{\infty} (-1)^{m-1}\frac{J(m)}{m} +(-1)^m\frac{\ln m}{m}\\ &= J(1)\ln 2+\sum_{m=2}^{\infty}(-1)^m\frac{\ln m}{m}\end{align*}That second sum is $\gamma\ln 2-\frac{\ln^2 2}{2}$, as I calculated in this thread long ago. Now what about $J(1)=\int_0^{\infty} e^{-x}\ln(x)\,dx$? Oh right, that's the derivative of $\Gamma$ at $1$. Getting to that... I've spent enough hours on this already. Let's do something crazy: For any nonnegative $n$, $\int_0^1 (1-x)^n\ln x\,dx=\frac{-1}{n+1}H_{n+1}$, where $H_{n+1}$ is the harmonic number $1+\frac12+\frac13+\cdots+\frac1{n+1}$. Exactly. I'm not willing to go looking for the clever combinatorics right now, so take my word for it. What does this have to do with anything? For large $n$, $e^{-nx}\approx\begin{cases}(1-x)^n&0\le x\le 1\\0&x\ge 1\end{cases}.$ More specifically, $0\le (1-x)^n\le e^{-nx}$ on the unit interval, so $$\frac{-1}{n+1}H_{n+1}=\int_0^1 (1-x)^n\ln x\,dx\ge \int_0^1 e^{-nx}\ln x\,dx=J(n)-\int_1^{\infty} e^{-nx}\ln x\,dx\ge J(n)-2e^{-n}$$ (estimating that last with $\ln x<x$). On the other side, since $\frac{n+1}{n}\int_0^1 (1-x)^n\,dx=\frac1n=\int_0^{\infty} e^{-nx}\,dx$ and $(1-x)^n\cdot e^{nx}$ is decreasing, $\int_0^a \frac{n+1}{n}(1-x)^n\,dx\ge \int_0^a e^{-nx}\,dx$ for any $a\in[0,1]$; integrating by parts, $\int_0^1 \frac{n+1}{n}(1-x)^n\cdot f(x)\le \int_0^1 e^{-nx}\cdot f(x)\,dx$ for any increasing $f$. Applying this to $f(x)=\ln x$, we have $$-\frac1n H_{n+1}=\int_0^1 \frac{n+1}{n}(1-x)^n\ln x\,dx\le \int_0^1 e^{-nx}\ln x\,dx\le \int_0^{\infty} e^{-nx}\ln x\,dx=J(n)$$ Putting that on one line, $$\frac{-1}{n} H_{n+1}\le J(n)=\frac1n(J(1)-\ln n)\le \frac{-1}{n+1}H_{n+1}+2e^{-n}$$ From the lower bound, as $n\to\infty$, $J(1)\ge \ln n-H_{n+1}\to-\gamma$. From the upper bound, as $n\to\infty$, $(n+1)J(n)\le -H_{n+1}+2(n+1)e^{-n}$ and $J(1)\le \ln n-H_{n+1}+J(n)+2(n+1)e^{-n}\to-\gamma$. By the squeeze, $J(1)=-\gamma$. Finally. Going back to the integral $S$ we wanted to find in the first place, $S=J(1)\ln 2+\sum_{m=2}^{\infty}(-1)^m\frac{\ln m}{m}=-\gamma\ln 2 +\gamma\ln 2-\frac{\ln^2 2}{2}=-\frac{\ln^2 2}{2}.$

All right, there's what I can say. It's messy, partly stream-of-consciousness, and way longer than I expected to write. I hope it's informative, in whatever way that might be.