Evaluate $\int_0^{\infty}\frac{e^x-1}{xe^x(e^x+1)}dx.$ 
Evaluate the integral
  $$
\int_{0}^{\infty}{\mathrm{e}^{x} - 1 \over x\,\mathrm{e}^{x}\left(\mathrm{e}^x+1\right)}\,\mathrm{d}x\,.
$$

I have no idea how to approach integrals like this and I can't get any valuable result. Any hints will be appreciated.
 A: Note that $$I=\int_{0}^{\infty}\frac{e^{x}-1}{xe^{x}\left(1+e^{x}\right)}dx=\int_{0}^{\infty}\frac{e^{-x}-e^{-2x}}{x\left(1+e^{-x}\right)}dx
 $$ $$=\sum_{k\geq0}\left(-1\right)^{k}\int_{0}^{\infty}\frac{e^{-x\left(k+1\right)}-e^{-x\left(k+2\right)}}{x}dx
 $$ and now we can use the Frullani's theorem and get $$I=\sum_{k\geq1}\left(-1\right)^{k+1}\log\left(\frac{k}{k+1}\right)=\log\left(\prod_{k\geq1}\left(\frac{k}{k+1}\right)^{\left(-1\right)^{k+1}}\right)
 $$ and now note that $$\prod_{k \leq 2N}\left(\frac{k}{k+1}\right)^{\left(-1\right)^{k+1}}=\prod_{k=1}^{N}\frac{2k}{2k+1}\prod_{k=1}^{N}\frac{2k}{2k-1}=\frac{\pi N!^{2}}{2\Gamma\left(N+\frac{3}{2}\right)\Gamma\left(N+\frac{1}{2}\right)}\rightarrow\frac{\pi}{2}
 $$ where the last limit can be calculated using the Stirling's approximation. This product is also known as the Wallis product. So $$\int_{0}^{\infty}\frac{e^{x}-1}{xe^{x}\left(1+e^{x}\right)}dx=\color{red}{\log\left(\frac{\pi}{2}\right)}.$$
A: Notice that
\begin{align*}
\int_{0}^{\infty} \frac{e^x - 1}{x e^x(e^x + 1)} \, dx
&= \int_{0}^{\infty} \left( \int_{0}^{1} e^{xt} \, dt \right) \frac{dx}{e^x(e^x+1)} \\
&= \int_{0}^{1} \int_{0}^{\infty} \frac{e^{tx}}{e^x(e^x+1)} \, dxdt.
\end{align*}
In order to compute the inner integral, we utilize the geometric series as follows:
\begin{align*}
\int_{0}^{\infty} \frac{e^{tx}}{e^x(e^x+1)} \, dx
&= \int_{0}^{\infty} \frac{e^{-(2-t)x}}{1+e^{-x}} \, dx \\
&= \sum_{n=0}^{\infty} (-1)^n \int_{0}^{\infty} e^{-(n+2-t)x} \, dx \\
&= \sum_{n=0}^{\infty}\frac{(-1)^n}{n+2-t}. \tag{1}
\end{align*}
Plugging this back, we have
\begin{align*}
\int_{0}^{\infty} \frac{e^x - 1}{x e^x(e^x + 1)} \, dx
&= \sum_{n=0}^{\infty} (-1)^n\int_{0}^{1} \frac{dt}{n+2-t} \\
&= \sum_{n=0}^{\infty} (-1)^n ( \log(n+2) - \log(n+1) ) \\
&= \log \left( \frac{2}{1} \cdot \frac{2}{3} \cdot \frac{4}{3} \cdot \frac{4}{5} \cdot \frac{6}{5} \cdot \frac{6}{7} \cdots \right) \\
&= \log \left(\frac{\pi}{2}\right),
\end{align*}
where in the last line we utilized the Wallis product. Alternatively, we can identify $\text{(1)}$ as
$$ \int_{0}^{\infty} \frac{e^{tx}}{e^x(e^x+1)} \, dx = \frac{1}{2}\left( \psi_0\left(\frac{3-t}{2}\right) - \psi_0\left(\frac{2-t}{2}\right) \right), $$
where $\psi_0$ is the digamma function. Plugging this back gives
$$ \int_{0}^{\infty} \frac{e^x - 1}{x e^x(e^x + 1)} \, dx = \log\left( \frac{\Gamma\left(\frac{3}{2}\right)\Gamma\left(\frac{1}{2}\right)}{\Gamma(1)^2} \right) = \log\left(\frac{\pi}{2}\right). $$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
\int_{0}^{\infty}{\expo{x} - 1 \over x\expo{x}\pars{\expo{x} + 1}}\,\dd x & =
\int_{0}^{\infty}{\expo{-x} - \expo{-2x} \over x\pars{1 + \expo{-x}}}\,\dd x
\,\,\,\stackrel{\expo{-x}\ =\ t}{=}\,\,\,
\int_{1}^{0}{t - t^{2} \over \bracks{-\ln\pars{t}}\pars{1 + t}}
\,\pars{-\,{\dd t \over t}}
\\[5mm] & =
\int_{0}^{1}{1 \over 1 + t}\,\
\overbrace{{t - 1 \over \ln\pars{t}}}^{\ds{\int_{0}^{1}t^{x}\,\dd x}}\
\,\dd t =
\int_{0}^{1}\int_{0}^{1}{t^{x} - t^{x + 1} \over 1 - t^{2}}\,\dd t\,\dd x
\\[5mm] & \stackrel{t^{2}\ \mapsto\ t}{=}\,\,\,
{1 \over 2}\int_{0}^{1}
\int_{0}^{1}{t^{\pars{x - 1}/2}\,\,\, -\,\,\, t^{x/2} \over 1 - t}\,\dd t\,\dd x \\[5mm] & =
{1 \over 2}\int_{0}^{1}\bracks{%
\int_{0}^{1}{1 - t^{x/2} \over 1 - t}\,\dd t -
\int_{0}^{1}{1 - t^{\pars{x - 1}/2} \over 1 - t}\,\dd t}\,\dd x
\\[5mm] & =
{1 \over 2}\int_{0}^{1}
\bracks{\Psi\pars{{x \over 2} + 1} - \Psi\pars{x + 1 \over 2}}\,\dd x
\end{align}
where
$\ds{\Psi}$ is the Digamma Function and we used the well known identity
$$
\left.\vphantom{\LARGE A}\Psi\pars{z}\right\vert_{\,\Re\pars{z}\ >\ 0} = -\gamma + \int_{0}^{1}{1 - t^{z - 1} \over 1 - t}\,\dd t
$$
$\ds{\gamma}$ is the Euler-Mascheroni Constant. Then,
\begin{align}
\int_{0}^{\infty}{\expo{x} - 1 \over x\expo{x}\pars{\expo{x} + 1}}\,\dd x & =
\left.\ln\pars{\Gamma\pars{x/2 + 1} \over
\Gamma\pars{\bracks{x + 1}/2}}\right\vert_{\ 0}^{\ 1} =
\ln\pars{{\Gamma\pars{3/2} \over \Gamma\pars{1}}\,
{\Gamma\pars{1/2} \over \Gamma\pars{1}}} =
\ln\pars{{1 \over 2}\,\Gamma^{2}\pars{1 \over 2}}
\\[5mm] & =
\bbox[15px,#ffe,border:2px dotted navy]{\ds{\ln\pars{\pi \over 2}}}
\end{align}
