Closed form expression of $\int_{-\infty}^\infty \frac{e^{-x^2}}{1+ae^{bx}}dx$ I am trying to find an expression for
$$
I(a,b) = \int_{-\infty}^\infty \frac{e^{-x^2}}{1+ae^{bx}}dx
$$
where $a \ge 0, b$ real but so far without success.
There are some easy special values like $I(0,b)=\sqrt{\pi}$ and $I(1,b)=\frac{\sqrt{\pi}}{2}$. These following identities are not hard to prove by substituting $x\mapsto -x$ and using $\frac{1}{1+p}=1-\frac{1}{1+1/p}$:
\begin{align}
&(1) \hspace{1em} I(a,b) = I(a,-b) \\
&(2) \hspace{1em} I\left(a,b\right)+I\left(\frac{1}{a},-b\right)=\sqrt{\pi} \\
&(3) \hspace{1em} I(a,0)=\frac{\sqrt{\pi}}{1+a}
\end{align}
$(1)$ and $(2)$ two imply
$$
(4)\hspace{1em} I\left(a,b\right)+I\left(\frac{1}{a},b\right)=\sqrt{\pi}
$$
The asymptotic behaviour is $I(\infty,b)=0$, $I(a,\infty)=\frac{\sqrt{\pi}}{2}$.
By experimenting I found that
$$f(a,b) = \sqrt{\pi}\left(b^{2n} \log a + \frac{1}{1+a}\right)$$
is a solution to $(1)-(4)$ but obviously fails the limits.
I tried complex methods, series expansions, Feynman/Fubini tricks, all to no avail.
My initial results made me confident enough to give it a go but now I have doubts there is even a solution.
Context: The integral showed up in the calculation of the expected value of $\frac{A}{1+BX}$ where $X$ is log-normally distributed; or expected value of $\frac{A}{1+Be^X}$ for normally distributed $X$. I am also interested in the case where the denominator is squared to find the variance.
Additional: Graph of $I(a,b)$
 A: Using
$$ \frac{1}{1 + a \, e^{b x}} = \sum_{n=0}^{\infty} (-a)^n \, e^{b n x}$$
then
\begin{align}
I(a, b) &= \int_{-\infty}^{\infty} \frac{e^{-x^2}}{1 + a \, e^{b x}} \, dx \\
&= \sum_{n} (-a)^n \, \int_{-\infty}^{\infty} e^{- (x^2 - b n x)} \, dx \\
&= \sum_{n} (-a)^n \, e^{b^2 n^2/4} \, \int_{-\infty}^{\infty} e^{-u^2} \, du \\
I(a, b) &= \sqrt{\pi} \, \sum_{n=0}^{\infty} (-a)^n \, e^{- (i \,b)^2 \, n^2/4}.
\end{align}
This has the form of a Theta function, namely, $\theta_{3}(x,q)$.
The property $I(a, -b) = I(a,b)$ is easily obtained. $I(a,0)$ is also easily determined. Outside of naming the integral in terms of a known function there may not be a "closed form" in a traditional sense.
A: I would have liked to relate the integral in question to a Jacobi theta function somehow (which ended up being a difficult task), but instead I
ended up uncovering an interesting expansion in terms of the Eulerian (not to be confused with Euler) polynomials given by the generating function
$$\frac{t-1}{t-\exp((t-1)\kappa x)}=\sum_{n=0}^\infty A_{n}(t)\frac{\kappa^n x^n}{n!}$$
Of note are the close connection of these polynomials with the eta function, polylogarithms, Bernoulli and Euler numbers, and in particular
$$\text{Li}_{-n}(x)=\frac{xA_{n}(x)}{(1-x)^{n+1}}$$
By setting $t=-1/a~~,~~ \kappa=-\frac{ab}{1+a}$ we see that this turns into an expansion for the denominator of the integrand:
$$\frac{1}{1+ae^{b x}}=\frac{1}{1+a}\sum_{n=0}^\infty (-1)^n \frac{A_n(-1/a)}{n!}\left(\frac{ab}{1+a}\right)^nx^n$$
which when integrated against the gaussian numerator yields the expression
$$\int_{-\infty}^\infty\frac{e^{-x^2}}{1+a e^{bx}}dx=\frac{\sqrt{\pi}}{1+a}\sum_{k=0}^\infty \frac{A_{2k}(-1/a)}{k!}\left(\frac{ab/2}{1+a}\right)^{2k}$$
I have not been able to check the convergence properties of this series, but the special cases $a=0,1,\infty$ can be explicitly checked for agreement with the known results, which hints at the fact that, as long as $a>0$ the series must converge.
