4

Having played around with Wolfram Alpha, I find the following improper integral:

$$\int_0^{\infty} \frac{(\sin x)^2}{x^2-\pi ^2} dx=-\frac1{2\pi}\tag{1} $$

(See also the Wolfram Alpha snapshot below.)

But I don't know how to prove this result. Without the singularity at $x=\pi$, there have been several questions about evaluating $\int_0^\infty\frac{\sin x}{x}\,dx$, which seems not to be very related to the one here. See for instance Evaluating the integral $\int_0^\infty \frac{\sin x} x \,\mathrm dx = \frac \pi 2$?

How can I prove (1)?


enter image description here

Kirby Lee
  • 606

2 Answers2

10

Actually $$ \mathcal{J}=\int_{0}^{+\infty}\frac{\sin^2 x}{x^2-\pi^2} = \color{red}{0}. $$ Indeed by parity $$ \mathcal{J}=\frac{1}{4}\int_{-\infty}^{+\infty}\frac{1-\cos(2x)}{x^2-\pi^2}\,dx =\frac{1}{4}\text{Re}\int_{-\infty}^{+\infty}\frac{1-e^{2ix}}{x^2-\pi^2}\,dx$$ and the meromorphic function $\frac{1-e^{2ix}}{x^2-\pi^2}$ fulfills the ML lemma and it is actually holomorphic.
By considering a semicircle contour in the upper half-plane, centered at the origin, having radius $R\to +\infty$ and with two small bulges (with radius $\varepsilon\to 0^+$) around $x=-\pi$ and $x=\pi$, it turns out that the original integral equals one fourth of the real part of the residue of some function... at no point!

Non-believers may try the Mathematica $\text{NIntegrate}$ command, or the alternative, more real-analytic approach

$$ \sum_{k\geq 0}\frac{1}{(x+k\pi)^2-\pi^2} = \frac{\pi-2x}{\pi x (\pi-x)}\quad\Longrightarrow\quad \mathcal{J}=\int_{0}^{\pi}\underbrace{\frac{\pi-2x}{2\pi x(\pi-x)}\sin^2(x)}_{\text{odd with respect to }x=\frac{\pi}{2}}\,dx = 0.$$

Curious bug of WA, the lesson probably is do not trust machines too much.

Jack D'Aurizio
  • 353,855
5

I will present a more elementary approach. First, note that if we expand the numerator at the singularity, first term in the Taylor series of the numerator $\sin^2{x}$ is $(x-\pi)^2$, and the denominator is $(x-\pi)(x+ \pi)$, so the singularity does not contribute to the integral (we can just remove the point $x = \pi$ from the region of integration), and we can treat it with elementary methods.

Short version (not very rigorous, as it involves substracting two diverging integrals from each other).

$$I = \int_0^\infty \frac{\sin^2{x}}{(x^2-\pi^2)} dx =\frac{1}{2} \int_{-\infty}^\infty \frac{\sin^2{x}}{(x^2-\pi^2)} dx \text{ (since even function)}$$

$$= \frac{1}{2} \int_{-\infty}^\infty \frac{\sin^2{x}}{(x-\pi)(x + \pi)} dx = \frac{1}{4\pi}\int_{-\infty}^\infty {\sin^2{x}}\left(\frac{1}{x-\pi} - \frac{1}{x+\pi}\right) dx $$

$$= \frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{x}}}{x-\pi} dx- \frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{x}}}{x+\pi}dx$$

Now substitute $(x - \pi) = t$ and $(x + \pi) = s$ in the two integrals.

Then the expression becomes $$\frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{(t + \pi)}}}{t} dt - \frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{(s-\pi)}}}{s} ds$$

$$= \frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{t}}}{t} dt - \frac{1}{4\pi}\int_{-\infty}^\infty \frac{{\sin^2{s}}}{s} ds = 0$$

In the last step, I substructed two diverging integrals from each other.


Long version (rigourous)

Let's first replace the upper limit with $N$, and we will consider $N \rightarrow \infty$ later.

