4

I am trying to evaluate $$\int_0^\infty\frac{x \sin(x)}{x^2+a^2} dx$$ I get $\pi\sin(ia)/4$ using residue theorem.

I integrated over the path that goes from -R to R along the real axis and then along a the semi-circle that goes back to -R in the upper half plane. By residue theorem, this is $$2i \pi \lim_{x\to ia} \frac{(x-ia) x \sin(x)}{(x-ia) (x+ia)},\ \mbox{which is}\ \frac{\pi}{4} \sin(ia)$$ Subtracting from this the integral over the semi-circle as its radius R goes to infinity gives $\pi\sin(ia)/4$, by estimation lemma.

Can someone please correct my mistake $?$.

Thanks in advance

Felix Marin
  • 94,079

2 Answers2

2

$$\int_0^\infty \frac{x \sin(x)}{x^2+a^2}dx=\frac12\int_{-\infty}^\infty \frac{x \sin(x)}{x^2+a^2}dx=\frac12{\frak{I}}\int_{-\infty}^\infty \frac{x e^{i x}}{x^2+a^2}dx$$

Now consider $\int \frac{x e^{i x}}{x^2+a^2}$ along a countour $C$ along the real line and then a semi-cirle in the upper-half plane. By the residue theorem, (with a suitably large circle radius to include the singularity), we have $$\int_C \frac{x e^{i x}}{x^2+a^2}dx=2\pi i\lim_{x \to ia}(x-ia)\frac{x e^{i x}}{(x-ia)(x+ia)}=\pi i e^{-a} $$

As you probably determined, as the radius of the upper semicirle arc goes to infinity, the countour along the arc goes to zero. So we have

$$\int_{-\infty}^\infty \frac{x e^{i x}}{x^2+a^2}dx=\pi i e^{-a} $$ Hence $$\int_0^\infty \frac{x \sin(x)}{x^2+a^2}dx=\frac12{\frak{I}}\int_{-\infty}^\infty \frac{x e^{i x}}{x^2+a^2}dx=\frac\pi2e^{-a}$$

Pauly B
  • 5,302
  • Note that if $a=0$, the countour $C$ actually passes through a singularity at the origin, so we must evaluate it differently there. However, it is well known that $\int_0^\infty\frac{\sin(x)}{x}dx=\frac\pi2$, so the expression still holds for $a=0$. – Pauly B Sep 04 '14 at 04:00
  • Can you please tell me what you did with that script "J" and what it is? – user173657 Sep 04 '14 at 04:18
  • That script means "Imaginary part of". This is based on the fact that $e^{ix}=\cos(x)+i \sin(x)$. The reason this is done is cause $e^{ix}$ tends to behave nicer in the complex plane than the trigonometric functions for the purposes of contour integration. – Pauly B Sep 04 '14 at 04:30
  • Also note that $\int({\frak{I}} f(x))dx={\frak{I}}(\int f(x)dx)$, for real integrals and $f(x)$. As similar thing holds for real parts (denoted $\frak{R}$). I leave you to prove this fact, as it is relatively simple. – Pauly B Sep 04 '14 at 04:32
  • Yup. That is a simple solution. I killed way too much time on that. Thank you very much! Do you know why I wasn't getting the answer with what I did? – user173657 Sep 04 '14 at 04:43
  • $2i \pi \lim_{x\to ia} \frac{(x-ia) x sin(x)}{(x-ia) (x+ia)}=i\pi \sin(ia)=-\pi \frac{e^{x}-e^{-x}}{2}$. My guess is that the semi circle for the $\sin(x)$ version of the integral does not go to zero as the radius increases. – Pauly B Sep 04 '14 at 04:54
  • whoops.. yeah, I think I left out the length of the semicircle when using the estimation lemma. – user173657 Sep 05 '14 at 21:43
  • $+1$. Pretty fine. – Felix Marin Mar 27 '24 at 16:21
0

It is a so long time I did not use the residue theorem that I should not try to solve the problem that way.

From a standard integration point of view, the integral can be computed using partial fraction decomposition $$\frac{x }{x^2+a^2}=\frac{1}{2}\Big(\frac{1}{x+ia}+\frac{1}{x-ia}\Big) $$and so $$\int\frac{x \sin(x)}{x^2+a^2} dx=\frac{1}{2} (i \sinh (a) (\text{Ci}(x-i a)-\text{Ci}(i a+x))+\cosh (a) (\text{Si}(i a+x)-\text{Si}(i a-x)))$$ which is a real valued function. From this, it follows that $$\int_0^\infty\frac{x \sin(x)}{x^2+a^2} dx=\frac{\pi e^{-a}}{2}$$ I hope and wish that this could help you to some extent.