1

I am new to contour integration, but I am trying to evaluate the integral

$$\int_{0}^{\infty}\frac{x \sin(bx)}{x^{2}-a^{2}} \mathrm dx$$

where $a$ and $b$ are real. My attempt is to first simplify further as

$$\int_{0}^{\infty}\frac{x \sin(bx)}{x^{2}-a^{2}} \mathrm dx= \frac{1}{2}\int_{-\infty}^{\infty}\frac{x \sin(bx)}{x^{2}-a^{2}} \mathrm dx=\frac{1}{2} \Im \int_{-\infty}^{\infty}\frac{x e^{ibx}}{x^{2}-a^{2}} \mathrm dx$$

Note that this is similar to evaluating $\int_{C} \frac{x e^{imx}}{x^{2}+n^{2}} \mathrm dx$, which is different than the above expression by the minus sign in the denominator, along a contour $C$ along the real axis from $-\infty$ to $+\infty$ and closes in the upper half-plane. However, according to the residue theorem, I proceeded with picking up the residue from the pole $x=a$:

$$\int_{-\infty}^{\infty}\frac{x e^{ibx}}{x^{2}-a^{2}} \mathrm dx=2 \pi i \lim_{x\rightarrow a} (x-a) \ \frac{xe^{ibx}}{(x-a)(x+a)}=\pi i \, e^{iba}$$

so that $\int_{0}^{\infty}\frac{x \sin(bx)}{x^{2}-a^{2}} \mathrm dx=\frac{\pi}{2} \cos(ba)$

I am not sure if this result is correct because I am having trouble understanding the case if the poles are on the real axis and I would like to evaluate it correctly. My attempt was to close the contour in the upper half-plane using a large semicircle $C_{R}$ and avoid the poles by small semicircles around $x=\pm a$. Could someone please explain and correct my mistakes if there are any? Any help would be appreciated.

EDIT: Based on the comments, I am interested in the case of $a, \ b >0$ and I am trying to evaluate the Cauchy Principal Value of the integral.

kstar
  • 29
  • 1
    Does the integral actually converge? – Sine of the Time Jul 25 '24 at 19:03
  • Moreover, why are you computing the residue at $x=a$ if it's out of your closed curve? – Sine of the Time Jul 25 '24 at 19:04
  • @SineoftheTime I am not sure I understand your question but the integral over the entire contour, including the contribution from the semicircle which vanishes as its radius tends to infinity, is what I did to try to evaluate the integral. – kstar Jul 25 '24 at 19:48
  • from what I understand, the poles are out of your contour. Am I correct? – Sine of the Time Jul 25 '24 at 19:53
  • @SineoftheTime I see what you mean. If I am not mistaken, another way of doing so is by shifting the $x$ integration contour upwards to $\Im , x \rightarrow + \infty$ but circumventing the poles at $x=\pm a$, where $b> 0$. The poles lie inside but the final answer will differ by a factor of $2$ so it would be $\pi \cos(ba)$. To me, this is another source of confusion. – kstar Jul 25 '24 at 21:25
  • If there's not a particular relation between $a$ and $b$, the integral diverges – Sine of the Time Jul 25 '24 at 21:40
  • @SineoftheTime Why? – kstar Jul 25 '24 at 22:38
  • 1
    I think this does only converge as p.v. – Matthew Willow Jul 25 '24 at 23:18
  • @MatthewWillow same case as in here? – kstar Jul 25 '24 at 23:39
  • 1
    No, it's not the same. Your integral has a singularity at $x=a$ – Sine of the Time Jul 26 '24 at 00:05
  • @SineoftheTime That also has a singularity at $x=i , a$ – kstar Jul 26 '24 at 00:11
  • $x=ia$ is not on the real axis (unless $a=0$) – Sine of the Time Jul 26 '24 at 00:18
  • Yes, I understand the difference between the two cases. I was referring to @MatthewWillow's comment about the Principal Value (P.V.) in particular. However, I don't understand your perspective regarding the issue with being on the real axis and not being able to use the residue theorem, as you indicated. – kstar Jul 26 '24 at 01:14
  • 2
    There are several issues here. (1) It must be clear if you are evaluating the Cauchy Principal Value of the integral. There are non-integrable singularities at $z=-a$ and $z=a$, so you need two small indented contours to recover the Cauchy Principal Value integral. If $a=0$, then there's a removable singularity at $z=0$. (2) You can't always assume willy-nilly an integral over a huge semi-circle in the upper half plane goes to $0$ as the circle enlarges. Unlike when $b>0$, the modulus of the integrand goes to infinity in the upper half plane given $b < 0$, and it helps to prove why. – Accelerator Jul 26 '24 at 08:19
  • Diverges.$\mbox{}$ – Felix Marin Jul 26 '24 at 17:24
  • 1
    @FelixMarin I need to evaluate the P.V. integral similar to your answer here. – kstar Jul 26 '24 at 18:03
  • After a long proof with brutal calculations, I believe the answer, when $a,b>0$, is $\frac{\pi}{2}\cos(ab)$. Numerical approximations support this claim here in this link. Have you made any progress since your last edit? – Accelerator Jul 27 '24 at 11:09
  • 1
    @Accelerator Great! So I exactly followed the method here in this video and I arrived at the same result: $$\int_{0}^{\infty}\frac{x \sin(bx)}{x^{2}-a^{2}} \ dx=\frac{\pi}{2} \cos(ba)$$ Perhaps your method is more rigorous, and if possible, please provide it. However, one interesting remark about this result is that although I initially imposed $a>0$, if I arbitrarily set $a=0$ in the final answer I would obtain the famous integral $\int_{0}^{\infty}\frac{\sin(bx)}{x} \ dx=\frac{\pi}{2}$, which is quite intriguing. – kstar Jul 27 '24 at 13:54
  • 3
    For those voting to close this, please don't. It's pretty clear what the original poster is struggling with and what they want. They've already made enough of an effort to earn an answer. Hopefully I can post my answer quick enough before 2 more close votes are cast. :P – Accelerator Jul 27 '24 at 21:48