$$I = \int_0^N \frac{\sin^2{x}}{(x^2-\pi^2)} dx =\frac{1}{2} \int_{-N}^N \frac{\sin^2{x}}{(x^2-\pi^2)} dx \text{ (since even function)}$$

$$= \frac{1}{2} \int_{-N}^N \frac{\sin^2{x}}{(x-\pi)(x + \pi)} dx = \frac{1}{4\pi}\int_{-N}^N {\sin^2{x}}\left(\frac{1}{x-\pi} - \frac{1}{x+\pi}\right) dx $$

$$= \frac{1}{4\pi}\int_{-N}^N \frac{{\sin^2{x}}}{x-\pi} dx- \frac{1}{4\pi}\int_{-N}^N \frac{{\sin^2{x}}}{x+\pi}dx$$

Now substitute $(x - \pi) = t$ and $(x + \pi) = s$ in the two integrals. Then the expression becomes $$\frac{1}{4\pi}\int_{-N-\pi}^{N-\pi} \frac{{\sin^2{(t + \pi)}}}{t} dt - \frac{1}{4\pi}\int_{-N+\pi}^{N+\pi} \frac{{\sin^2{(s-\pi)}}}{s} ds$$ $$= \frac{1}{4\pi}\int_{-N-\pi}^{N-\pi} \frac{{\sin^2{t}}}{t} dt - \frac{1}{4\pi}\int_{-N+\pi}^{N+\pi} \frac{{\sin^2{s}}}{s} ds$$

$$= \frac{1}{4\pi}\int_{-N-\pi}^{-N+\pi} \frac{{\sin^2{t}}}{t} dt - \frac{1}{4\pi}\int_{N-\pi}^{N+\pi} \frac{{\sin^2{s}}}{s} ds$$

(the common term, $\frac{1}{4\pi}\int_{-N+\pi}^{N-\pi} \frac{{\sin^2{t}}}{t} dt$, cancels out)

Therefore,

$$|I| = \left|\frac{1}{4\pi}\int_{-N-\pi}^{-N+\pi} \frac{{\sin^2{t}}}{t} dt - \frac{1}{4\pi}\int_{N-\pi}^{N+\pi} \frac{{\sin^2{s}}}{s} ds \right| $$

$$ \leq \left|\frac{1}{4\pi}\int_{-N-\pi}^{-N+\pi} \frac{{\sin^2{t}}}{t} dt\right| + \left|\frac{1}{4\pi}\int_{N-\pi}^{N+\pi} \frac{{\sin^2{s}}}{s} ds \right| $$

$$ \leq \frac{1}{4\pi}\int_{-N-\pi}^{-N+\pi} \frac{1}{|t|} dt + \frac{1}{4\pi}\int_{N-\pi}^{N+\pi} \frac{1}{|s|} ds $$

$$ = \frac{1}{2\pi} \log{\frac{N+\pi}{N-\pi}} $$

$$ = \frac{1}{2\pi} \log{\left(\frac{1+\frac{\pi}{N}}{1-\frac{\pi}{N}}\right)}, $$

whose limiting value is $0$ as $N \rightarrow \infty$.

Therefore, $\lim_{N \rightarrow \infty} I = 0$.

Archisman Panigrahi
  • 2,156
  • 2
  • 19
  • 30
  • There is a problem with your proof because the integrals which you subtract are divergent. Can you justify this procedure? – user Dec 04 '23 at 13:06
  • 1
    @user One can integrate from $-N$ to $N$. After substituting $(x−π)=t$ and $(x+π)=s$, the difference will be an order $1/N$ term, which approaches zero when $N \rightarrow \infty$ – Archisman Panigrahi Dec 04 '23 at 14:03
  • @user I have updated my answer. – Archisman Panigrahi Dec 04 '23 at 23:44
  • Now it looks good (+1). The last argument can be simplified since $$I=-\frac{1}{2\pi}\int_{N-\pi}^{N+\pi} \frac{{\sin^2{t}}}{t} dt. $$ – user Dec 05 '23 at 06:32