How to integrate $\int_0^{\infty} \frac{x}{e^x+1} dx$ I want to integrate it explicitly. I looked up if this had an exact solution, and I got that it is $\frac{\pi^2}{12}$ here: https://www.integral-calculator.com/#expr=x%2F%28e%5Ex%2B1%29&lbound=0&ubound=inf
I thought it could be solved using geometric series, so I tried to turn my integral into something similar:
$$\int_0^{\infty} \frac{x}{e^x+1} dx= \int_0^{\infty} \frac{x}{e^x+1} \frac{e^x-1}{e^x-1} dx=\int_0^{\infty} \frac{x e^x }{e^{2x}-1}dx -\int_0^{\infty} \frac{x}{e^{2x}-1} dx= \int_0^{\infty} \frac{x e^x }{e^{2x}-1}dx -\frac{1}{4}\int_0^{\infty}  \frac{x}{e^{x}-1} dx=\int_0^{\infty} \frac{x e^x}{e^{2x}-1} - \frac{1}{4}\frac{\pi^2}{6}$$
Where the second term is easy to solve with geometric series, and it's also defined with the Riemann zeta:
$$\int_0^{\infty} \frac{x}{e^x-1}=\zeta(2)=\frac{\pi^2}{6}$$
I think I can use geometric series also with the other integral, I've tried to solve it this way and I got:
$$\int_0^{\infty}\frac{xe^x}{e^x-1}=\frac{1}{4}\sum_{n=1}^{\infty}\frac{1}{\left(n-\frac{1}{2}\right)^2} $$
And I don't know how to obtain a value from this infinite sum, although if I'm not wrong it should be $\pi^2/2$.
Anyone knows how to do this? Also, I think I might be looping the loop and there's some easier way to proceed from the beggining, so I'd appreciate another point of view to solve this.
Thanks.
 A: Alternatively, let $t=e^{-x}$ to express the integral as
$$\int_0^{\infty} \frac{x}{e^x+1} dx= - \int_0^1 \frac{\ln t}{1+t}dt
\overset{IBP} = \int_0^1 \frac{\ln (1+t)}{t}dt
 = \frac{\pi^2}{12}
$$
where the result
Finding $ \int^1_0 \frac{\ln(1+x)}{x}dx$ is used.
A: Let $ n\in\mathbb{N} $, we have : \begin{aligned}\left\vert\sum_{k=1}^{n}{\left(-1\right)^{k-1}\int_{0}^{+\infty}{x\,\mathrm{e}^{-kx}\,\mathrm{d}x}}-\int_{0}^{+\infty}{\frac{x}{\mathrm{e}^{x}+1}\,\mathrm{d}x}\right\vert&=\left\vert\int_{0}^{+\infty}{x\sum_{k=n+1}^{+\infty}{\left(-1\right)^{k-1}\,\mathrm{e}^{-kx}}\,\mathrm{d}x}\right\vert\\ &\leq\int_{0}^{+\infty}{x\left\vert\sum_{k=n+1}^{+\infty}{\left(-1\right)^{k-1}\,\mathrm{e}^{-kx}}\right\vert\mathrm{d}x}\\ &\leq\int_{0}^{+\infty}{x\,\mathrm{e}^{-\left(n+1\right)x}\,\mathrm{d}x}=\frac{\Gamma\left(1\right)}{\left(n+1\right)^{2}}\underset{n\to +\infty}{\longrightarrow}0\end{aligned}
Which means that : $$ \sum_{n=1}^{+\infty}{\frac{\left(-1\right)^{n-1}}{n^{2}}}=\lim_{n\to +\infty}{\sum_{k=1}^{n}{\left(-1\right)^{k-1}\int_{0}^{+\infty}{x\,\mathrm{e}^{-kx}\,\mathrm{d}x}}}=\int_{0}^{+\infty}{\frac{x}{\mathrm{e}^{x}+1}\,\mathrm{d}x} $$
Thus : $$ \int_{0}^{+\infty}{\frac{x}{\mathrm{e}^{x}+1}\,\mathrm{d}x}=\eta\left(2\right)=\left(1-\frac{1}{2}\right)\zeta\left(2\right)=\frac{\pi^{2}}{12} $$
A: Using power series, we convert the integral into an infinite sum:
$$
\begin{aligned}
I &=\int_{0}^{\infty} \frac{x}{e^{x}+1} d x \\
&=\int_{0}^{\infty} \frac{x e^{-x}}{1+e^{-x}} d x \\
&=\int_{0}^{\infty} x e^{-x} \sum_{k=0}^{\infty}(-1)^{k} e^{-k x} d x \\
&=\sum_{k=0}^{\infty}(-1)^{k} \underbrace{\int_{0}^{\infty} x e^{-(k+1) x} d x}_{J_k}
\end{aligned}
$$
Integration by parts yields
$$
\begin{aligned}
J_{k} &=-\frac{1}{k+1} \int_{0}^{\infty} x \cdot d\left(e^{-(k+1) x}\right) \\
&=-\left[\frac{1}{k+1} x e^{-(k+1) x}\right]_{0}^{\infty}+\frac{1}{k+1} \int_{0}^{\infty} e^{-(k+1) x} d x \\
&=\frac{1}{(k+1)^{2}}
\end{aligned}
$$
Now we can conclude that
\begin{aligned}
I&=\sum_{k=0}^{\infty} \frac{(-1)^{k}}{(k+1)^{2}} \\ &=\sum_{k=1}^{\infty} \frac{1}{k^{2}}-2 \sum_{k=1}^{\infty} \frac{1}{(2 k)^{2}} \\
&=\frac{\pi}{6}-\frac{2}{4} \cdot \frac{\pi}{6} \\
&=\frac{\pi}{12}
\end{aligned}
