# Arc contribution in $\int_{-\infty}^\infty \mathrm{d}z \frac{e^{-z^2}}{z-1}$

Consider an improper integral with a pole on the integration contour at say $z=1$,

$$\tag{1} I = \int_{-\infty}^\infty \mathrm{d}z\ \frac{e^{-z^2}}{z-1+i\epsilon},~~~~~\epsilon>0.$$ Let $$f(z) = \frac{e^{-z^2}}{z-1+i\epsilon}$$ then $$\sum_{residues~inside~\Gamma} = 0 = \oint_\Gamma f(z) = I+\left(\int_{\Gamma_\epsilon}+\int_{\Gamma_\infty} \right) f(z),$$ where the total contour is $\Gamma\equiv (-R,R)+\Gamma_\epsilon+\Gamma_\infty$ with $R\rightarrow \infty$.

Thus $$I = - \left(\int_{\Gamma_\epsilon}+\int_{\Gamma_\infty} \right) f(z).$$ The contour $\Gamma_\epsilon$ is a semicircle centered about $z = 1$ of radius $\epsilon$. Its contribution is given by $$\int_{\Gamma_\epsilon} \mathrm{d}z ~f(z) = i (\theta_2-\theta_1)~ \mathrm{Res}(f;z=1) = \frac{-i\pi}{e}.$$

Evaluating $(1)$ in Mathematica and taking the $\epsilon\rightarrow 0$ limit gives $$I = e^{(\epsilon +i)^2} \left(-\pi \text{erfi}(1-i \epsilon )+\log (-1+i \epsilon )+\log \left(\frac{i}{\epsilon +i}\right)-2 i \pi \right) \\ \longrightarrow -\frac{\pi (\text{erfi}(1)+i)}{e}~~~(\text{as}~ \epsilon \rightarrow 0).$$

Thus apparently, $$\tag{2} \int_{\Gamma_\infty} \mathrm{d}z \, f(z) = \frac{2\pi i}{e}+\frac{\mathrm{erfi}(1)}{e}.$$

Can anyone derive this contribution from the semicircle at infinity? I.e. is $(2)$ correct and how about generalizations of $(1)$ to integrals of the form

$$\tag{3} I = \int_{-\infty}^\infty \mathrm{d}z\ \frac{z^n e^{-z^2}}{(z-a+i\epsilon)(z-b-i\epsilon)},~~~~~\epsilon>0,a,b\in\mathbb{R},n\in \mathbb{N}.$$

Note, erfi is defined as $\mathrm{erfi}(z) \equiv \mathrm{erf}(iz)/i$ with the familiar error function.

• Why do you have $\Gamma_\epsilon$? There's no pole on or above the real axis. Also, even if there were, you should be shrinking the radius of that component towards that pole. – Eric Towers Apr 23 '18 at 13:11
• I was thinking that for $\epsilon\rightarrow 0$ the pole is at $z=1$ i.e. on the real axis hence we must indent the contour over it. – Your Majesty Apr 23 '18 at 13:13
• This happens for no nonzero $\epsilon$, so no deflection is needed. – Eric Towers Apr 23 '18 at 13:14
• Finite you mean $\epsilon>0$? But I do take the zero limit in the above formulas. – Your Majesty Apr 23 '18 at 13:16
• I have a bounty to give! Don't miss it! – user 1357113 Apr 28 '18 at 13:53

To check your work: if you care about a fast solution, start with considering $I(a)= \int_{-\infty}^{\infty}\frac{e^{-a(x^2-1)}}{x-1}\textrm{dx}$, where by differentiating with respect to $a$ and then integrating back, we're lead to $I(1)=-\sqrt{\pi}\int_0^1 \frac{e^a}{\sqrt{a}}\textrm{d}a=-\pi\operatorname{erfi}(1).$ Hence, we have $$\int_{-\infty}^{\infty}\frac{e^{-x^2}}{x-1}\textrm{dx}=-\frac{\pi}{e}\operatorname{erfi}(1).$$

Note: the integrals above have a meaning only in the CPV sense as seen described at https://en.wikipedia.org/wiki/Cauchy_principal_value.

