TITLE: Compute variance of logistic distribution
QUESTION [6 upvotes]: Consider a random variable $X$ with normalized logistic distribution(
so that its pdf is $\frac{e^{-x}}{(1+e^{-x})^2}$). It is well known 
that its variance $V$ equals $\frac{\pi^2}{3}$ but I couldn't find a direct proof so far.
It is easy to see that 
$$V=\int_{-\infty}^{\infty}\frac{x^2e^{-x}}{(1+e^{-x})^2}dx=
\int_{0}^{1}\Bigg(\ln\bigg(\frac{p}{1-p}\bigg)\Bigg)^2dp$$
This last integral is well-known according to Wikipedia, but the only
reference it gives for this is a certain link in the OEIS and I got lost
browing through the miscellaneous links in that OEIS page.
I am aware that one can use the moment generating function to compute $V$, but I'd prefer a solution that tackles the integral above directly, preferably without using complex analysis. 
Any help appreciated.

REPLY [2 votes]: I might as well add my answer as well

$$V=\int_{-\infty}^{\infty}\frac{x^2e^{-x}}{(1+e^{-x})^2}dx=
\int_{0}^{1}\Bigg(\ln\bigg(\frac{p}{1-p}\bigg)\Bigg)^2dp=\frac{\pi^2}{3}$$

To prove the last identity split the logarithm into three parts
$$
\Bigg(\ln\bigg(\frac{p}{1-p}\bigg)\Bigg)^2
= \log^2(p) - 2 \log p \log (1-p) + \log^2(1-p)
$$
Because of symmetry the first and last integrals are equal, and are easilly calculated by parts
$$
\begin{align*}
\int_0^1 \log^2p + \log^2(1-p)\,\mathrm{d}p
& =2\int_0^1 \log^2p \,\mathrm{d}p  \\
& =\bigg[ p \log^2p\bigg]_0^1 - 2 \int_0^1 p\frac{2 \log p}{p}\,\mathrm{d}p  
  =
-4 \int_0^1 \log p \,\mathrm{d}p
= 4
\end{align*}
$$
So the only remaining problem is the middle integral. However this canbe calculated using the series expansion of $\log(1-p)$ since $p \in (0,1)$.
\begin{align*}
  \int_0^1 \log p \log(1-p)\,\mathrm{d}p & = \int_0^1 \log p \left( \sum_{n=1}^\infty \frac{p^n}{n} \right) \,\mathrm{d}p \\
    & = \sum_{n=1}^\infty \frac{1}{n} \int_0^1 p^n \cdot \log p \,\mathrm{d}p \\
    & = \sum_{n=1}^\infty \frac{1}{n} \left\{ \left[ \frac{p^{n+1}\log p}{p+1} \right]_0^1 - \int_0^1 \frac{p^n}{n+1} \,\mathrm{d}p \right\} \\ 
    & = \sum_{n=1}^\infty \frac{1}{n} \cdot \frac{1}{(n+1)^2} \\
    & = \left( \sum_{n=1}^\infty \frac{1}{n} - \frac{1}{n+1} \right) - \left( -\frac{1}{(0+1)^2} + \sum_{n=0}^\infty \frac{1}{(n+1)^2} \right) \\
    & = 1 + 1 - \sum_{n=1}^\infty \frac{1}{n^2} = 2 - \frac{\pi^2}{6}
\end{align*}
Where the last sum is well know.