Evaluate the Integral \(\int_{0}^{\infty} \frac{\ln(x)}{1+e^{ax}} \mathrm{d}x\)

How to evaluate

\begin{equation}
I = \int\limits_{0}^{\infty} \frac{\ln(x)}{1+e^{ax}} \mathrm{d}x
\tag{1}
\label{eq:161008-1}
\end{equation}
was a question posed at Mathematics Stack Exchange. As of the time of writing this post, there was a good solution posted there. Here is my solution.

Let
\begin{align}
I_{1} &= \int\limits_{0}^{\infty} \frac{x^{b}}{1+e^{ax}} \mathrm{d}x = \int\limits_{0}^{\infty} \frac{x^{b}e^{-ax}}{1+e^{-ax}} \mathrm{d}x \\
&= \sum\limits_{n=0}^{\infty} (-1)^{n} \int\limits_{0}^{\infty} x^{b} e^{-(a+na)x} \mathrm{d}x
\end{align}

We designate the last integral on the right as \(I_{2}\) and make the substitution \(y=(a+na)x\)
\begin{align}
I_{2} &= \int\limits_{0}^{\infty} x^{b} e^{-(a+na)x} \mathrm{d}x \\
&= \frac{1}{(a+na)^{b+1}} \int\limits_{0}^{\infty} y^{b} e^{-y} \mathrm{d}y \\
&= \frac{\Gamma(b+1)}{(a+na)^{b+1}} \\
&= \frac{\Gamma(b+1)}{a^{b+1}} \frac{1}{(n+1)^{b+1}}
\end{align}

Now \(I_{1}\) becomes
\begin{equation}
I_{1} = \frac{\Gamma(b+1)}{a^{b+1}} \sum\limits_{n=0}^{\infty} (-1)^{n} \frac{1}{(n+1)^{b+1}} = \frac{\Gamma(b+1)}{a^{b+1}} \eta(b+1)
\end{equation}
and we have
\begin{align}
I &= \lim_{b \to 0} \frac{\partial I_{1}}{\partial b} = \lim_{b \to 0} \int\limits_{0}^{\infty} \frac{x^{b} \ln(x)}{1+e^{ax}} \mathrm{d}x \\
&= \lim_{b \to 0} \frac{\partial}{\partial b} \frac{\Gamma(b+1)\eta(b+1)}{a^{b+1}} \\
&= \lim_{b \to 0} \frac{a^{b+1} \Big[ \Gamma(b+1)\eta^{\prime}(b+1) + \Gamma^{\prime}(b+1)\eta(b+1) \Big] – \Gamma(b+1)\eta(b+1)a^{b+1}\ln(a)}{\left(a^{b+1}\right)^{2}} \\
&= \lim_{b \to 0} \frac{\Gamma(b+1)\eta^{\prime}(b+1) + \Gamma^{\prime}(b+1)\eta(b+1) – \Gamma(b+1)\eta(b+1)\ln(a)}{a^{b+1}} \\
\tag{a}
&= \frac{1}{a} \left(\Big[\gamma \ln(2) – \frac{1}{2} \ln^{2}(2)\Big] -\gamma \ln(2) – \ln(2)\ln(a) \right) \\
&= -\frac{\ln(2)}{a} \left(\frac{1}{2} \ln(2) + \ln(a) \right)
\end{align}

In step (a) we have
\begin{align}
\lim_{b \to 0} \Gamma^{\prime}(b+1)\eta(b+1) &= \lim_{b \to 0} \Gamma^(b+1)\psi(b+1)\eta(b+1) \\
&= \Gamma(1)\psi(1)\eta(1) \\
&= -\gamma \ln(2)
\end{align}
and
\begin{align}
\lim_{b \to 0} \Gamma(b+1)\eta^{\prime}(b+1) &= \lim_{s \to 1} \eta^{\prime}(s) \\
&= \lim_{s \to 1} \sum\limits_{n=0}^{\infty} (-1)^{n} \frac{\ln(n)}{n^{s}} \\
&= \gamma \ln(2) – \frac{1}{2} \ln^{2}(2)
\end{align}
See here for a proof of this result.

Notes:

  1. \(\Gamma(z)\) is the Gamma function.
  2. \(\eta(s)\) is the Dirichlet eta function.
  3. \(\zeta(s)\) is the Riemann zeta function.
  4. \(\psi(z)\) is the digamma function.
  5. \(\gamma\) is the Euler-Mascheroni constant.

Integrate \(\int_{0}^{\infty} \mathrm{e}^{x^{2}} (1 + \mathrm{e}^{x^{2}})^{-2} \mathrm{d}x \)

How to evaluate this integral was a question at Mathematics Stack Exchange.

We begin by considering:

\begin{align}
\left(1 + a\mathrm{e}^{x^{2}}\right)^{-1}
&= \frac{1}{a}\mathrm{e}^{-x^{2}} \frac{1}{1+(a\,\mathrm{exp}(x^{2}))^{-1}} \\
&= \frac{1}{a}\mathrm{e}^{-x^{2}} \sum\limits_{n=0}^{\infty} (-1)^{n} \left( \frac{1}{a}\mathrm{e}^{-x^{2}}\right)^{n} \\
&= \sum\limits_{n=0}^{\infty} (-1)^{n} \frac{1}{a^{n+1}} \mathrm{e}^{-(n+1)x^{2}} \\
\end{align}

Now integrate the exponential function
\begin{equation}
\int\limits_{0}^{\infty} \mathrm{e}^{-(n+1)x^{2}} \mathrm{d}x = \frac{\sqrt{\pi}}{2} \frac{1}{\sqrt{n+1}}
\end{equation}

