2

I want to calculate $\int_{-\infty}^\infty \frac{cos(\pi x)}{2x-1}dx$ using Cauchy's Residue Theorem.

First, since $\frac{cos(\pi x)}{2x-1} = Re(\frac{e^{i\pi x}}{2x-1})$, I can simply compute real part of the integral $\int_{-\infty}^\infty \frac{e^{i\pi x}}{2x-1}dx$. So I will use the positively oriented curve $\Gamma$ consisting of the interval $[-R, R]$ and the upper semicircle $\gamma^+(0, R)$ to integrate. The integrand has a simple pole at $x = \frac{1}{2}$. Using the formula for residues at simple poles, the residue at $x=\frac{1}{2}$ is $\frac{e^{i\pi x}}{2}|_{x=2} = \frac{e^{\frac{i\pi}{2} }}{2}$. So by Cauchy's Residue Theorem, $\int_{-\infty}^\infty \frac{e^{i\pi x}}{2x-1}dx$ = $Re(\int_\Gamma \frac{e^{i\pi x}}{2x-1}dx$) = Re($2\pi i \frac{(cos(\frac{\pi}{2})+i sin(\frac{\pi}{2})}{2})$ = $-\pi$.

But when I put this integral in a calculator, I get the result $\frac{-\pi}{2}$. Where have I gone wrong? Where do I get this half from? If the method I used cannot be applied, how can I calculate this integral in a similar way?

  • Note that you're using Residue Theorem out of the hypothesis. You are integrating over a contour that contains a pole of your function and thus the theorem doesn't apply. – maikel Nov 19 '21 at 12:59
  • You have a pole which lies exactly on the contour you defined. The function is not defined on the contour. – Mark Nov 19 '21 at 13:00
  • Oh, I see... Am I still able to compute the integral in a similar way? – Desintegration Nov 19 '21 at 13:02
  • 1
    Pretty sure it's a removable singularity, though, since $\lim_{x\to\frac12} \cos(\pi x)/(2x-1) = -\pi/2$. – Michael Seifert Nov 19 '21 at 13:02
  • Also note that under the substitution $y = x - \frac{1}{2}$, this integral becomes $$-\frac{1}{2} \int_{-\infty}^\infty \frac{\sin(\pi y)}{y}, dy.$$So if you know how to do the sinc integral, the same technique could be applied here. – Michael Seifert Nov 19 '21 at 13:10
  • @MichaelSeifert it is not a removable singularity though, note that $$\lim_{z\to 1/2}\frac{e^{i\pi z}}{2z-1}(z-1/2)=\lim_{z\to 1/2}\frac{1}{2}e^{i\pi z}=\frac{i}{2}$$ – maikel Nov 19 '21 at 13:22
  • @maikel: Yeah, there's a subtlety there. The singularity is removable from the original integrand $\cos(\pi z)/(2z-1)$, since $\cos(\pi z) = -\pi(x-\frac12) + \mathcal{O}(x-\frac12)^3$ near $x = \frac12$. But it's not removable from $e^{i \pi z}/(2x-1)$, since $e^{i \pi z} = i + \mathcal{O}(x-\frac12)^1$ in that same vicinity. And you need to use the latter integrand to close the contour in the upper half-plane. – Michael Seifert Nov 19 '21 at 13:26
  • Another example https://math.stackexchange.com/a/4439193/532409 – Quillo Apr 30 '22 at 08:10

1 Answers1

2

When you switch your integrand to $e^{i \pi x}/(2x-1)$, you introduced a pole at $x = \frac{1}{2}$. This means that you need to pick a contour that avoids this point; you can't just run over it.

The standard technique for situations like this is to use a contour that yields the Cauchy principal value of the integral instead. This consists of the contour you used, but with a small semicircle of radius $\epsilon$ centered at the pole. This portion of the contour will have a non-zero contribution to the integral, which is (usually) easy to find in the limit $\epsilon \to 0$; and in this same limit, the portion of the integral over the real axis becomes the principal value of the integral. Finally, we can take the real part of the principal value to get the original integral we wanted.

For more details on how to do this, see the section on "Type 4 Integrals" in these lecture notes.