integral: $\int_{-\infty}^{\infty} \frac{e^{ax^{2}}}{1+e^{x}} dx$ with a<0 I've encountered the following integral
$$\int_{-\infty}^{\infty} \frac{e^{ax^{2}}}{1+e^{x}} dx\; \; with\; a<0$$
Is this integrable? I have seen similar topics asked before was solved with contour method but do not know whether, and how can contour method works for this one. 
Any help would be appreciated! 
 A: Indeed, the integral converges since the integrand behaves like 
$
e^{ax^2}
$
as $x\to-\infty$ and like
$
e^{x^2(a-1/x)}
$
as $x\to+\infty$, and $a<0$.
Here is also a calculation which, however, does not use the contour method.
Let us split the integral as
$$
I=\int_{-\infty}^\infty \frac{e^{ax^2}}{1+e^x}dx =
\int_{0}^\infty \frac{e^{ax^2}}{1+e^x}dx+
\int_{-\infty}^0\frac{e^{ax^2}}{1+e^x}dx=I_1+I_2\,.
$$
Then, using the formula for the geometric series 
$$
I_1=\int_0^\infty \frac{e^{ax^2}}{1+e^{-x}}e^{-x}dx =\sum_{n=0}^\infty (-1)^n \int_0^\infty e^{ax^2-(n+1)x}dx=-\sum_{n=1}^\infty (-1)^n \int_0^\infty e^{ax^2-nx}dx
$$
whereas
$$
I_2= \int_{0}^\infty \frac{e^{ax^2}}{1+e^{-x}}dx =\sum_{n=0}^\infty (-1)^n \int_0^\infty e^{ax^2-nx}dx\,.
$$
In the sum $I_1+I_2$ all terms cancel out except for $n=0$, thus
$$
I=\int_0^\infty e^{ax^2}dx=\frac{1}{2}\int_{-\infty}^\infty e^{ax^2}dx=\frac{\sqrt{\pi}}{2\sqrt{-a}}\,,
$$
for $a<0$.
EDIT: In fact, as pointed out by Achille Hui in the comments, there is no need for geometric series
$$
I = \int_0^\infty e^{ax^2}\left( \frac{1}{1+e^x}+\frac{1}{1+e^{-x}}\right) dx
=\int_0^\infty e^{ax^2} dx = \frac{\sqrt{\pi}}{2\sqrt{-a}}\,.
$$
A: On the path of Brightsun and  Achille Hui (to achieve the computation)
$\begin{align}I&=\displaystyle \int_{-\infty}^{\infty} \frac{e^{ax^{2}}}{1+e^{x}} dx\\
&=\int_{-\infty}^{0} \frac{e^{ax^{2}}}{1+e^{x}} dx+\int_{0}^{\infty} \frac{e^{ax^{2}}}{1+e^{x}} dx
\end{align}$
Perform the change of variable $y=-x$ in the first integral,
$\begin{align}I&=\int_{0}^{\infty} \frac{e^{ax^{2}}}{1+e^{-x}} dx+\int_{0}^{\infty} \frac{e^{ax^{2}}}{1+e^{x}} dx\\
&=\int_0^1\left(\dfrac{1}{1+e^{-x}}+\dfrac{1}{1+e^{x}}\right)e^{ax^{2}}dx\\
&=\int_{0}^{\infty} e^{ax^{2}}dx\\ 
\end{align}$
$a<0$, perform the change of variable $y=\sqrt{|a|}x$,
$\begin{align} I&=\dfrac{1}{\sqrt{|a|}}\int_{0}^{\infty} e^{-x^{2}}dx\\
&=\dfrac{\sqrt{\pi}}{2\sqrt{|a|}}
\end{align}$
