# How to evaluate the integral $\int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2}}}{1 + e^{-x}} dx$?

Is there a way to evaluate the integral $$\int_{-\infty}^{\infty} \frac{e^{-\frac{x^2}{2}}}{1 + e^{-x}} dx \ ?$$ I've tried changing variables, integral by parts and gaussian integral, but all got stuck. The numerical integral shows that it equals $$\frac{\sqrt{2\pi}}{2}$$. Any suggestions on how to solve it analytically?

• How can it equal that without bounds? Commented Jul 29, 2022 at 16:51
• @NinadMunshi To clarify the question $\int\limits_{-\infty}^\infty \frac{e^{-\frac{x^2}{2}}}{1+e^{-x}}\,dx=\sqrt{\frac{\pi }{2}}$. Commented Jul 29, 2022 at 16:52
• Sorry about the confusion. I've added the bounds in the question. Commented Jul 29, 2022 at 16:54

Assuming the question is on the interval $$(-\infty,\infty)$$, under the variable interchange $$x\leftrightarrow -x$$ we have
$$I = \int_{-\infty}^\infty \frac{e^{-\frac{x^2}{2}}}{1+e^x}dx = \int_{-\infty}^\infty \frac{e^{-x}\cdot e^{-\frac{x^2}{2}}}{1+e^{-x}}dx$$
$$I+I = \int_{-\infty}^\infty e^{-\frac{x^2}{2}}dx = \sqrt{2\pi}$$
by the result of the Gaussian integral, therefore the original integral evaluates to $$I=\sqrt{\frac{\pi}{2}}$$