2 Answers2

5

MISTAKES

There are several mistakes. I'll expand on my comments from the comments section.

  • It must be clear if you are evaluating the Cauchy Principal Value of the integral. There are non-integrable singularities at $z=−a$ and $z=a$. You need two small indented contours to recover the Cauchy Principal Value integral. If $a=0$, there's a removable singularity at $z=0$, removing the need for an indented contour.
  • With a semi-circle contour in the upper half plane, you can't use the Residue Theorem and "pick up" the residue at $z=a$ because of that singularity on the contour.
  • You can't always assume willy-nilly an integral over a huge semi-circle in the upper half plane goes to $0$ as the circle enlarges. Unlike when $b>0$, the modulus of the integrand goes to $\infty$ in the upper half plane given $b<0$. It helps to prove why.

Fortunately, this integral is doable by evaluating its Cauchy Principal Value instead! But first, we start with some basics.


PRIMER

If $f(x)$ is continuous on $[a,\alpha)$ and $(\alpha,\infty)$ with a discontinuity of any kind at $\alpha$, then

$$ \int_{a}^\infty f(x)dx = \lim_{t\to\alpha^-}\int_a^t f(x)dx + \lim_{a\to\alpha^+}\int_u^c f(x)dx + \lim_{b\to\infty}\int_c^b f(x)dx\,, $$

for any choice of $c>\alpha$. These limits must converge to a finite value for the improper integral to be said to converge. More details here.

You may use that statement to prove that $\int_{0}^{\infty}\frac{x\sin\left(bx\right)}{x^{2}-a^{2}}dx$ diverges. I'll leave it up to you to show that not all three limits converge.

A way to deal with divergent integrals is by introducing the Cauchy principal value, a standard method applied in mathematical applications by which an improper, and possibly divergent, integral is measured around singularities or at infinity.

The Cauchy principal value of a finite integral of a function $f$ about a point $c$ with $c \in [a,b]$ is given by

$$ \operatorname{PV} \int_a^b f(x)dx = \lim_{\epsilon\to0^+}\left(\int_a^{c-\epsilon}f(x)dx+\int_{c+\epsilon}^bf(x)dx\right)\,. $$

More details here.

With these statements in mind, we are ready to solve the problem!


CLAIM

Let $a,b>0$. Then

$$ \operatorname{PV}\int_{0}^{\infty}\frac{x\sin\left(bx\right)}{x^{2}-a^{2}}dx = \frac{\pi}{2}\cos\left(ab\right)\,. $$


PROOF

Define a holomorphic function $f: \mathbb{C}\setminus\left\{a,-a\right\} \to \mathbb{C}$ where $z \mapsto \frac{ze^{ibz}}{z^{2}-a^{2}}$. We construct a contour $\mathcal{C} = [0,a-r] \cup \gamma \cup [a+r,R] \cup \Gamma \cup \Lambda$ where

$$ \begin{align} \gamma &= \left\{t \in [0,\pi]: a-re^{-it} \in \mathbb{C}\right\} \\ \Gamma &= \left\{t \in \left[0,\frac{\pi}{2}\right]: Re^{it} \in \mathbb{C}\right\} \\ \Lambda &= \left\{t \in [-R,0]: -Ri \in \mathbb{C}\right\}\,. \\ \end{align} $$

