Evaluating $\int_{-\infty}^\infty \frac{\sin x}{x-i} dx$

I would like to evaluate the integral $$\int_{-\infty}^\infty \frac{\sin x}{x-i} dx,$$ which I believe should be equal to $\frac{\pi}{e}$. However, I cannot reproduce this result by hand. My work is as follows: first, we evaluate the indefinite integral.

\begin{align*} \int \frac{\sin x}{x-i} dx &= \int \frac{\sin(u+i)}{u} du \text{ where }u=x-i \\ &= \int \frac{\sin u \cos i + \cos u \sin i}{u} du \\ &= \mathrm{Si}(u) \cos i + \mathrm{Ci}(u) \sin i \\ &= \mathrm{Si}(x-i) \cosh 1 + i\mathrm{Ci}(x-i) \sinh 1 \\ \end{align*}

Then, we insert the bounds.

\begin{align*} \int_{-\infty}^\infty \frac{\sin x}{x-i} dx &= \mathrm{Si}(\infty-i) \cosh 1 + i\mathrm{Ci}(\infty-i) \sinh 1 \\ &\phantom{=}-\mathrm{Si}(-\infty-i) \cosh 1 - i\mathrm{Ci}(-\infty-i) \sinh 1 \\ &= \frac{\pi}{2}\cosh 1 + 0 +\frac{\pi}{2} \cosh 1 + \pi \sinh 1 \\ &= \pi (\cosh 1 + \sinh 1) \\ &= \pi e \end{align*}

I assume I have made some mistake in manipulating the complex sine and cosine integrals, since the result would be correct if $\mathrm{Ci}(-\infty-i)$ were evaluated to $-i \pi$. However, I cannot pinpoint the error.

• $u=x-i$ but you have sustituted it by $x+i$. I think that's the problem. Jul 25, 2014 at 7:07
• @Adolfo Thanks, I've fixed the signs on $i$. However, this doesn't seem to change anything. Jul 25, 2014 at 7:11
• @Adolfo No, I take that back--$\mathrm{Ci}$ appears to have a branch cut across the negative real axis, which is the source of the issue. Thanks! Jul 25, 2014 at 7:18
• Try to use contour integration and see what you get. Jul 25, 2014 at 7:44

Write the sin-function as the difference of two exponentials and obtain the corresponding integrals by contour integration. This gives the result: \begin{eqnarray*} I &=&\int_{-\infty }^{+\infty }dx\frac{1}{x-i}\sin x=\int_{-\infty }^{+\infty }dx\frac{1}{x-i}\frac{1}{2i}\left\{ e^{ix}-e^{-ix}\right\} \\ \int_{-\infty }^{+\infty }dx\frac{1}{x-i}e^{ix} &=&2\pi ie^{-1} \\ \int_{-\infty }^{+\infty }dx\frac{1}{x-i}e^{-ix} &=&0 \\ I &=&\frac{1}{2i}2\pi ie^{-1}=\frac{\pi }{e} \end{eqnarray*}

The mistake is simple--$\mathrm{Ci}$ has a branch cut across the negative real axis, so $\mathrm{Ci}(-\infty - i)$ should indeed evaluate to $-i \pi$ rather than $i \pi$.


\begin{align} \color{#f00}{\int_{-\infty}^{\infty}{\sin\pars{x} \over x - \ic}\,\dd x} & = \int_{-\infty}^{\infty}{x\sin\pars{x} \over x^{2} + 1}\,\dd x = \Im\int_{-\infty}^{\infty}{x\expo{\ic x} \over x^{2} + 1}\,\dd x = \Im\pars{2\pi\ic\,{\ic\expo{\ic\ic} \over \ic + \ic}} = \color{#f00}{{\pi \over \expo{}}} \end{align}

The integration was performed along a semi-circle in the upper half complex plane by using the Residues Theorem.

• Quote: "However, I cannot pinpoint the error." How does this pinpoint the error?
– Did
May 19, 2016 at 8:23