Integral of Logistic Distribution 
$$\int_{-\infty}^\infty \frac{xe^x}{(1+e^x)^2} dx=0.$$   

The integral represents the mean of the Logistic Distribution which is supposed to be zero. I've tried the following substitution:  $u=\frac{1}{1+e^x}, du=\frac{e^x}{(1+e^x)^2} dx$ which gives:    

$$\int_{1}^0 \ln(\frac{1-u}{u}) du .$$  

Integrating by parts then gives $u\ln(\frac{1}{u}-1)-\ln(1-u)$
But then substituting the limits of integration into the result would leave some terms undefined. Why isn't the result zero?
 A: Setting $u=\frac{1}{1+e^x}$ we have
$$
x=\ln\frac{1-u}{u}=\ln(1-u)-\ln u,\quad \mathrm{d}u=-\frac{e^x}{(1+e^x)^2}\mathrm{d}x,
$$
and therefore
\begin{eqnarray}
\int_{-\infty}^\infty\frac{xe^x}{(1+e^x)^2}\,dx&=&\int_0^1[\ln(1-u)-\ln u]\,du=\int_0^1\ln(1-u)\,du-\int_0^1\ln u\,du\\
&\stackrel{v=1-u}{=}&\int_0^1\ln v\,dv-\int_0^1\ln u\,du=0.
\end{eqnarray}
A: $\displaystyle \text{If }f(x)=\frac{xe^x}{(e^x+1)^2},$
$\displaystyle f(-x)=\frac{-xe^{-x}}{(e^{-x}+1)^2}=-\frac{xe^x}{(e^x+1)^2}=-f(x)$
$\implies f(x)$ is odd function
Now use this 
A: Use instead the substitution $u=-x$ to get
$$
\begin{align}
\int_{-\infty}^\infty\frac{xe^x}{(1+e^x)^2}\mathrm{d}x
&=-\int_{-\infty}^\infty\frac{ue^{-u}}{(1+e^{-u})^2}\mathrm{d}u\\
&=-\int_{-\infty}^\infty\frac{ue^u}{(1+e^u)^2}\mathrm{d}u\\
\end{align}
$$
Add the left side to both sides and divide by $2$.

Although the definite integral was requested, in a comment to lab bhattacharjee on Mercy's answer, it is mentioned that the indefinite integral was really sought. Therefore,
$$
\begin{align}
\int\frac{xe^x}{(1+e^x)^2}\mathrm{d}x
&=\int\frac{x}{(1+e^x)^2}\mathrm{d}e^x\\
&=-\int x\,\mathrm{d}\frac1{1+e^x}\\
&=-\frac{x}{1+e^x}+\int\frac{\mathrm{d}x}{1+e^x}\\
&=-\frac{x}{1+e^x}+\int\left(1-\frac{e^x}{1+e^x}\right)\mathrm{d}x\\
&=-\frac{x}{1+e^x}+x-\int\frac{\mathrm{d}e^x}{1+e^x}\\
&=\frac{xe^x}{1+e^x}-\log(1+e^x)+C
\end{align}
$$
