# Computing a complex integral potentially using residues

The question is:

Compute:

$$\mbox{p.v.}\int_{-\infty}^{\infty}\frac{x\sin4x}{{x^2}-1}dx$$

Initially I thought it was straight forward and I could just use residues. However, the Residue Theorem requires the poles to be in the upper plane ($y > 0$), and in this case, that is not the case. So, now I have no idea what to do since I cannot use residues.

-
p.v. = principal value. – user26872 Jul 25 '12 at 21:55
Right, I understand that. Does that change how I approach the problem though? Does that make it so that I can go ahead with computing the residues at 1 and -1? – Payton Jul 25 '12 at 22:31
See Rob and Tim's solutions below. – user26872 Jul 25 '12 at 23:32

Let $C_R$ denote the counterclockwise semicircular arc extending from $R$ to $-R$ in the plane and $C_{\rho_1} , C_{\rho_2}$ be the counterclockwise semicircular arcs extending from $-1 - \rho_1$ to $-1 + \rho_1$ and from $1 -\rho_1$ and $1+\rho_1,$ respectively. Note that $\frac{x\sin 4x}{x^2 -1} = \Im \frac{x\exp{4ix}}{x^2 -1}.$

Consider also that $\,\displaystyle{f(z) = \frac{z\exp{4iz}}{z^2 -1}}\,$ has simple poles at $-1$ and $1.$ By Jordan's Lemma, there exists $\theta \in [0, \pi ]$ such that $$\displaystyle\int_{C_R} \frac{z\exp{4iz}}{z^2-1} \le \frac{\pi }{4} \frac{1}{R^2 \exp{2i\theta }-1}$$ The right hand side of this inequality tends to zero. Using the residue theorem,

$$\int_{C_R} \frac{z\exp{4iz}}{z^2-1} + \int_{-C_{\rho_1}} \frac{z\exp{4iz}}{z^2-1} + \int_{-C_{\rho_2}} \frac{z\exp{4iz}}{z^2-1} +\int_{-R}^{-1 -\rho_1} \frac{x\exp{4ix}}{x^2-1} dx +$$ $$+\int_{-1 +\rho_1}^{1 - \rho_e} \frac{x\exp{4ix}}{x^2-1} dx +\int_{1 + \rho_1}^{R} \frac{x\exp{4ix}}{x^2-1} dx = 0$$

Letting $R$ tend to infinity and $\rho_1 \rho_2$ tend to zero, we have $$\textrm{pv }\int_{-\infty }^{\infty } \frac{x\exp{4ix}}{x^2 -1 }dx = \pi i [\textrm{ Res } (f, -1) + \textrm{ Res } (f, 1) ] = \pi i \cos 4$$ Hence $$\textrm{pv } \int_{-\infty }^{\infty } \frac{x\sin 4x}{x^2 -1 }dx = \pi \cos 4.$$

-
But doesn't the Residue Theorem run into an issue when the poles are on the real line? (that is, when they aren't on the upper half plane?) – Payton Jul 25 '12 at 23:23
Yes - we avoided this by constructing an indented contour around the poles. This approach relied on the fact that the poles were simple. See the picture in RobJohn's answer for the basic idea. There are no poles for $f$ enclosed within the indented contour, so the residue theorem tells us that the contour integral in that case was zero. – user17794 Jul 26 '12 at 0:36

Consider the following diagram:

$\hspace{3.25cm}$

The principal value integral is the integral over the path in black as the paths in red get smaller and the paths in blue and green get bigger. We will evaluate this by first breaking up $\sin(4z)=\dfrac{e^{i4z}-e^{-i4z}}{2i}$ so that we can close the path of integration of each piece along a different path.

$\dfrac{e^{i4z}}{2i}$ will be integrated over the paths in black, red, and blue ($\gamma^+$). $\gamma^+$ contains the singularities at $z=-1$ and $z=1$

$\dfrac{e^{-i4z}}{2i}$ will be integrated over the paths in black, red, and green ($\gamma^-$). $\gamma^-$ contains no singularities.

The sum of the integrals described above, include the integrals over the red half circles. We will eliminate the integrals over the red half circles by subtracting half of $2\pi i$ times the residue of $\dfrac{z\sin(4z)}{z^2-1}$ at $z=-1$ and $z=1$.

Thus, we get

\begin{align} =\hspace{-11.5pt}\int_{-\infty}^\infty\frac{x\sin(4x)}{x^2-1}\mathrm{d}x &=\color{#0000FF}{\frac1{2i}\int_{\gamma^+}\frac{ze^{i4z}}{z^2-1}\mathrm{d}z} -\color{#00A000}{\frac1{2i}\int_{\gamma^-}\frac{ze^{-i4z}}{z^2-1}\mathrm{d}z}\\ &-\color{#C00000}{\pi i\mathrm{Res}_{z=-1}\left(\frac{z\sin(4z)}{z^2-1}\right)} -\color{#C00000}{\pi i\mathrm{Res}_{z=1}\left(\frac{z\sin(4z)}{z^2-1}\right)}\\ &=\color{#0000FF}{\frac{2\pi i}{2i}\mathrm{Res}_{z=-1}\left(\frac{ze^{i4z}}{z^2-1}\right)} +\color{#0000FF}{\frac{2\pi i}{2i}\mathrm{Res}_{z=1}\left(\frac{ze^{i4z}}{z^2-1}\right)}\\ &-\color{#C00000}{\pi i\mathrm{Res}_{z=-1}\left(\frac{z\sin(4z)}{z^2-1}\right)} -\color{#C00000}{\pi i\mathrm{Res}_{z=1}\left(\frac{z\sin(4z)}{z^2-1}\right)}\\ &=\color{#0000FF}{\pi\frac{e^{-i4}}{2}}+\color{#0000FF}{\pi\frac{e^{i4}}{2}}\\ &-\color{#C00000}{\pi i\frac{\sin(-4)}{2}}-\color{#C00000}{\pi i\frac{\sin(4)}{2}}\\[6pt] &=\pi\cos(4) \end{align}

-
I have to ask, what program did you use to draw the diagram? – user2468 Jul 26 '12 at 2:07
I used Intaglio for the Mac. – robjohn Jul 26 '12 at 5:29