Solution (source code)

= Solution

For $x>0$ the geometric ratio $e^{-2x}$ has modulus less than one, and
$$
\sum_{m\geq0}(1-e^{-x})e^{-(2m+1)x}
=\frac{(1-e^{-x})e^{-x}}{1-e^{-2x}}=\frac1{e^x+1}.
$$
Every summand is nonnegative. The <monotone convergence theorem> therefore permits integration of the sum:
$$
\int_0^\infty\frac{dx}{e^x+1}
=\sum_{m\geq0}\left(\frac1{2m+1}-\frac1{2m+2}\right).
$$
The <integral> is finite because its integrand is bounded above by $e^{-x}$, whose <integral> is one. The displayed paired sums are the even partial sums of the <alternating harmonic series>; its odd partial sums differ by a term tending to zero. Thus the required equality holds with the usual series ordering. One can additionally evaluate it by $t=e^{-x}$:
$$
\boxed{\int_0^\infty\frac{dx}{e^x+1}=\int_0^1\frac{dt}{1+t}=\log2
=\sum_{n=1}^\infty\frac{(-1)^{n+1}}n.}
$$
Grouping into nonnegative pairs supplies the justified interchange; <absolute convergence> of the ungrouped integrated alternating series is not needed and would be false.