How to calculate or approximate the integral $\int_{-\infty}^{\infty}\sigma(x)(1-\sigma(x))\mathcal{N}(x|0,1)dx$ $\sigma(x)$ is the sigmoid function, that is, $\sigma(x)=\frac{1}{1+e^{-x}}$. And $x$ is from a Normal distribution of 0 mean and 1 variance. Now I'd like to calculate the expectation of the derivative value of the sigmoid function, i.e,
$\int_{-\infty}^{\infty}\sigma(x)(1-\sigma(x))\mathcal{N}(x|0,1)dx$
Thanks in advance!
 A: Mathematica doesn't give an analytic result, but it does give the numerical result 0.206621.
If you want some sort of semi-analytic treatment, you can expand
$$\sigma(x) ( 1 - \sigma(x) ) = \frac{1}{4} - \frac{x^2}{16} + \frac{x^4}{96} + \cdots$$
and then integrate term by term to get
$$\frac{1}{4} - \frac{1}{16} + \frac{1}{32} + \cdots$$
The first three terms get you to 0.22. If you can write the $n$th term of the expansion in closed form, you might even be able to recognize the term-by-term integrated series as related to some established function or constant.
A: Expanding on JohnK's comment: You want to find the expectation of a function with respect to a standard normal distribution. Since it seems difficult to evaluate the integral, we can instead resort to estimating it using Monte Carlo.
If we sample $x_1, x_2, \dots x_N$ from a $N(0,1)$ distribution, then your quantity can be estimated by 
$$\dfrac{1}{n} \sum_{i=1}^{N} \sigma(x_i) (1 - \sigma(x_i)\,. $$
As you increase $N$, you can an increasingly better estimate of the quantity. The R code below returns the value .20669 with standard error .00015.
> set.seed(100)
> sig <- function(x)
+ {
+   1/(1+exp(-x))
+ }
> 
> N <- 1e5
> samples <- rnorm(N, 0, 1)
> mean(sig(samples)*(1 - sig(samples)))
[1] 0.2066863

> # The standard error of the mean estimate
> sd(sig(samples)*(1 - sig(samples)))/sqrt(N)
[1] 0.0001463474

A: In addition, note that
$$
\sigma(x)\{1-\sigma(x)\} = \frac{e^{-x}}{(1+e^{-x})^2} = \left(\frac{1}{1+e^{-x}}\right)'
$$
Thus, integrating by part,
$$
\int \sigma(x)\{1-\sigma(x)\}N(0,1)dx = \left[\frac{1}{1+e^{-x}} N(0,1)(x)\right] - \int \frac{1}{1+e^{-x}} N(0,1)' dx
$$
The $[...]$ term equals 0. Then
$$
N(0,1)' = - x N(0,1)
$$
Finally, if my calculations are correct, your integral is
$$
\int \frac{x}{1+e^{-x}}N(0,1)dx
$$
Applying the Monte Carlo technique, generate $x_1,\ldots,x_n \sim N(0,1)$ and compute then average 
$$
\frac{1}{n} \sum_{i=1}^n \frac{x_i}{1+e^{-x_i}}
$$ 
It might be more stable [not even sure], though pretty much equivalent to JohnK and GreenPaker's suggestions.