Here is a visual down below and an animation here.

$$ \text{Figure 1: Contour $\mathcal{C}$ Traveling Clockwise} $$

enter image description here

We write the contour integral as

$$ \oint_{\mathcal{C}}f = \int_0^{a-r}f + \int_{\gamma}f + \int_{a+r}^Rf + \int_{\Gamma}f + \int_{\Lambda}f\,, $$

provided $R \gg a+r$. We write $\int_{\gamma}f = -\int_{\gamma_{-}}f$ where we denote $\gamma_{-}$ as the same contour but traveling counterclockwise instead.

By the Cauchy Integral Theorem, since $f$ is analytic on and inside the simple closed contour $\mathcal{C}$, we get

$$ \oint_{\mathcal{C}}f = 0\,. $$

Applying the appropriate limits and then equating the imaginary part on both sides, we get

$$ 0 = \Im \lim_{R\to\infty}\lim_{r\to0^+}\left(\int_0^{a-r}f+\int_{a+r}^Rf\right)-\Im \lim_{r\to0^+}\int_{\gamma_{-}}f + \Im\lim_{R\to\infty}\int_{\Gamma}f + \Im\lim_{R\to\infty}\int_{\Lambda}f\,. $$

I won't go into too many details on evaluating $\displaystyle \Im\lim_{R\to\infty}\int_{\Gamma}f$ (because I'm lazy), but to give a little start, we bound the norm of $f(z)$ like this:

$$ \left|f\left(z\right)\right|=\left|\frac{ze^{ibz}}{z^{2}-a^{2}}\right|\le\frac{\left|z\right|\left|e^{ibz}\right|}{\left|z\right|^{2}-a^{2}}\overset{z \in \Gamma}=\frac{\left|Re^{it}\right|\left|\exp\left(ibRe^{it}\right)\right|}{\left|Re^{it}\right|^{2}-a^{2}}=\frac{R}{e^{bR\sin t}\left(R^{2}-a^{2}\right)}\,. $$

From there, you use the Estimation Lemma. I have similar examples of bounded integrals that converge to $0$ here and here I wrote a while back.

After a little work, we get

$$ \Im\lim_{R\to\infty}\int_{\Gamma}f = 0\,. $$

Evaluating $\displaystyle \Im\lim_{R\to\infty} \int_{\Lambda}f$, we have

$$ \Im\lim_{R\to\infty} \int_{\Lambda}f = \Im\int_{-R}^{0}\frac{-ite^{-ibit}}{\left(-it\right)^{2}-a^{2}}\left(-i\right)dt = \Im\int_{-R}^{0}\frac{te^{bt}}{t^{2}+a^{2}}dt = 0\,. $$

Going back to the contour $\mathcal{C}$, we so far have

$$ \require{cancel} 0 = \Im \lim_{R\to\infty}\lim_{r\to0^+}\left(\int_0^{a-r}f+\int_{a+r}^Rf\right)-\Im \lim_{r\to0^+}\int_{\gamma_{-}}f + \cancelto{0}{\Im\lim_{R\to\infty}\int_{\Gamma}f} + \cancelto{0}{\Im\lim_{R\to\infty}\int_{\Lambda}f}\,. $$

Rearranging the terms and using the definition of Cauchy principal value, we get

$$ \operatorname{PV}\int_{0}^{\infty}\frac{x\sin\left(bx\right)}{x^{2}-a^{2}}dx = \Im \lim_{r\to0^+}\int_{\gamma_{-}}f\,. $$

All that's left is to evaluate this integral. Since $\gamma_{-}$ travels counterclockwise and surrounds a simple pole $z=a$, we use Theorem 9.14 from these notes and get

$$ \Im\lim_{r\to0^+}\int_{\gamma_{-}}f = \Im i \pi \mathop{\mathrm{Res}}_{z=a}f(z) = \pi \Re \lim_{z\to a}\cancel{(z-a)}\cdot \frac{ze^{ibz}}{\cancel{\left(z-a\right)}\left(z+a\right)} = \frac{\pi}{2}\cos\left(ab\right)\,. $$

Finally, we finish with

