I'm looking to evaluate $$\int_{-\infty}^{\infty} \frac{e^{-{ax}^2}}{1+x^2} dx$$ where $a$ is real.

The "obvious" thing to try is a semi-circular contour integral in the upper or lower half plane, but this doesn't work because $e^{-{ax}^2}$ blows up along the imaginary axis.

  • $\begingroup$ I posted an answer, but I see that this question is missing context, so I removed my answer. Please give more context. Providing context not only assures that this is not simply copied from a homework assignment, but also allows answers to be better directed at where the problem lies and to be within the proper scope. $\endgroup$ – robjohn Dec 25 '17 at 0:54
  • $\begingroup$ @robjohn This is an integral I ran into years ago related to Kirchhoff diffraction. Wolfram Alpha gives a solution, but I was interested to see a proof. There's not much more context than that. $\endgroup$ – Yly Dec 26 '17 at 6:07
  • $\begingroup$ It would be nice to preface the question with that information. I might add some context to my answer and undelete it, as long as Mark Viola doesn't think it is too close to his answer. $\endgroup$ – robjohn Dec 26 '17 at 14:29

Let $F(a)$ be given by the integral

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

for $a>0$.

Then the derivative $F'(a)$ of $F(a)$ is

$$\begin{align} F'(a)&=-\int_{-\infty}^\infty \frac{x^2e^{-ax^2}}{1+x^2}\,dx\\\\ &=F(a)-\int_{-\infty}^\infty e^{-ax^2}\,dx\\\\ &=F(a)-\sqrt{\frac{\pi}{a}} \end{align}$$

Hence, $F(a)$ satisfies the ODE $F'(a)-F(a)=-\sqrt{\frac{\pi}{a}}$ subject to $F(0)=\pi$. Solution to that ODE can be written

$$\begin{align} F(a)&=e^a \left(\pi -\sqrt \pi \int_0^a \frac{e^{-x}}{\sqrt x}\,dx\right)\\\\ &=e^a\left(\pi -\pi \frac{2}{\sqrt \pi}\int_0^{\sqrt a}e^{-x^2}\,dx\right)\\\\ &=\pi e^a \left(1-\text{erf}(\sqrt a)\right)\\\\ &=\pi e^a \text{erfc}(\sqrt a) \end{align}$$

where $\text{erf(x)}=\frac2{\sqrt \pi}\int_0^x e^{-t^2}\,dt$ is the error function and $\text{erfc}(x)=\frac2{\sqrt \pi}\int_x^\infty e^{-t^2}\,dt=1-\text{erf}(x)$ is the complementary error function.

  • $\begingroup$ This is more of a nitpick, but I think you left out a factor of $\frac{2}{\sqrt{\pi}}$ between the first and second line of the final derivation $\endgroup$ – Dylan Dec 25 '17 at 0:01
  • $\begingroup$ (+1) I see that the answer I just posted is similar to yours, only slightly different. If it feels too close, I will delete it. $\endgroup$ – robjohn Dec 25 '17 at 0:42
  • $\begingroup$ I have removed my answer due to the fact that the question is missing context. $\endgroup$ – robjohn Dec 25 '17 at 0:55
  • $\begingroup$ Rob, thank you for the up vote. Much appreciative. $\endgroup$ – Mark Viola Dec 25 '17 at 1:29
  • $\begingroup$ @Dylan Nice catch. I've edited accordingly. $\endgroup$ – Mark Viola Dec 25 '17 at 1:29

We need $a\geq 0$ to ensure convergence. Assuming $a>0$, the Fourier transform of $\frac{1}{1+x^2}$ is $\sqrt{\frac{\pi}{2}} e^{-|s|}$ and the Fourier transform of $e^{-ax^2}$ is $\frac{1}{\sqrt{2a}}e^{-\frac{s^2}{4a}}$, hence the original integral equals $$\sqrt{\frac{\pi}{a}}\int_{0}^{+\infty}\exp\left(-\frac{s^2}{4a}-s\right)\,ds = \color{red}{\pi e^a\text{Erfc}\sqrt{a}} $$ which is not an elementary function and depends on the CDF of a normal random variable.

  • $\begingroup$ Nice. To clarify for those not versed in functional analysis: This argument appeals to the unitarity of the Fourier transform. The integral in question is the $L^2$ inner product of $1/(1+x^2)$ and $\exp(-ax^2)$. Taking Fourier transforms of both functions doesn't change the inner product, by unitarity. $\endgroup$ – Yly Dec 24 '17 at 23:48
  • $\begingroup$ Also, you speak of "inverse Fourier transform" of $\exp(-ax^2)$, which should properly be "Fourier transform", though it doesn't matter in this case, as the two are the same. $\endgroup$ – Yly Dec 24 '17 at 23:49

We can apply Feynmann's Differentiation Under the Integral Trick.

Let $$ f(a)=\int_{-\infty}^\infty\frac{e^{-ax^2}}{1+x^2}\,\mathrm{d}x $$ Then $f(a)-f'(a)=\int_{-\infty}^\infty e^{-ax^2}\,\mathrm{d}x=\sqrt{\frac\pi a}$. Multiply by $-e^{-a}$ and get $$ \left(e^{-a}f(a)\right)'=-e^{-a}\sqrt{\frac\pi a} $$ Thus, $$\newcommand{\erf}{\operatorname{erf}} \begin{align} e^{-a}f(a) &=\pi-\int_0^ae^{-t}\sqrt{\frac\pi t}\,\mathrm{d}t\\ &=\pi-2\sqrt\pi\int_0^{\sqrt{a}}e^{-t^2}\,\mathrm{d}t\\[6pt] &=\pi-\pi\erf\left(\sqrt{a}\right) \end{align} $$ So that $$ f(a)=\pi e^a\left(1-\erf\left(\sqrt{a}\right)\right) $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.