<s>[INST] Convergence of $\int_{0}^{+\infty} \frac{x}{1+e^x}\,dx$ Does this integral converge to any particular value?
$$\int_{0}^{+\infty} \frac{x}{1+e^x}\,dx$$
If the answer is yes, how should I calculate its value? 
I tried to use convergence tests but I failed due to the complexity of the integral itself.
 [/INST] Sure it does.
Collect $e^x$ in the denominator and you will get
$$\int_0^{+\infty}\frac{x}{e^{x}(1 + e^{-x})}\ \text{d}x$$
Since the integral range is from $0$ to infinity, you can see the fraction in this way:
$$\int_0^{+\infty}x e^{-x}\frac{1}{1 + e^{-x}}\ \text{d}x$$
and you can make use of the geometric series for that fraction:
$$\frac{1}{1 + e^{-x}} = \frac{1}{1 - (-e^{-x})} = \sum_{k = 0}^{+\infty} (-e^{-x})^k$$
thence thou have
$$\sum_{k = 0}^{+\infty}(-1)^k \int_0^{+\infty} x e^{-x} (e^{-kx})\ \text{d}x$$
Namely
$$\sum_{k = 0}^{+\infty}(-1)^k \int_0^{+\infty} x e^{-x(1+k)}\ \text{d}x$$
This is trivial, you can do it by parts getting 
$$\int_0^{+\infty} x e^{-x(1+k)}\ \text{d} = \frac{1}{(1+k)^2}$$
Thence you have
$$\sum_{k = 0}^{+\infty}(-1)^k \frac{1}{(1+k)^2} = \frac{\pi^2}{12}$$
Which is the result of the integration
If you need more explanations about the sum, just tell me!
HOW TO CALCULATE THAT SERIES
There is a very interesting trick to calculate that series. First of all, let's write it with some terms, explicitly:
$$\sum_{k = 0}^{+\infty}\frac{(-1)^k}{(1+k)^2} = \sum_{k = 1}^{+\infty} \frac{(-1)^{k+1}}{k^2} = -\ \sum_{k = 1}^{+\infty}\frac{(-1)^{k}}{k^2}$$
The first terms of the series are:
$$-\left(-1 + \frac{1}{4} - \frac{1}{9} + \frac{1}{16} - \frac{1}{25} + \frac{1}{36} - \frac{1}{64} + \frac{1}{128} - \cdots\right)$$
namely
$$\left(1 - \frac{1}{4} + \frac{1}{9} - \frac{1}{16} + \frac{1}{25} - \frac{1}{36} + \frac{1}{64} - \frac{1}{128} + \cdots\right)$$
Now let's call that series $S$, and let's split it into even and odd terms:
$$S = \left(1 + \frac{1}{9} + \frac{1}{25} + \frac{1}{49} + \cdots\right) - \left(\frac{1}{4} + \frac{1}{16} + \frac{1}{36} + \frac{1}{64} + \cdots\right) ~~~~~ \to ~~~~~ S = A - B$$
Where obviously $A$ and $B$ are respectively the odd and even part.
now the cute trick
take $B$, and factorize out $\frac{1}{4}$:
$$B = \frac{1}{4}\left(1 + \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + \frac{1}{36} + \cdots\right)$$
Now the series in the bracket is a well known series, namely the sum of reciprocal squares, which is a particular case of the Zeta Riemann:
$$\zeta(s) = \sum_{k = 1}^{+\infty} \frac{1}{k^s}$$
which is, for $s = 2$
$$\zeta(2) = \sum_{k = 1}^{+\infty} \frac{1}{k^2} = \frac{\pi^2}{6}$$
Thence we have:
$$B = \frac{\zeta(2)}{4} = \frac{\pi^2}{24}$$
Are you seeing where we want to go? But this is not enough since we don't know what $A$ is. To do that, we can again split $B$ into even and odd terms! But doing so, we will find again the initial $A$ and $B$ series:
$$B = \frac{1}{4}\left(\left[1 + \frac{1}{9} + \frac{1}{25} + \cdots\right] + \left[\frac{1}{4} + \frac{1}{16} + \frac{1}{64} + \cdots\right]\right) ~~~ \to ~~~ B = \frac{1}{4}\left(A + B\right)$$
This means:
$$4B - B = A ~~~~~ \to ~~~~~ A = 3B$$
So
$$A = 3\cdot \frac{\pi^2}{24} = \frac{\pi^2}{8}$$
Not let's get back to the initial series $S$ we wanted to compute, and substitution this we get:
$$S = A - B = \frac{\pi^2}{8} - \frac{\pi^2}{24} = \frac{\pi^2}{12}$$
</s>