# Improper integrals with singularities on the REAL AXIS (Complex Variable)

I'm having some troubles when I try to solve improper integrals exercises that have singularities on the real axis. I have made a lot of exercises where singularities are inside a semicircle in the upper half side, but I don't know how to solve them when the singularities are on the real axis. I read some books but I think they are not very good explained (at least, I can't understood them).

This is the exercise: $$\int_{-\infty}^{\infty} \frac{\cos(2\pi x)}{x^2-1} dx$$

Using complex variable, I have:

$$f(z) =\frac{e^{i2\pi z}}{z^2-1}$$ so there are 2 singularities: $z_1 = -1$ and $z_2 = 1$

I use a curve $C$ that is holomorphic inside it, because both singularities are out of it. Of course, I can divide $C$ in 6 curves: $C_R$ that is the "roof" of the curve and, using Jordan's Lemma, I can prove that

$$\int_{C_R}^{ } \frac{e^{i2\pi z}}{z^2-1} dx = 0$$

but I don't know what do I have to do now. I saw in some places they said that the Residue Theorem over the semicircle around the singularities was something like: $$-i\pi\sum{}{}Res[f(z), z_k]$$ but I didn't understand why.

I hope you can help me, because I don't know what can I do. Thanks!!

Divergent Integral

Note that $$\frac{\cos(2\pi x)}{x^2-1}=\frac{\cos(2\pi x)}2\left(\frac1{x-1}-\frac1{x+1}\right)$$ The integral diverges at $x=-1$ and $x=1$, but we can compute the Cauchy Principal Value, which involves removing a small interval centered around each singularity.

Cauchy Principal Value

The reason that centering is important is that if the singularity is of the first order, then we have a situation similar to $$\int_{-1}^{-r}\frac1x\,\mathrm{d}x+\int_r^1\frac1x\,\mathrm{d}x=0$$ where the effect of the singularity is cancelled around an interval centered on $0$ since $\frac1x$ is an odd function.

An easy way to approach the evaluation of the Cauchy Principal Value is using contour integration. Consider the integral of $\frac1z$ along the contour $\color{#0000FF}{[-1,-r]}\cup\color{#C000FF}{re^{i[\pi,0]}}\cup\color{#0000FF}{[r,1]}$: \begin{align} &\int_{-1}^{-r}\frac1z\,\mathrm{d}z+\int_{\pi}^0\overbrace{\frac1{re^{i\theta}}}^{1/z}\,\overbrace{\vphantom{\frac1z}ire^{i\theta}\mathrm{d}\theta}^{\mathrm{d}z}+\int_r^1\frac1z\,\mathrm{d}z\\ &=\log(r)+\int_\pi^0i\,\mathrm{d}\theta-\log(r)\\ &=-\pi i \end{align} which is $-\pi i$ times the residue of $\frac1z$ at $0$ since the contour takes $\frac12$ turn clockwise around $0$.

Thus, we can compute the Cauchy Principal Value by computing a contour integral and subtracting the contributions of semicircles around the singularities, which will be $\pi i$ times the residues of those singularities.

There are at least two ways to evaluate the Cauchy Principal Value for this problem.

Contour Integration

Using the counter-clockwise contour, which contains no singularities, $$\small\color{#00A000}{\gamma}=\color{#0000FF}{[-R,-1-r]}\cup\overbrace{\color{#C000FF}{re^{i[\pi,0]}-1}}^{\begin{array}{c}\text{\frac12 turn clockwise}\\\text{about -1}\end{array}}\cup\color{#0000FF}{[-1+r,1-r]}\cup\overbrace{\color{#C000FF}{re^{i[\pi,0]}+1}}^{\begin{array}{c}\text{\frac12 turn clockwise}\\\text{about +1}\end{array}}\cup\color{#0000FF}{[1+r,R]}\cup\overbrace{\color{#C00000}{Re^{i[0,\pi]}}}^{\text{vanishes}}$$ as $R\to\infty$ and $r\to0$, we get that \begin{align} \small\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x^2-1}\,\mathrm{d}x &\,\small=\mathrm{Re}\!\left(\color{#0000FF}{\int_{-R}^{-1-r}\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x} +\color{#0000FF}{\int_{-1+r}^{1-r}\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x} +\color{#0000FF}{\int_{1+r}^R\frac{e^{2\pi ix}}{x^2-1}\,\mathrm{d}x}\right)\\ &\small=\mathrm{Re}\!\left(\color{#00A000}{\int_\gamma\frac{e^{2\pi iz}}{z^2-1}\,\mathrm{d}z} +\color{#C000FF}{\pi i\operatorname*{Res}_{z=-1}\left(\frac{e^{2\pi iz}}{z^2-1}\right)} +\color{#C000FF}{\pi i\operatorname*{Res}_{z=1}\left(\frac{e^{2\pi iz}}{z^2-1}\right)}\right)\\ &\small=\mathrm{Re}\!\left(\color{#00A000}{0}\,-\,\color{#C000FF}{\frac{\pi i}4}\,+\,\color{#C000FF}{\frac{\pi i}4}\right)\\[4pt] &\small=0 \end{align}

Exploitation of Periodicity \begin{align} \mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x^2-1}\,\mathrm{d}x &=\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x-1}\,\mathrm{d}x -\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}{x+1}\,\mathrm{d}x\\ &=\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}x\,\mathrm{d}x -\frac12\mathrm{PV}\int_{-\infty}^\infty\frac{\cos(2\pi x)}x\,\mathrm{d}x\\[6pt] &=0 \end{align}

