how to compute this definite integral? it is the second moment of logistic distribution, i.e.
$$
\int_{-\infty}^{\infty}\frac{x^2 e^x }{(1+e^x)^2}dx
$$
I've been struggling with it for hours. but i fail.
thanks first!

$$\int_{-\infty}^{\infty} \frac{x^{2} e^{x}}{(1+e^{x})^{2}} \ dx = 2 \int_{0}^{\infty} \frac{x^{2} e^{x}}{(1+e^{x})^{2}} = 2 \int_{0}^{\infty} x^{2} \sum_{n=1}^{\infty} (-1)^{n+1} n e^{-nx} \ dx $$
$$ = 2 \sum_{n=1}^{\infty} (-1)^{n+1} n \int_{0}^{\infty} x^{2} e^{-nx} \ dx = 2 \sum_{n=1}^{\infty} (-1)^{n+1} n \Big(\frac{2}{n^{3}} \Big) $$
$$ = 4 \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^{2}} =4 \Big(\frac{\pi^{2}}{12} \Big) = \frac{\pi^{2}}{3}$$
