Integral including functions $\operatorname{erfc}(.), \exp(.) $ and $ \cos(.)$

analysisintegration

I have following integral. MATHEMATICA evaluates it as follows for $a>0$:
$$I=\int_{0}^{\pi/2}\cos (\theta ) e^{a^2 \cos ^2(\theta )} \text{erfc}(a \cos (\theta ))d\theta=\frac{\sqrt{\pi } \left(1-e^{a^2} \text{erfc}\left(a\right)\right)}{2 a}$$

However, I have no clue how this result comes. I have checked few integral table books such as Table of Integrals, Series, and Products, and also functions.wolfram.com. But I could not find matching expressions.

Does anyone have an idea?

Best Answer

Probably not the most direct way to obtain the result, but one possible method: From the integral representation DLMF \begin{equation} \int_{0}^{\infty}\frac{e^{-a^2t}}{\sqrt{t+\cos^{2}\theta}}\mathrm{d}t=\frac{\sqrt{\pi}}{a}e^{a^2\cos^{2}\theta}\operatorname{erfc}\left(a\cos\theta\right) \tag{1}\label{1} \end{equation} the integral can be transformed into \begin{equation} I=\frac{a}{\sqrt{\pi}}\int_{0}^{\pi/2}\cos \theta \,d\theta \int_{0}^{\infty}\frac{e^{-a^2t}}{\sqrt{t+\cos^{2}\theta}}\,\mathrm{d}t \end{equation} By changing the integration order, \begin{align} I&=\frac{a}{\sqrt{\pi}}\int_{0}^{\infty}e^{-a^2t}\,dt\int_{0}^{\pi/2}\frac{\cos \theta }{\sqrt{t+1-\sin^2\theta}}\,d\theta\\ &=\frac{a}{\sqrt{\pi}}\int_{0}^{\infty}e^{-a^2t}\arcsin \frac{1}{\sqrt{t+1}}\,dt \end{align} Now, integrating by parts, ($u'=e^{-a^2t},v=\arcsin \frac{1}{\sqrt{t+1}}$), we get \begin{align} I&=\frac{a}{\sqrt{\pi}}\left[\frac{\pi}{2a^2}-\frac{1}{2a^2}\int_{0}^{\infty}\frac{e^{-a^2t}}{\sqrt{t}(t+1)} \right]\\ &=\frac{a}{\sqrt{\pi}}\left[\frac{\pi}{2a^2}-\frac{1}{a^2}\int_{0}^{\infty}\frac{e^{-a^2u^2}}{u^2+1} \right] \end{align} (by changing $t=u^2$). Using the integral representation DLMF \begin{equation} \operatorname{erfc}(a)=\frac{2}{\pi}e^{-a^{2}}\int_{0}^{\infty}\frac{e^{-a^{2}u^% {2}}}{u^{2}+1}\mathrm{d}u \tag{2}\label{2} \end{equation} the final result is obtained: \begin{equation} I= \frac{\sqrt{\pi } \left(1-e^{a^2} \operatorname{erfc}\left(a\right)\right)}{2 a} \end{equation} \eqref{1} This identity is retrieved by changing $t=u^2-\cos^2\theta$ in the integral.

\eqref{2} With $A=a^2$, defining \begin{align} J(A)&=\frac{2}{\pi}\int_0^\infty\frac{e^{-A\left( u^2+1 \right)}}{u^2+1}\\ \frac{dJ(A)}{dA}&=-\frac{2}{\pi}\int_0^\infty e^{-A\left( u^2+1 \right)}\,du\\ &=-\frac{1}{\sqrt{\pi A}}e^{-A} \end{align} and remarking that $J(0)=1$, \begin{align} J(A)&=1-\frac{1}{\sqrt{\pi}}\int_0^A\frac{e^{-s}}{\sqrt{s}}\,ds\\ &=1-\operatorname{erf}(a) \end{align}