# Closed-form integral $\int_{-1}^1 e^{a x^2 + bx}/\sqrt{1-x^2}dx$

Is there a closed-form analytic solution to the integral $$F(a,b) = \int_{-1}^1 \frac{e^{a x^2 + b x}}{\sqrt{1-x^2}}dx = \int_{0}^{\pi} e^{a \cos^2\theta + b \cos \theta}d\theta$$ where $a$ and $b$ are real? I am only aware of analytic results for special values with the modified Bessel function of the first kind $I_0(x)$: \begin{align} F(a,0)&=\pi e^{a/2} I_0(a/2), \\ F(0,b)&=\pi I_0(b). \end{align} If there is no closed-form analytical result in the general case, what is the asymptotic solution for small positive $a^{-1}$ and $b^{-1}$.

• Good one. I was stuck at this integral too. I believe this can be solved by using the generating function of the Bessel functions - to obtain the series solution – Yuriy S Aug 3 '16 at 13:53
• It seems that for $a=b\gg1$ the dominant contribution is from the right end point and goes like $\frac{\sqrt{\pi}\exp(2a)}{\sqrt{6a}}$ – tired Aug 3 '16 at 14:05
• what do we know about the variables? – Dr. Sonnhard Graubner Aug 3 '16 at 14:20

First of all, i don't think a closed form for this integral exists so i will stick to numerics which will yield an excellent approximation in the end.

Assuming $a\gg1$ or $b\gg1$, the integral will be always dominated by the right endpoint, because a) we have an integrable singularity there and b) $a x^2$ and $b x$ have the same sign. We can therefore conclude that the integral in question is asymptotically equal to

$$F(a,b)\sim \int_{1-\epsilon}^1dx\frac{e^{a x^2+b x}}{\sqrt{1-x^2}}\sim \sqrt{\frac{1}{2}}\int_{1-\epsilon}^1dx\frac{e^{a x^2+b x}}{\sqrt{1-x}}$$

because we expect only exponentially small corrections if we enlarge our domain of integration we may push it all the way down to minus infinity. Furthermore we might expand the exponent around $x=1$: $ax^2+bx\sim a+b+(2a+b)(x-1)+\mathcal{O}(x-1)^2$ so we are down to

$$F(a,b)\sim \sqrt{\frac{1}{2}}e^{a+b}\int_{-\infty}^1dx\frac{e^{(2a+b)(x-1) }}{\sqrt{1-x}}$$

this can be brought into the form of a standard Gaussian integral and so we end up with

$$F(a,b)\sim \sqrt{\frac{\pi}{2}}\frac{e^{a+b}}{\sqrt{2a+b}}$$

which is asymtotically equal to the two limiting cases calculated by OP. Below we have a logaritmic plot, comparing numerics (dotted,blue) and asymptotics (red,full) for the case $a=10b$

Using exactly the same kind of reasoning we find that the second endpoint yields contributions $\sim e^{a-b}\ll e^{a+b}$ for $a,b>0$ so we can safely neglect them

• Does it also work for a=0.1b and for the intermediate case a=b? – bkocsis Aug 3 '16 at 17:20
• ´@bkocsis yes it should work in both cases... – tired Aug 3 '16 at 18:32
• ....but in the limit $b\rightarrow 0$ the second endpoint becomes equaly important – tired Aug 3 '16 at 18:41

$$\int_{-1}^1\dfrac{e^{ax^2+bx}}{\sqrt{1-x^2}}~dx$$

$$=\int_\pi^0\dfrac{e^{a\cos^2\theta+b\cos\theta}}{\sqrt{1-\cos^2\theta}}~d(\cos\theta)$$

$$=\int_0^\pi e^{a\cos^2\theta+b\cos\theta}~d\theta$$

$$=\int_0^\pi\sum\limits_{n=0}^\infty\dfrac{(a\cos^2\theta+b\cos\theta)^n}{n!}~d\theta$$

$$=\int_0^\pi\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{C_k^na^kb^{n-k}\cos^{n+k}\theta}{n!}~d\theta$$

$$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta+\int_\frac{\pi}{2}^\pi\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta$$

$$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta+\int_\frac{\pi}{2}^0\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{a^kb^{n-k}\cos^{n+k}(\pi-\theta)}{k!(n-k)!}~d(\pi-\theta)$$

$$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta+\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(-1)^{n+k}a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta$$

$$=\int_0^\frac{\pi}{2}\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(1+(-1)^{n+k})a^kb^{n-k}\cos^{n+k}\theta}{k!(n-k)!}~d\theta$$

$$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(1+(-1)^{n+k})a^kb^{n-k}B\left(\dfrac{n+k+1}{2},\dfrac{1}{2}\right)}{2k!(n-k)!}$$ (according to http://mathworld.wolfram.com/BetaFunction.html)

$$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^n\dfrac{(1+(-1)^{n+k})a^kb^{n-k}\Gamma\left(\dfrac{n+k+1}{2}\right)\Gamma\left(\dfrac{1}{2}\right)}{2k!(n-k)!\Gamma\left(\dfrac{n+k}{2}+1\right)}$$

$$=\sum\limits_{k=0}^\infty\sum\limits_{n=k}^\infty\dfrac{(1+(-1)^{n+k})a^kb^{n-k}\Gamma\left(\dfrac{n+k+1}{2}\right)\sqrt\pi}{2k!(n-k)!\Gamma\left(\dfrac{n+k}{2}+1\right)}$$

$$=\sum\limits_{k=0}^\infty\sum\limits_{n=0}^\infty\dfrac{(1+(-1)^{n+2k})a^kb^n\Gamma\left(\dfrac{n+1}{2}+k\right)\sqrt\pi}{2k!n!\Gamma\left(\dfrac{n}{2}+k+1\right)}$$

$$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^\infty\dfrac{a^kb^{2n}\Gamma\left(n+k+\dfrac{1}{2}\right)\sqrt\pi}{k!(2n)!\Gamma(n+k+1)}$$

$$=\sum\limits_{n=0}^\infty\sum\limits_{k=0}^\infty\dfrac{a^kb^{2n}\Gamma\left(n+k+\dfrac{1}{2}\right)\pi}{4^nk!n!\Gamma\left(n+\dfrac{1}{2}\right)\Gamma(n+k+1)}$$


The picture shows $\pars{~\mbox{see expression}\ \eqref{1}~}$ , for instance, the error $\ds{\delta \equiv \verts{{\mc{F}\pars{a,10a} \over \mrm{F}\pars{a,10a}} - 1} \times 100\ \%}$ as a function of $\ds{a \in \bracks{100,200}}$. $\ds{\underline{Note}}$ that $\ds{\delta \sim 10^{-3}\ \%}$.

• How do get the approximate term for the integrand when $a,b\gg 1$? Do you expand the exponent to second order in $t$? – bkocsis Aug 28 '16 at 19:02
• @bkocsis The integrand is a function of $t^{2}$. So, the second term in the expansion is $\propto t^{2}$. This is $\texttt{Laplace Method}$ you can check here => en.wikipedia.org/wiki/Laplace%27s_method . The main contribution comes from $t \gtrsim 0$ because $2a + b\tanh\left(\, b\, \right) - {1 \over 4}$ is 'very large'. – Felix Marin Aug 28 '16 at 20:47
• Thanks. How can I apply this method if $b$ is finite and only $a$ approaches infinity? This may help me with another problem too, math.stackexchange.com/questions/1908249/… – bkocsis Aug 30 '16 at 9:31