# Expected value of log sigmoid function to a normal distribution

Is there an analytical solution for the expected value of log sigmoid function to a normal distribution. This corresponds to the following integral:

$$\int_{-\infty}^{+\infty} \log\left(\frac{1}{1+\exp(-x)}\right) \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) dx$$

I checked with Wolfram|Alpha, but didn't get any answer.

Your integral is $$\begin{split} I &= \frac{-1}{\sqrt{2\pi\sigma^2}} \int_{-\infty}^{+\infty} \log\left(1+\exp(-x)\right) \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right) dx \\ &= \frac{-1}{\sqrt{2\pi}} \int_{-\infty}^{+\infty} \log\left(1+e^{-\mu - \sigma u}\right) e^{-u^2/2} du \end{split}$$ and now expand $$\ln(1+y)$$ into Taylor series, and integrate term-by-term. Not sure If you can find a closed form expression for the final result, but you may have a good chance.