Literature: related to Faddeeva function (it's sometimes referred to as the plasma dispersion function) - https://en.wikipedia.org/wiki/Faddeeva_function.

• Let's forget about the $i\epsilon$ for a minute. I compute $PV\int_{-\infty}^\infty\frac{e^{-x^2}}{x-1} = -\pi e^{-1}\mathrm{erfi}(1) = + i \pi e^{-1} \mathrm{erf}(i)$. Indenting over the pole at $x=1$ gives $-i\pi \mathrm{Res}(f,1) = -i\pi e^{-1}$. Clearly these two don't cancel to yield zero as the closed loop integrals contains no poles, the total contribution should be zero. The only contribution left is that from the arc at infinity. – Your Majesty Apr 23 '18 at 16:45
• @JustAsk I'm investigating the point. – user 1357113 Apr 23 '18 at 17:00
• @JustAsk You're perfectly right. My investigations shows the contribution comes from the sum of the integrals $\int_{\Gamma_\infty, \theta \in [\pi/4,\pi/2]}$ and $\int_{\Gamma_\infty \theta \in [\pi/2,3\pi/4]}$ on the big arc. Again, both integrals must be viewed in terms of PVC, since separately both blow up to $\infty$. The reamining two integrals on the big arc vanish through the ML inequality. – user 1357113 Apr 23 '18 at 17:56
• OK it would be nice if you'd write it up as an answer. – Your Majesty Apr 23 '18 at 18:04
• @JustAsk What's curious to me is that you're fine with getting $PV\int_{-\infty}^\infty\frac{e^{-x^2}}{x-1}$ by real methods. I initially thought you wanted to compute everything by contour integration. Not sure why you would want to know what's happening on the big arc in this case. – user 1357113 Apr 23 '18 at 19:04

Near the top of the arc, the integrand blows up exponentially. I would avoid using that arc.

Real Method

By substituting $$z\mapsto-z$$, we get $$\operatorname{PV}\int_{-\infty}^\infty\frac{e^{-z^2}}{z-1}\mathrm{d}z =-\operatorname{PV}\int_{-\infty}^\infty\frac{e^{-z^2}}{z+1}\mathrm{d}z\tag1$$ Therefore, \begin{align} \operatorname{PV}\int_{-\infty}^\infty\frac{e^{-z^2-1}e^{-2z}}{z}\mathrm{d}z &=-\operatorname{PV}\int_{-\infty}^\infty\frac{e^{-z^2-1}e^{2z}}{z}\mathrm{d}z\tag2\\ &=-\frac1e\int_{-\infty}^\infty e^{-z^2}\frac{\sinh(2z)}z\,\mathrm{d}z\tag3 \end{align} Explanation:
$$(2)$$: substitute $$z\mapsto z+1$$ on the left and $$z\mapsto z-1$$ on the right of $$(1)$$
$$(3)$$: average the right and left of $$(2)$$

Setting $$f(a)=\int_{-\infty}^\infty e^{-z^2}\frac{\sinh(az)}z\,\mathrm{d}z\tag4$$ we have $$f(0)=0$$ and \begin{align} f'(a) &=\int_{-\infty}^\infty e^{-z^2}\cosh(az)\,\mathrm{d}z\tag5\\ &=\int_{-\infty}^\infty e^{-z^2}e^{az}\,\mathrm{d}z\tag6\\ &=e^{a^2/4}\int_{-\infty}^\infty e^{-z^2}\,\mathrm{d}z\tag7\\[3pt] &=\sqrt\pi\,e^{a^2/4}\tag8 \end{align} Explanation:
$$(5)$$: take the derivative under the integral
$$(6)$$: $$\cosh(ax)$$ is the even part of $$e^{ax}$$
$$(7)$$: substitute $$z\mapsto z+a/2$$
$$(8)$$: evaluate the integral

Thus, \begin{align} \operatorname{PV}\int_{-\infty}^\infty\frac{e^{-z^2}}{z-1}\mathrm{d}z &=-\frac1e\int_{-\infty}^\infty e^{-z^2}\frac{\sinh(2z)}z\,\mathrm{d}z\tag9\\ &=-\frac{\sqrt\pi}e\int_0^2e^{a^2/4}\,\mathrm{d}a\tag{10}\\ &=-\frac{2\sqrt\pi}e\int_0^1e^{a^2}\,\mathrm{d}a\tag{11}\\[3pt] &=-\frac\pi{e}\,\operatorname{erfi}(1)\tag{12} \end{align} Explanation:
$$\phantom{0}(9)$$: apply $$(3)$$
$$(10)$$: apply $$(8)$$
$$(11)$$: substitute $$a\mapsto2a$$
$$(12)$$: evaluate the integral

A Cleaner, But Still Real, Approach \begin{align} \mathrm{PV}\int_{-\infty}^\infty\frac{e^{-x^2}}{x-1}\,\mathrm{d}x &=-\mathrm{PV}\int_{-\infty}^\infty\frac{e^{-x^2}}{x+1}\,\mathrm{d}x\tag{13}\\ &=\mathrm{PV}\int_{-\infty}^\infty\frac{e^{-x^2}}{x^2-1}\,\mathrm{d}x\tag{14}\\ &=\left.\frac1e\,\mathrm{PV}\int_{-\infty}^\infty\frac{e^{-a(x^2-1)}}{x^2-1}\,\mathrm{d}x\,\right]_{a=1}\tag{15}\\ &=\frac1e\,\mathrm{PV}\int_{-\infty}^\infty\frac1{x^2-1}\,\mathrm{d}x-\frac1e\int_0^1\int_{-\infty}^\infty e^{-a(x^2-1)}\,\mathrm{d}x\,\mathrm{d}a\tag{16}\\ &=0-\frac1e\int_0^1\sqrt{\frac\pi a}\,e^a\,\mathrm{d}a\tag{17}\\ &=-\frac{2\sqrt\pi}e\int_0^1e^{a^2}\,\mathrm{d}a\tag{18}\\ &=-\frac{2\sqrt\pi}e\frac{\sqrt\pi}2\,\operatorname{erfi}(1)\tag{19}\\[6pt] &=-\frac\pi e\,\operatorname{erfi}(1)\tag{20} \end{align} Explanation:
$$(13)$$: substitute $$x\mapsto-x$$
$$(14)$$: average the left and right sides of $$(13)$$
$$(15)$$: set up for differentiation under the integral
$$(16)$$: write as the integral of the derivative under the integral
$$(17)$$: the PV can be evaluated using a simple contour integration
$$\phantom{(17)\text{:}}$$ evaluate the inner integral on the right
$$(18)$$: substitute $$a\mapsto a^2$$
$$(19)$$: evaluate the integral
$$(20)$$: simplify

