Having played around with [Wolfram Alpha](https://www.wolframalpha.com/input/?i=integral%20%28sin%20x%29%5E2%2F%28x%5E2-pi%5E2%29%20from%200%20to%20infty), 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$?](https://math.stackexchange.com/q/5248)

How can I prove (1)?

---

> 
> [![enter image description here](https://i.stack.imgur.com/MKj7Z.png)](https://i.stack.imgur.com/MKj7Z.png)
> 
> 
>