$$ \bbox[15px,#FFFAFA,border:5px inset #C996FD]{\operatorname{PV}\int_{0}^{\infty}\frac{x\sin\left(bx\right)}{x^{2}-a^{2}}dx = \frac{\pi}{2}\cos\left(ab\right)} $$

and we're done!


Accelerator
  • 6,203
  • Nice work (+1). Small note: your set-builder notation is backwards. You should write $\Gamma={Re^{it}\in\mathbb{C}:t\in[0,\pi/2]}$ instead of $\Gamma={t\in [0,\pi/2]:Re^{it}\in\mathbb{C}}$. When describing a set $S$ in set-builder notation, say $S={x\in A:P(x)}$, the part to the left of the colon specifies where the elements of $S$ are sampled from — in this case $A$ — and $P(x)$ would be whatever property these $x$ have to satisfy to be elements of $S$. With this convention, your set ${t\in[0,\pi/2]:Re^{it}\in\mathbb{C}}$ would be the interval $[0,\pi/2]$ and not the arc you want. – Alann Rosas Jul 28 '24 at 00:14
  • 1
    Wow, an answer that I didn't expect. Very elegant and easy to follow. I learned a lot from this answer alone. Thank you very much for your time in providing this detailed explanation. It is greatly appreciated! – kstar Jul 28 '24 at 00:44
1

This solution is just to show that we don't need complex numbers to compute the answer. Therefore, I won't be dealing with the question of your particular method.

Note that $$\frac{x}{x^2-a^2} = \frac12\left(\frac1{x-a}+\frac1{x+a}\right)$$ so that $$I := \text{PV}\!\!\int_0^\infty \frac{x\sin(bx)}{x^2-a^2}\,\mathrm{d}x = \frac12\text{PV}\!\!\int_0^\infty\sin(bx)\left(\frac1{x-a}+\frac1{x+a}\right)\,\mathrm{d}x.$$

If we suppose that $a>0$, $b\neq 0$, then since $\int_0^\infty \frac{\sin(bx)}{x+a}\,\mathrm{d}x$ is finite as an improper integral, we can separate the integral into the sum of two integrals:

$$\begin{align*} I &= \frac12\left(\text{PV}\!\!\int_0^\infty\frac{\sin(bx)}{x-a}\,\mathrm{d}x + \int_0^\infty \frac{\sin(bx)}{x+a}\,\mathrm{d}x \right) \\ &= \frac12\left(\text{PV}\!\!\int_{-a}^\infty\frac{\sin(bx+ab)}x\,\mathrm{d}x + \int_a^\infty\frac{\sin(bx-ab)}x\,\mathrm{d}x\right) \\ &= \frac12\left(\text{PV}\!\!\int_{-a}^\infty \frac{\sin(bx)\cos(ab)-\cos(bx)\sin(ab)}x\,\mathrm{d}x + \int_a^\infty \frac{\sin(bx)\cos(ab)+\cos(bx)\sin(ab)}x\,\mathrm{d}x\right) \\ &=: \frac12(I_1 + I_2) \end{align*}$$

Considering the first integral $I_1$ by itself, we again can note that $\int_{-a}^\infty \frac{\sin(bx)\cos(ab)}x\,\mathrm{d}x$ exists and is finite as an improper integral and $\frac{\cos(bx)\sin(ab)}x$ is an odd function of $x$, $$\begin{align*}I_1 &= \int_{-a}^\infty \frac{\sin(bx)\cos(ab)}x\,\mathrm{d}x - \text{PV}\!\!\int_{-a}^\infty \frac{\cos(bx)\sin(ab)}x\,\mathrm{d}x \\ &= \int_{-a}^\infty \frac{\sin(bx)\cos(ab)}x\,\mathrm{d}x - \int_{a}^\infty \frac{\cos(bx)\sin(ab)}x\,\mathrm{d}x \end{align*}$$ where we have finally removed the all the principal value integrals and we can note that $\int_a^\infty \frac{\cos(bx)\sin(ab)}x\,\mathrm{d}x$ exists and is finite as an improper integral, so we can now write

$$\begin{align*}I &= \frac12\left(\int_{-a}^\infty \frac{\sin(bx)\cos(ab)}x\,\mathrm{d}x + \int_a^\infty -\frac{\cos(bx)\sin(ab)}x + \frac{\sin(bx)\cos(ab)+\cos(bx)\sin(ab)}x\,\mathrm{d}x\right) \\ &= \frac{\cos(ab)}2\left(\int_{-a}^\infty \frac{\sin(bx)}x\,\mathrm{d}x + \int_a^\infty \frac{\sin(bx)}x\,\mathrm{d}x\right) \\ &= \cos(ab)\int_0^\infty \frac{\sin(bx)}x\,\mathrm{d}x\\ &= \cos(ab)\int_0^\infty \frac{\sin x}x\,\mathrm{d}x \\ &= \frac{\pi}2\cos(ab)\end{align*}$$

where the third line is since $\sin(bx)/x$ is an even function of $x$ and the last line has several methods of being shown.