which agrees with $$(12)$$.

• It would be nice finding a way of getting the value of the integral over the real line by contour integration exclusively. – user 1357113 Apr 25 '18 at 17:35
• @Waiting: I agree, but I don't think it is going to use the big arc as that way madness lies. SInce erfi is involved, it might be difficult to find a significantly different path. – robjohn Apr 25 '18 at 18:24
• King Lear? Interesting that my requirements make you think of the Shakespeare literature (due to the development of things on the big arc). :-) – user 1357113 Apr 26 '18 at 15:44
• @Waiting: I tried again for quite some time yesterday to try finding a contour integration solution for this problem, but was unable. Since you've awarded the bounty to me, I will continue looking and hopefully find a way to earn it. – robjohn May 3 '18 at 14:09
• sure, no need to hurry with that. I think this is an interesting question whose answer might open the gate for solutions to more difficult questions similar to this one. After all, I'm glad I could give you the bounty. :-) (some questions simply need more thinking time) – user 1357113 May 3 '18 at 15:11

The contribution from the (superfluous) deformation of the segment on $[0,2]$ to a semicircle is cancelled by other parts of the integral along the real axis. This deformation crosses no poles, so the path integral along $\Gamma_\epsilon + [0,2]$ is zero.

So what's going on? In your expression $$I+\left(\int_{\Gamma_\epsilon}+\int_{\Gamma_\infty} \right) f(z) \text{,}$$ you have two paths from $0$ to $2$. One runs along the real axis and is contributed by $I$. The other runs along $\Gamma_\epsilon$. It should come as no surprise that this contribution is overcounted in the result you have.


Note that $\ds{\,\mrm{erf}\pars{\ic} = \ic\,\mrm{erfi}\pars{1}}$.