16
$\begingroup$

Evaluate $$\int_0^{+\infty}\frac{\log x}{1+e^x}\,dx.$$

I have tried using Feynman's Trick (in several ways, but for example by introducing a variable $a$ such that $I(a)=\int_0^{+\infty}\frac{\log ax}{1+e^x}\,dx$), but that doesn't seem to work. Also integration by parts and all kinds of substitutions make things worse (I have no idea how to substitute such that $\log$ and $\exp$ both become simpler.

(Source: Dutch Integration Championship 2013 - Level 5/5)

$\endgroup$
8
  • 3
    $\begingroup$ $$I(a) = \int_0^{+\infty} \frac{x^a}{1+e^x}\,dx$$ would be the candidate for differentiation under the integral. $\endgroup$ Dec 30, 2017 at 22:15
  • 2
    $\begingroup$ Another hint: $$\int_{0}^{\infty}\frac{x^{s-1}}{1+e^x}\,dx=\Gamma(s)(1-2^{1-s})\zeta(s).$$ Now you may compute the derivative w.r.t. $s$ at $s=1$. $\endgroup$ Dec 30, 2017 at 22:18
  • $\begingroup$ @SangchulLee may I ask how one gets that? Do you have a reference for it? It is beyond me and I would like to learn how that gets done. It is okay if you don't have a reference in hand range $\endgroup$
    – Shashi
    Dec 30, 2017 at 22:21
  • $\begingroup$ @SangchulLee by expanding the exponential in geometric series? The denominator huh $\endgroup$
    – Shashi
    Dec 30, 2017 at 22:22
  • 1
    $\begingroup$ @rae306 For Daniel Fischer's approach, you would differentiate with respect to $a$, obtaining a factor of $\log(x)$, and then set $a=0$. $\endgroup$
    – Ian
    Dec 30, 2017 at 22:58

5 Answers 5

19
$\begingroup$

There's a way avoiding special functions and transforms, similar to the device for calculating Frullani integrals: Let's calculate $\displaystyle\int^\infty_\epsilon\frac{\log x}{1+e^x}\,dx$ up to terms $o(1)$ for $\epsilon\to0+$. With the identity $$\frac1{e^x+1}=\frac1{e^x-1}-\frac2{e^{2x}-1},$$ we have \begin{align}\int^\infty_\epsilon\frac{\log x}{1+e^x}\,dx&=\int^\infty_\epsilon\frac{\log x}{e^x-1}\,dx-\int^\infty_\epsilon\frac{2\log x}{e^{2x}-1}\,dx\\&=\int^\infty_\epsilon\frac{\log x}{e^x-1}\,dx-\int^\infty_{2\epsilon}\frac{\log x-\log2}{e^x-1}\,dx \\&=\int^{2\epsilon}_\epsilon\frac{\log x}{e^x-1}\,dx+\int^\infty_{2\epsilon}\frac{\log2}{e^x-1}\,dx \end{align} Using $\displaystyle\frac1{e^x-1}=\frac1x+O(1)$ and $\displaystyle\int^{2\epsilon}_\epsilon|\log x|\,dx=o(1)$, we see $$\int^{2\epsilon}_\epsilon\frac{\log x}{e^x-1}\,dx=\int^{2\epsilon}_\epsilon\frac{\log x}{x}\,dx+o(1)=\frac12\log^22+\log2\log\epsilon+o(1)$$ and $$\int^\infty_{2\epsilon}\frac{\log2}{e^x-1}\,dx=\log2\log\frac1{1-e^{-2\epsilon}}=-\log^22-\log2\log\epsilon+o(1),$$ so $$\int^\infty_\epsilon\frac{\log x}{1+e^x}\,dx=-\frac12\log^22+o(1),$$ and our integral is $$\int^\infty_0\frac{\log x}{1+e^x}\,dx=-\frac12\log^22.$$

$\endgroup$
16
$\begingroup$

By the inverse Laplace transform $$ \sum_{n\geq 1}\frac{(-1)^{n+1}}{n^s} = \frac{1}{\Gamma(s)}\int_{0}^{+\infty}\frac{x^{s-1}}{e^x+1}\,dx $$ and by differentiating both sides with respect to $s$ $$ \sum_{n\geq 1}\frac{(-1)^n \log n}{n^s} = -\frac{\Gamma'(s)}{\Gamma(s)^2}\int_{0}^{+\infty}\frac{x^{s-1}}{e^x+1}\,dx + \frac{1}{\Gamma(s)}\int_{0}^{+\infty}\frac{x^{s-1}\log(x)}{e^x+1}\,dx $$ so by evaluating at $s=1$ $$\int_{0}^{+\infty}\frac{\log x}{e^x+1}\,dx = \sum_{n\geq 1}\frac{(-1)^n\log n}{n}+\underbrace{\Gamma'(1)}_{-\gamma}\underbrace{\int_{0}^{+\infty}\frac{dx}{e^x+1}}_{\log 2} $$ and it just remains to crack the mysterious series $\sum_{n\geq 1}\frac{(-1)^n\log n}{n}$. On the other hand by Frullani's integral, the inverse Laplace transform or Feynman's trick we have $\log(n)=\int_{0}^{+\infty}\frac{e^{-x}-e^{-nx}}{x}\,dx$, so $$\sum_{n\geq 1}\frac{(-1)^n\log n}{n}=\int_{0}^{+\infty}\frac{\log(1+e^{-x})-e^{-x}\log 2}{x}\,dx=\gamma\log(2)-\frac{1}{2}\log^2(2)\tag{J}$$ where the last identity follows from the integral representation for the Euler-Mascheroni constant, got by applying the inverse Laplace transform to the series definition $\gamma=\sum_{n\geq 1}\left[\frac{1}{n}-\log\left(1+\frac{1}{n}\right)\right]$. Summarizing, we simply have $$ \int_{0}^{+\infty}\frac{\log(x)}{e^x+1}\,dx = \color{red}{-\frac{1}{2}\log^2(2)}.$$ It is possible to prove the equality between the LHS and the RHS of $(J)$ by summation by parts and Euler sums, too.

$\endgroup$
5
  • 1
    $\begingroup$ This answer add new things to my math knowledge (+1). However due to being new to Euler Mascheroni I do not understand how you got (J), can you please tell which integral representation? I looked up on the Internet and I could not find which one you meant. Thanks in advance. Moreover I think in the second line the second Gamma in the denominator should not be squared although that won't change anything in the rest of the elaboration. $\endgroup$
    – Shashi
    Dec 30, 2017 at 23:12
  • $\begingroup$ @Shashi: typo fixed, and the mentioned integral representation is $$ \gamma=\int_{0}^{+\infty}\left(\frac{1}{e^x-1}-\frac{1}{x e^x}\right)\,dx. $$ $\endgroup$ Dec 30, 2017 at 23:18
  • $\begingroup$ many thanks!! I'll remember this one! $\endgroup$
    – Shashi
    Dec 30, 2017 at 23:21
  • $\begingroup$ @JackD'Aurizio thanks for this beautiful answer! I have learned some new tricks :) $\endgroup$
    – rae306
    Dec 31, 2017 at 9:06
  • $\begingroup$ @JackD'Aurizio How did you get $$\int_{0}^{+\infty}\frac{\log(1+e^{-x})-e^{-x}\log 2}{x}\,dx=\gamma\log(2)-\frac{1}{2}\log^2(2)$$. I integrated by parts this integral and got $$\int_{0}^{+\infty}\frac{\log(1+e^{-x})-e^{-x}\log 2}{x}\,dx=\gamma \log(2)+\int_{0}^{+\infty}\frac{\log x}{e^x+1}\,dx$$ which does´t add any information. Thank you very much! $\endgroup$
    – Ricardo770
    Oct 15, 2021 at 19:40
14
$\begingroup$

As pointed out in the comments, let $I(a)$ be the following integral: $$I(a)=\int\limits_0^{\infty} \frac{x^a}{1+e^x}\,dx$$ We are then looking for $I'(0)$.

$$\begin{align} I(a)&=\int\limits_0^{\infty}e^{-x}x^a\frac{1}{1+e^{-x}}\,dx\\ I(a)&= \int\limits_0^{\infty}e^{-x}x^a \sum_{n=0}^{+\infty}(-1)^n e^{-nx}\,dx\\ I(a)&=\sum_{n=0}^{+\infty}(-1)^n\int_\limits0^{\infty}e^{-x(n+1)}x^a\,dx\\ I(a)&=\sum_{n=1}^{+\infty}(-1)^{n-1}\int\limits_0^{\infty}e^{-nx}x^a\,dx &u=nx\\ I(a)&=\sum_{n=1}^{+\infty}(-1)^{n-1}\int\limits_0^{\infty} e^{-u}\frac{u^a}{n^a}\frac{du}{n}\\ I(a)&=\sum_{n=1}^{+\infty}\frac{(-1)^{n-1}}{n^{a+1}} \int\limits_0^{\infty}e^{-u}u^{a}\,du\\ I(a)&=\eta(a+1)\Gamma(a+1) \end{align}$$ Where $\eta(s)$ is the Dirichlet eta function and $\Gamma(s)$ is the Gamma function. Taking the derivative of both sides, $$\begin{align} I'(a)&=\eta'(a+1)\Gamma(a+1)+\eta(a+1)\psi(a+1)\Gamma(a+1)\\ I'(0)&=\eta'(1)\Gamma(1)+\eta(1)\psi(1)\Gamma(1)\\ I'(0)&=\log(2)\gamma-\frac{1}{2}\log^2(2)-\log(2)\gamma\\ I'(0)&=-\frac{1}{2}\log^2(2) \end{align}$$ Thus,

$$\int\limits_0^{\infty} \frac{\log(x)}{1+e^x}\,dx=-\log^2\left(\sqrt{2}^{\sqrt{2}}\right)$$

$\endgroup$
0
7
$\begingroup$

$\log(x)/(1+e^x)=e^{-x} \log(x)/(1+e^{-x})$ then expand $1/(1+e^{-x})$ using the geometric series. Up to changes of variables you are then left to integrate $\log(x) e^{-x}$ using any method, and then computing a certain infinite series.

$\endgroup$
0
$\begingroup$

We have the lemma: If $f(x)$ is differentiable on intervals $(0,+\infty)$,and $f'(x)$ is monotonic function ,$\lim\limits_{x\to\infty}f'(x)=0$,then exist the limit: $$\lim\limits_{n\to\infty}\Big[\frac{1}{2}f(1)+f(2)+f(3)+\cdots+f(n-1)+\frac{1}{2}f(n)-\int_1^nf(x)dx\Big]=l$$ Pro:Let the $$F(x)=\int_1^xf(t)dt$$Use the Taylor formula ,then exist $\xi_k,\eta_k:k<\xi_k<k+\frac{1}{2},k+\frac{1}{2}<\eta_k<k+1$,meet $$F(k+\frac{1}{2})-F(k)=\frac{1}{2}F'(k)+\frac{1}{8}F''(\xi_k)=\frac{1}{2}f(k)+\frac{1}{8}f'(\xi_k)-F(k+\frac{1}{2})+F(k+1)$$ $$=\frac{1}{2}f(k+1)-\frac{1}{8}f'(\eta_k)$$ Sum Up the above formula from $k=1$ to $n-1$,we have $$\frac{1}{2}f(1)+f(2)+\cdots+f(n-1)+\frac{1}{2}f(n)-F(n)$$ $$=\frac{1}{8}\Big[f'(\eta_1)-f'(\xi_1)+f'(\eta_2)-f'(\xi_2)+\cdots+f'(\eta_{n-1})-f'(\xi_{n-1})\Big]$$ Use the Leibniz test,On the right side of the above formula is exist. For $f(x)=\frac{\ln x}{x}$,we have $$\sum_{n=1}^\infty(-1)^{n}\frac{\ln n}{n}=l$$ let $$S_n=\sum_{k=1}^n(-1)^n\frac{\ln k}{k}$$ so \begin{align} \lim\limits_{n\to\infty}S_{2n}=&\lim_{n\to\infty}\Big(-\frac{\ln1}{1}+\frac{\ln 2}{2}+\cdots+\frac{\ln 2n}{2n}\Big)\\ =&\lim_{n\to\infty}\Big[-(\frac{\ln1}{1}+\frac{\ln2}{2}+\cdots+\frac{\ln2n}{2n}-\frac{(\ln2n)^2}{2})\\ &+{}2(\frac{\ln2}{2}+\frac{\ln4}{4}+\cdots+\frac{\ln2n}{2n})-\frac{(\ln2n)^2}{2}\Big]\\ =&-l+\lim_{n\to\infty}\Big(\frac{1}{1}+\frac{\ln2}{2}+\cdots+\frac{\ln n}{n}-\frac{(\ln n)^2}{2}\Big)\\ &-\lim_{n\to\infty}\Big(\frac{\ln1}{1}+\frac{\ln2}{2}+\cdots+\frac{\ln2}{n}-\ln2\ln n\Big)-\frac{(\ln2)^2}{n}\\ =&\ln2\Big(\gamma-\frac{\ln2}{2}\Big) \end{align} where $\gamma$ is Euler-Mascheroni constant:$\gamma=\lim\limits_{n\to\infty}\Big(\sum\limits_{k=1}^n\frac{1}{k}-\ln n\Big)$

so by Jack D'Aurizio's work: $$\int_{0}^{+\infty}\frac{\log x}{e^x+1}\,dx = \sum_{n\geq 1}\frac{(-1)^n\log n}{n}+\underbrace{\Gamma'(1)}_{-\gamma}\underbrace{\int_{0}^{+\infty}\frac{dx}{e^x+1}}_{\log 2}$$ we have $$\int_0^\infty\frac{\ln x}{e^x+1}=\gamma\ln2-\frac{1}{2}\ln^22-\gamma\ln2=-\frac{1}{2}\ln^22$$ Alos,when $\Re(v)>0$,we have $$\int_0^\infty\frac{x^{v-1}\ln x}{e^x+1}dx=\Gamma(v)\Big(\sum_{k=1}^\infty\frac{(-1)^{k-1}}{k^v}[\psi(v)-\ln k]\Big)$$

$\endgroup$
1
  • $\begingroup$ Haha,sorry,I have some typos ,but not affect understanding. $\endgroup$ Jan 7, 2022 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .