# Integrating $\log(-ix)\exp(-ix)/x^2$

I would like to compute a few integrals like $$\int_{-\infty}^\infty\frac{\log(-ix)\exp(-ix)}{x^2}\,dx$$ To be clear, here the path of integration is really $$z = \epsilon i + x$$, so that it avoids the singularity at $$x=0$$, and the branch cut of $$\log$$. This expression is "well-behaved" in several ways: it falls off faster than $$1/x^{3/2}$$ on the real line, so it converges decently quickly; in fact, falls off quickly everywhere in the lower half-plane of $$z$$. Exponentially quickly, thanks to the $$\exp$$ term. The function is holomorphic everywhere except the branch cut at $$x\le 0$$, so I can deform it pretty easily.

The $$\log \exp / x^k$$ form seems impossible to find an antiderivative for. So this seems like something that should be doable using Cauchy residue theorem and related tricks. The function grows quickly on the upper half plane, so I can't just deform it "up and away" and show that it's zero. One can easily reduce it to a keyhole contour around the branch cut, but neither the "along the cut" nor the "around the pole" term are zero, they both depend on the radius of the keyhole, and neither one seems solvable analytically.

Anyone have tricks to tackle this?

• So what is your question in one senctence? Feb 22 '21 at 23:47
• How do I evaluate this integral? Feb 22 '21 at 23:49
• If by "one line" you mean going up and down the branch cut, yes, that's what I meant by "keyhole". I might've misused the term. I don't see how splitting the log helps, other than that it (confusingly) means we have to use a branch cut in a nonstandard location. Feb 22 '21 at 23:53
• Do we mean the same line $[-\infty+i\varepsilon,\infty+i\varepsilon]$? Feb 22 '21 at 23:55
• No, it's about -2.65643. Feb 23 '21 at 0:16

Assuming $$\epsilon>0$$, the given integral, after the substitution $$-ix=z$$, is $$i\int_{\epsilon-i\infty}^{\epsilon+i\infty}z^{-2}e^z\log z\,dz=-if'(2),\qquad f(s)=\int_{\epsilon-i\infty}^{\epsilon+i\infty}z^{-s}e^z\,dz=\frac{2\pi i}{\Gamma(s)}$$ (the last equality is basically Hankel's integral). The final result is then $$\color{blue}{-2\pi(1-\gamma)}$$.