• thank you very much! Your answer was VERY useful. I only have a few questions: a)First of all, when you write about "Cauchy Principal Value", why did you put that the integral was from -1 to 1? Wouldn't it be from -R to R, with R->∞? Or was that just an example? b)Then, I calculate the residue in both singularities (z=1 and z=-1). They are both poles, so the results are (I think I'm doing the calculus in a correct way): Res[f(z),z=−1]=−12 Res[f(z),z=1]=12 That's correct, isn't it? c)Last question: isn't it -πi in the real part of...? Thanks!! Feb 8 '15 at 4:54
• what happens if the pole is not simple? For example, what happens if the pole is double (2nd grade)? Thanks! Feb 8 '15 at 4:54
• a) Did you get the idea about the cancellation? It is pretty much a local phenomenon, near the singularity. When we put a whole contour together, we may use an edge of the contour that extends toward infinity along $\mathbb{R}$, but the behavior near the singularities cancels in exactly the same way as my example on $[-1,1]$.
– robjohn
Feb 8 '15 at 5:38
• b) the residue of $f(z)$ at $z=a$ is the coefficient of $1/z$ in the Laurent expansion of $f(z)$ at $z=a$. Since $$\frac1{z^2-1}=\color{#00A000}{\frac{1/2}{z-1}}\color{#0000FF}{-\frac{1/2}{z+1}}$$ the residue at $\color{#00A000}{z=1}$ is $\color{#00A000}{1/2}$ and the residue at $\color{#0000FF}{z=-1}$ is $\color{#0000FF}{-1/2}$.
– robjohn
Feb 8 '15 at 5:43
• c) $\mathrm{Re}\!\left(\frac{\pi i}4\right)=0$. However, $\frac{\pi i}4-\frac{\pi i}4=0$ anyway.
– robjohn
Feb 8 '15 at 5:46

$\newcommand{\angles}{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\dd}{{\rm d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\dsc}{\displaystyle{\color{red}{#1}}} \newcommand{\expo}{\,{\rm e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}{\,{\rm Li}_{#1}} \newcommand{\pars}{\left(\, #1 \,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\totald}[]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\verts}{\left\vert\, #1 \,\right\vert}$ First at all we realize that $$\color{#66f}{% \,{\rm P.V.}\int_{-\infty}^{\infty}\frac{\cos\pars{2\pi x}}{x^{2} - 1}\,\dd x} =\Re\int_{-\infty}^{\infty}\frac{\expo{2\pi x\ic} - 1}{x^{2} - 1}\,\dd x +\,{\rm P.V.}\int_{-\infty}^{\infty}\frac{\dd x}{x^{2} - 1}$$ The first integral, in the right hand side, vanishes out which can be shown by means of a contour integration. Then, we are left with a 'simple' term: \begin{align}\color{#66f}{% \,{\rm P.V.}\int_{-\infty}^{\infty}\frac{\cos\pars{2\pi x}}{x^{2} - 1}\,\dd x} &=\,{\rm P.V.}\int_{-\infty}^{\infty}\frac{\dd x}{x^{2} - 1} \\[5mm]&=\lim_{\epsilon \to 0^{+}}\bracks{% \int_{-\infty}^{-1 - \epsilon}\frac{\dd x}{x^{2} - 1} +\int_{-1 + \epsilon}^{1 - \epsilon}\ \frac{\dd x}{x^{2} - 1} +\int_{1 + \epsilon}^{\infty}\frac{\dd x}{x^{2} - 1}} \end{align} Since $\ds{\int\frac{\dd x}{x^{2} - 1} =\half\,\ln\pars{\verts{\frac{1 - x}{1 + x}}} + \mbox{a constant}}$, the above expression is reduced to: \begin{align}&\color{#66f}{\large% \,{\rm P.V.}\int_{-\infty}^{\infty}\frac{\cos\pars{2\pi x}}{x^{2} - 1}\,\dd x} \\[5mm]&=\lim_{\epsilon \to 0^{+}}\ \braces{% \ln\pars{\verts{\frac{2 + \epsilon}{-\epsilon}}} +\ln\pars{\verts{\frac{\epsilon}{2 - \epsilon}\,\frac{\epsilon}{2 - \epsilon}}} -\ln\pars{\verts{\frac{-\epsilon}{2 + \epsilon}}}}=\color{#66f}{\large 0} \end{align}