TITLE: Evaluating $\int_0^{\infty} \frac {e^{-x}}{a^2 + \log^2 x}\, \mathrm d x$
QUESTION [12 upvotes]: I am trying to evaluate this integral
$$I=\int_0^{\infty} \frac {e^{-x}}{a^2 + \log^2 x}\, \mathrm d x$$
for $a \in \mathbb R_{>0}$.
Any ideas?
In the case $a=\pi$ we have $I= F - e$ where $F$ is the Fransén–Robinson constant.

REPLY [2 votes]: I didn't obtain a closed form but searched the expansions of $I(a)$ at $+\infty$ and $0$.
The function is smooth with some resemblance with a (faster decreasing) rectangular hyperbola.
Formal expansion as $\;a\to +\infty$ :
\begin{align}
I(a)&:=\int_0^{\infty} \frac {e^{-x}}{a^2 + (\log x)^2}\,dx\\
&=\frac 1{a^2}\int_0^{\infty}\sum_{n=0}^\infty  e^{-x}\left(-\left(\frac{\log x}a\right)^2\right)^{n}\,dx\\
&=\frac 1{a^2}\sum_{n=0}^\infty\frac {(-1)^n}{a^{2n}}\int_0^{\infty}  e^{-x}\left(\frac d{ds}\right)^{2n}\left.e^{s\log x}\right|_{s=0}\,dx\\
&=\sum_{n=0}^\infty\frac {(-1)^n}{a^{2(n+1)}}\left(\frac d{ds}\right)^{2n}\left.\int_0^{\infty} e^{-x} x^s\,dx\right|_{s=0}\\
&=\sum_{n=0}^\infty\frac {(-1)^n}{a^{2(n+1)}}\left.\Gamma^{(2n)}(1+s)\right|_{s=0}\\
\end{align}
Since $\;\Gamma^{(2n)}(1)\sim (2n)!\;$ the equality must be replaced by an asymptotic expansion :
$$\tag{1}\boxed{\displaystyle I(a)\sim \sum_{n\ge 0}\frac {(-1)^n\,\Gamma^{(2n)}(1)}{a^{2(n+1)}}},\quad a\to +\infty$$
The searched integral is thus a generating function for the even derivatives of $\,\Gamma$ at point $1$ :
it has the same expansion as  $\;\displaystyle \frac{\Gamma(1+i/a)+\Gamma(1-i/a)}{2\,a^2}\;$ for $\,a\to +\infty$  but without the even factorials at the denominators (i.e. without convergence of the whole series for $a>1$).
Let's add that each derivative $\Gamma^{(n)}(1)$ may be rewritten using the expansion of $\;\displaystyle\Gamma(1+x)=\exp\left({-\gamma\,x+\sum_{ k=2}^\infty\;\zeta(k)\dfrac{(-x)^k}k}\right)\;$ to get :
$$\tag{2}\Gamma(1+x)=\overbrace{1}^{\Gamma(1)}-\gamma x+\overbrace{\left(\gamma^2+\zeta(2)\right)}^{\Gamma^{\large{(2)}}(1)}\frac{x^2}{2!}-\left(\gamma^3+3\gamma\,\zeta(2)+2\zeta(3)\right)\frac{x^3}{3!}+\overbrace{\left(\gamma^4+6\gamma^2\zeta(2)+8\gamma\,\zeta(3)+\frac{27}2\zeta(4)\right)}^{\Gamma^{\large{(4)}}(1)}\frac{x^4}{4!}-\cdots$$
Update: An asymptotic expansion for a more general Laplace transform was given by Bouwkamp (ref. $1$ or ref. $2$) for $\sigma\ge 0$ :
$$\tag{3}t^{\sigma}\int_0^{\infty} \frac {x^{\sigma-1}e^{-t\,x}}{a^2 + (\log x)^2}\,dx\sim\sum_{n=0}^\infty\frac{\varphi_n(a,\sigma)}{(\log t)^{n+1}}\qquad(t\to\infty)$$
with the coefficients $\varphi_n$ obtained from the generating function :
$$\tag{4}\frac{\sin(ax)}a\Gamma(\sigma+x)=\sum_{n=0}^\infty \varphi_n(a,\sigma)\frac{x^n}{n!}$$
At this point it may be observed that if $I(a)$ is generalized to $\;\displaystyle I_{\sigma}(a):=\int_0^{\infty} \frac {x^{\,\sigma-1}e^{-x}}{a^2 + (\log x)^2}\,dx\,$
then a derivation similar to the obtention of $(1)$ (with an additional factor $x^{\,\sigma-1}$ in the integral) will simply replace $\,\Gamma^{(2n)}(1+s)\,$ by $\,\Gamma^{(2n)}(\sigma+s)$ and produce :
$$\tag{1'}\boxed{\displaystyle I_{\sigma}(a)\sim \sum_{n\ge 0}\frac {(-1)^n\,\Gamma^{(2n)}(\sigma)}{a^{2(n+1)}}},\quad a\to +\infty$$

Expansion as $a\to 0$: it is very regular too with a simple pole at $0$.
The substitution $\;x:=e^{-w}\;$ gives :
\begin{align}
I(a)&=\int_0^{\infty} \frac {e^{-x}}{(\log x)^2+a^2}\,dx\\
&=\int_{-\infty}^{\infty} \frac {e^{\large{-w-e^{-w}}}}{w^2+a^2}\,dw\\
&=-\frac 1a\;\operatorname{Im}\int_{-\infty}^{\infty} \frac {e^{\large{-w-e^{-w}}}}{w+ia}\,dw\\
&=-\frac 1a\;\operatorname{Im}\left[\int_{-\infty}^{\infty} \frac {e^{\large{-w-e^{-w}}}-e^{\large{ia-e^{ia}}}}{w+ia}\,dw+\int_{-\infty}^{\infty} \frac {e^{\large{ia-e^{ia}}}}{w+ia}\,dw\right]\\
&=-\frac 1a\;\operatorname{Im}\left[\int_{-\infty}^{\infty} \frac {e^{\large{-w-e^{-w}}}-e^{\large{ia-e^{ia}}}}{w+ia}\,dw-\pi i\, e^{\large{ia-e^{ia}}}\right]\\
\tag{5}I(a)&=E(a)+\frac{\pi}a\;\operatorname{Re}\left[e^{\large{ia-e^{\,ia}}}\right]\\
\end{align}
The odd part of $I(a)$ is given in closed form (at the right) so let's study the even part :
$$\tag{6}E(a):=-\frac 1a\;\operatorname{Im}\int_{-\infty}^{\infty} \frac {e^{\large{-w-e^{-w}}}-e^{\large{ia-e^{ia}}}}{w+ia}\,dw=\sum_{n\ge 0} K_{2n}\, a^{2n}$$
The integrand is an entire function (since of type $\,h_a(w):=\dfrac {f(w)-f(-ia)}{w-(-ia)},\ h_a(-ia)=f'(-ia)\;$ with $f(w):=e^{\large{-w-e^{-w}}}$ entire) and may thus be expanded in power series of $a$ as :
$$\tag{7}h_a(w)=\frac 1w\left[ e^{\large{-w-e^{-w}}}-e^{-1}\sum_{n\ge 0}\dfrac{\overline{B}_{n+1}}{n!}(ia)^n\right]\sum_{m\ge 0} \left(-\frac{ia}w\right)^m$$
where $\,\overline{B}_n\,$ is the $n$-th "complementary Bell number" generated by $\,e^{\large{1-e^{x}}}\,$ (with a shift of $1$ from the multiplication by $e^x$).
This allows to obtain integrals for the $K_{2n}$ coefficients of $\, a^{2n}$ (from $(6)$ we need only the imaginary part) :
$$\tag{8} K_{2n}= \frac{(-1)^n}e\int_{-\infty}^{\infty}\frac{e^{\large{\,1-w-e^{-w}}}-1}{w^{2n+2}}+\sum_{k=0}^{2n-1}\frac{\overline{B}_{2n+3}}{(k+2)!\,(-w)^{2n-k}}\;dw,\quad n>0$$
while $K_0$ may be integrated by parts and rewritten (using $\;x=e^{-w}\,$) as :
\begin{align}
K_0&=\int_{-\infty}^{\infty}\frac{e^{\large{-w-e^{-w}}}-e^{-1}}{w^{2}}dw\\
&=\left.-\frac 1x\left(e^{\large{-w-e^{-w}}}-e^{-1}\right)\right|_{-\infty}^{\infty}+\int_{-\infty}^{\infty}\frac {e^{-w}-1}x\,e^{\large{-w-e^{-w}}}\,dw\\
&=-\int_0^{\infty}\frac {x-1}{\log x}\,e^{-x}\,dx,\quad\text{but}\ \frac {x-1}{\log x}=\int_0^1 x^t\,dt\ \ \text{so that}\\
&=-\int_0^1\int_0^{\infty}x^{t}e^{-t}\,dt\\
&=-\int_0^1\Gamma(1+t)\,dt\\
\end{align}
Concerning numerical evaluation you may use :
$$\tag{9}I(a)\approx \sum_{n=0} K_{2n} a^{2n}+\frac{\pi}a\;\operatorname{Re}\left[e^{\large{ia-e^{\,ia}}}\right]$$
with
\begin{align}
K_0&\approx -0.9227459506806306051438804823457555774372343917106859152 \\
K_2&\approx -0.2818432097003410734482737060285029254823027754542059884\\
K_4&\approx -0.010603155563385929453669193499488685330976821362\\
K_6&\approx +0.01391725152703237611983369670383107076359973\\
K_8&\approx +0.002934676571947851378554083839156926455\\
K_{10}&\approx -0.000021228852199696308226770734336
\end{align}
Note that the coefficients of $\,a^{2n-1}\,$ are too related to the complementary Bell numbers by $\;\displaystyle K_{2n-1}=-(-1)^n\frac{\overline{B}_{2n+1}}{(2n)!}\,\frac {\pi}e\;$ with the odd part expanded as :
$$\frac {\pi}e\left[\frac 1a+\frac a{2!}+\frac{2\,a^3}{4!}-\frac{9\,a^5}{6!}-\frac{267\,a^7}{8!}-\frac{2180\,a^9}{10!}+\cdots\right]$$
Ref:

C. J. Bouwkamp $(1972)$ "Note on an asymptotic expansion".
S. G. Llewellyn Smith $(2000)$ "The asymptotic behaviour of Ramanujan's integral and its application to two-dimensional diffusion-like equations".
R. Wong $(1975)$ "On Laplace transforms near the origin"