How to compute $\int_0^{\infty} \ln (1 + e^{-x})\, dx$ and $\int_0^{\infty} \ln (1 - e^{-x})\, dx$? Bierenes de Haan's book (page 377) shows that $\int_0^{\infty} \ln (1 + e^{-x})\, dx = \frac{\pi^2}{12}$, and  $\int_0^{\infty} \ln (1 - e^{-x})\, dx = -\frac{\pi^2}{6}$. Anybody know how to compute them? Thanks.
 A: Using the Maclaurin series for $\ln(1 + x)$, we have 
\begin{align}\int_0^\infty\ln(1 + e^{-x})\, dx &= \int_0^\infty \sum_{n = 1}^\infty (-1)^{n-1}\frac{e^{-nx}}{n}\, dx \\
&= \sum_{n = 1}^\infty \frac{(-1)^{n-1}}{n}\int_0^\infty e^{-nx}\, dx\\
& = \sum_{n = 1}^\infty \frac{(-1)^{n-1}}{n}\cdot\frac{1}{n}\\
& = \sum_{n = 1}^\infty \frac{(-1)^{n-1}}{n^2}\\
& = \sum_{n = 1}^\infty \frac{1}{(2n-1)^2} - \sum_{n = 1}^\infty \frac{1}{(2n)^2}\\
&= \sum_{n = 1}^\infty \frac{1}{n^2} - 2\sum_{n = 1}^\infty \frac{1}{(2n)^2}\\
&= \frac{1}{2}\sum_{n = 1}^\infty \frac{1}{n^2}\\
&= \frac{1}{2}\cdot\frac{\pi^2}{6}\\
&= \frac{\pi^2}{12}.
\end{align}
A similar method works for the second integral.
\begin{align}
\int_0^\infty \ln(1 - e^{-x})\, dx &= \int_0^\infty -\sum_{n = 1}^\infty \frac{e^{-nx}}{n}\, dx\\
&= - \sum_{n = 1}^\infty \frac{1}{n}\int_0^\infty e^{-nx}\, dx\\
&= -\sum_{n = 1}^\infty \frac{1}{n}\cdot\frac{1}{n}\\
&= -\sum_{n = 1}^\infty \frac{1}{n^2}\\
&= -\frac{\pi^2}{6}.
\end{align}
The interchange of series and integral are justified for the first integral since  $$\sum_{n = 1}^\infty \int_0^\infty \left|\frac{(-1)^{n-1}e^{-nx}}{n}\right|\, dx = \sum_{n = 1}^\infty \int_0^\infty \frac{e^{-nx}}{n}\ dx = \sum_{n = 1}^\infty \frac{1}{n^2} < \infty,$$ and for the second integral since similarly $$\sum_{n = 1}^\infty \int_0^\infty \left|\frac{e^{-nx}}{n}\right|\, dx = \sum_{n = 1}^\infty \frac{1}{n^2} < \infty.$$
A: Hint. You may integrate by parts, expand the integrand and integrate termwise.
$$
\begin{align}
\int_0^{\infty} \ln (1 - e^{-x})\, dx&=\left.x\ln (1 - e^{-x})\right|_0^{\infty} -\int_0^{\infty} \frac{x}{1 - e^{-x}} e^{-x}dx\\\\
&=0 -\int_0^{\infty} \frac{x}{1 - e^{-x}}dx\\\\
&=-\int_0^{\infty} x \sum_{n=0}^{\infty}e^{-(n+1)x}dx\\\\
&=-\sum_{n=0}^{\infty}\int_0^{\infty} x \:e^{-(n+1)x}dx\\\\
&=-\sum_{n=0}^{\infty}\frac{1}{(n+1)^2}\\\\
&=-\frac{\pi^2}{6}
\end{align}
$$ and similarly you get
$$
\begin{align}
\int_0^{\infty} \ln (1 + e^{-x})\, dx= \sum_{n=0}^{\infty}\frac{(-1)^n}{(n+1)^2}=\frac{\pi^2}{12}.
\end{align}
$$
A: Transform $e^{-x}=z$ $$I=\int_{0}^{\infty}\ln (1+e^{-x})dx=\int_{0}^1 \ln(1+z)\frac{dz}{z}\\=\int_{0}^1 \sum_{n\ge 0}(-1)^{n}\frac{z^{n}}{n+1}dz=\sum_{n\ge 0}\frac{(-1)^n}{n+1}\int_{0}^1 z^n dz=\sum_{n\ge 1}\frac{(-1)^{n-1}}{n^2}=\zeta(2)-\frac{\zeta(2)}{4}=\frac{\pi^2}{12}$$The other integral can be evaluated along the same lines.
