# Analytic solution to integral with exponentiated logarithm squared

I came across this integral in Vaughan (2005) (eq. 21) and I was wondering if there could be an analytical solution to it.

$$I = \int_0^\infty e^{-a \ln^2(x) - b x} \,\mathrm{d}x$$ with $$a,b > 0$$.

So far it has proven impenetrable to my usual arsenal of integration tricks.

Motivation: I've approximated this integral numerically in python using scipy, but I typically have to do this for $$>10^4$$ different values of $$a$$ and $$b$$ which tends to take a tremendously long time. I'm hoping that a analytical solution will be faster to compute.

What I have tried:

Making the substitution: $$u = \ln(x)$$, the integral can be rewritten as $$I = \int_{-\infty}^\infty \exp\left(-a u^2 + u - b e^u \right) \,\mathrm{d}u = \int_{-\infty}^\infty f'(u) g(u) \,\mathrm{d}u$$ Using $$f(x) = -\frac{1}{b} e^{-be^x}$$ and $$g(x) = e^{-ax^2}$$
with $$f'(x) = e^{-be^x + x}$$ and $$g'(x) = -2ax e^{-ax^2}$$,
I tried integration by parts. However this just leads to another similar integral which is no easier to solve. $$I = -\frac{2a}{b}\int_{-\infty}^\infty u \exp(-a u^2 -b e^u)\,\mathrm{d}u$$

• Do not dream too much ! This is a real monster. Commented Sep 17, 2019 at 13:59
• The second is, in my humble opinion, worse than the original one for numerical integration (I tried). Commented Sep 17, 2019 at 14:27
• Yip! "A real monster" seems like a good description! ;P Commented Sep 18, 2019 at 13:22

Hint:

Approach $$1$$:

$$\int_0^\infty e^{-a\ln^2x-bx}~dx$$

$$=\int_{-\infty}^\infty e^{-au^2-be^u}~d(e^u)$$

$$=-\dfrac{1}{b}\int_{-\infty}^\infty e^{-au^2}~d(e^{-be^u})$$

$$=-\left[\dfrac{e^{-au^2-be^u}}{b}\right]_{-\infty}^\infty+\dfrac{1}{b}\int_{-\infty}^\infty e^{-be^u}~d(e^{-au^2})$$

$$=-\dfrac{2a}{b}\int_{-\infty}^\infty ue^{-au^2}e^{-be^u}~du$$

$$=-\dfrac{2a}{b}\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{(-1)^nb^nue^{nu-au^2}}{n!}~du$$

$$=\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{2(-1)^{n-1}ab^{n-1}ue^{-a\left(u^2-\frac{nu}{a}\right)}}{n!}~du$$

$$=\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{2(-1)^{n-1}ab^{n-1}ue^{-a\left(u^2-\frac{nu}{a}+\frac{n^2}{4a^2}-\frac{n^2}{4a^2}\right)}}{n!}~du$$

$$=\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{2(-1)^{n-1}ab^{n-1}e^\frac{n^2}{4a}ue^{-a\left(u-\frac{n}{2a}\right)^2}}{n!}~du$$

$$=\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{2(-1)^{n-1}ab^{n-1}e^\frac{n^2}{4a}\left(v+\dfrac{n}{2a}\right)e^{-av^2}}{n!}~dv$$

$$=\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{2(-1)^{n-1}ab^{n-1}e^\frac{n^2}{4a}ve^{-av^2}}{n!}~dv+\int_{-\infty}^\infty\sum\limits_{n=0}^\infty\dfrac{(-1)^{n-1}b^{n-1}ne^\frac{n^2}{4a}e^{-av^2}}{n!}~dv$$

$$=\sum\limits_{n=1}^\infty\dfrac{(-1)^{n-1}b^{n-1}e^\frac{n^2}{4a}\sqrt\pi}{(n-1)!\sqrt a}$$

$$=\sum\limits_{n=0}^\infty\dfrac{(-1)^nb^ne^\frac{(n+1)^2}{4a}\sqrt\pi}{n!\sqrt a}$$

But this approach fails as the infinite series diverges

• I'm impressed, didn't think this one could be cracked! Commented Oct 8, 2019 at 5:03
• I've upvoted, but my rep is too low at the moment for my vote to show up! Commented Oct 8, 2019 at 5:11
• One problem: This series can be shown to diverge using the ratio test. Commented Oct 11, 2019 at 11:28
• I think this may be one of the rare occasions where it is not permitted to swap the order of the integral and the sum. If $$f(v,n) = \frac{(-b)^{n-1}}{(n-1)!} e^{-av^2 + \frac{n^2}{4a}}$$ then $$\int \left| f(v,n) \right| d(v, n) \rightarrow \infty$$ so the condition for Fubini's theorem fails. Commented Oct 11, 2019 at 17:47