Solution (source code)

= Solution

The integrand is nonnegative and measurable. It is <bounded> by $x$ near zero and by $xe^{-x}$ for $x>0$, so its integral is finite. For every $x>0$ the geometric expansion gives $x/(e^x+1)=\sum_{n\ge1}(-1)^{n-1}xe^{-nx}$. To justify termwise integration, note that
$$
\sum_{n\ge1}\int_0^\infty|(-1)^{n-1}xe^{-nx}|dx=\sum_{n\ge1}\frac1{n^2}<\infty.
$$
Tonelli gives an <integrable> sum of absolute values; <dominated convergence> then applies to the signed partial sums. Consequently
$$
\boxed{\int_0^\infty\frac{x}{e^x+1}dx=\sum_{n\ge1}\frac{(-1)^{n-1}}{n^2}.}
$$
If evaluated further, this is $(1-2^{-1})\zeta(2)=\pi^2/12$.