Now we have
\begin{equation}
\int\limits_{0}^{\infty} \left(1 + a\mathrm{e}^{x^{2}}\right)^{-1} \mathrm{d}x =
\frac{\sqrt{\pi}}{2} \sum\limits_{n=1}^{\infty} (-1)^{n-1} \frac{1}{n^{1/2}} \frac{1}{a^{n}}
\end{equation}

Taking the derivative of both sides with respect to \(a\):

\begin{equation}
\int\limits_{0}^{\infty} \mathrm{e}^{x^{2}} \left(1 + a\mathrm{e}^{x^{2}}\right)^{-2} \mathrm{d}x =
\frac{\sqrt{\pi}}{2} \sum\limits_{n=0}^{\infty} (-1)^{n-1} \frac{1}{n^{-1/2}} \frac{1}{a^{n+1}}
\end{equation}

Taking \(\lim_{a \to 1}\)
\begin{align}
\int\limits_{0}^{\infty} \mathrm{e}^{x^{2}} \left(1 + \mathrm{e}^{x^{2}}\right)^{-2} \mathrm{d}x &=
\frac{\sqrt{\pi}}{2} \sum\limits_{n=1}^{\infty} (-1)^{n-1} \frac{1}{n^{-1/2}} \\
&= \frac{\sqrt{\pi}}{2} \eta(-1/2) \\
&\approx 0.336859119
\end{align}

\(\eta(s)\) is the Dirichlet eta function.

Integrate \(\int_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x\)

How to evaluate
\begin{equation}
\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x
\end{equation}
was a question on Mathematics Stack Exchange. The original post asked for a contour integral solution and there is a good one among the answers. However, this integral can be evaluated trivially by recognizing an integral definition of the Dirichlet eta function or use of the Mellin transform.

We have
\begin{equation}
\eta(s) = \frac{1}{\Gamma(s)}\int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{x}+1} \mathrm{d} x
\end{equation}
thus our integral is
\begin{equation}
\int\limits_{0}^{\infty} \frac{x}{\mathrm{e}^{x}+1} \mathrm{d} x = \eta(2)\Gamma(2) = \frac{\pi^{2}}{12}
\end{equation}

Also
\begin{align}
\mathcal{M}\left[(\mathrm{e}^{ax}+1)^{-1}\right](s) & = \int\limits_{0}^{\infty} \frac{x^{s-1}}{\mathrm{e}^{ax}+1} \mathrm{d} x \\
& = a^{-s}\Gamma(s)(1-2^{1-s})\zeta(s) \\
& = a^{-s}\Gamma(s)\eta(s)
\end{align}
With \(a=1\) and \(s=2\) we arrive at our result.

Integrate \(\int_{0}^{1} \frac{\mathrm{ln}^{3}(x)}{1+x} \mathrm{d} x\)

The following integral was a question on Mathematics Stack Exchange

\begin{equation}
\int\limits_{0}^{1} \frac{\mathrm{ln}^{3}(x)}{1+x} \mathrm{d} x
\label{eq:160812a1}
\tag{1}
\end{equation}

We begin with the substitution \(x=\mathrm{e}^{-y}\) so our integral becomes
\begin{equation}
-\int\limits_{0}^{\infty} \frac{y^{3}}{1+\mathrm{e}^{\,y}} \mathrm{d} y
\label{eq:160812a2}
\tag{2}
\end{equation}

This integral is a Mellin transform of the function
\begin{equation}
f(y) = \frac{1}{1+\mathrm{e}^{\,y}}
\label{eq:160812a3}
\tag{3}
\end{equation}
where the Mellin transform is defined as
\begin{equation}
\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x
\label{eq:160812a4}
\tag{4}
\end{equation}

From Tables of Integral Transforms (Bateman Manuscript) Volume 1, we have
\begin{equation}
\mathcal{M}[(\mathrm{e}^{\alpha x} + 1)^{-1}](s) = \frac{1}{\alpha^{s}} \Gamma(s) (1-2^{1-s}) \zeta(s)
\label{eq:160812a5}
\tag{5}
\end{equation}

With \(s = 4\) and \(\alpha = 1\) we have
\begin{equation}
-\int\limits_{0}^{\infty} \frac{y^{3}}{1+\mathrm{e}^{\,y}} \mathrm{d} y = -\Gamma(4) (1-2^{1-4}) \zeta(4) = -\frac{7\pi^{4}}{120}
\label{eq:160812a6}
\tag{6}
\end{equation}

Thus
\begin{equation}
\int\limits_{0}^{1} \frac{\mathrm{ln}^{3}(x)}{1+x} \mathrm{d} x = -\frac{7\pi^{4}}{120}
\label{eq:160812a7}
\tag{7}
\end{equation}

Addendum

We can rewrite \eqref{eq:160812a5} as
\begin{align}
\mathcal{M}[(\mathrm{e}^{\alpha x} + 1)^{-1}](s) & = \frac{1}{\alpha^{s}} \Gamma(s) (1-2^{1-s}) \zeta(s) \\
& = \frac{1}{\alpha^{s}} \Gamma(s) \eta(s)
\label{eq:160812a8}
\tag{8}
\end{align}
where
\begin{equation}
\eta(s) = (1-2^{1-s}) \zeta(s) = \sum\limits_{n=1}^{\infty} \frac{(-1)^{n-1}}{n^{s}}
\end{equation}
is the Dirichlet eta function, also known as the alternating Riemann zeta function.

Note that for Wolfram Alpha, \(\eta(s)\) defaults to the Dedekind eta function. To obtain the Dirichlet eta function type “dirichlet eta(s)”.