Surely You're Joking, Mr. Feynman! $\int_0^\infty\frac{\sin^2x}{x^2(1+x^2)}\,dx$

This question already has an answer here:

  • Differentiation wrt parameter $\int_0^\infty \sin^2(x)\cdot(x^2(x^2+1))^{-1}dx$

    4 answers

Solutions Collecting From Web of "Surely You're Joking, Mr. Feynman! $\int_0^\infty\frac{\sin^2x}{x^2(1+x^2)}\,dx$"

This integral is readily evaluated using Parseval’s theorem for Fourier transforms. (I am certain that Feynman had this theorem in his tool belt.) Recall that, for transform pairs $f(x)$ and $F(k)$, and $g(x)$ and $G(k)$, the theorem states that

$$\int_{-\infty}^{\infty} dx \, f(x) g^*(x) = \frac1{2 \pi} \int_{-\infty}^{\infty} dk \, F(k) G^*(k) $$

In this case, $f(x) = \frac{\sin^2{x}}{x^2}$ and $g(x) = 1/(1+x^2)$. Then $F(k) = \pi (1-|k|/2) \theta(2-|k|)$ and $G(k) = \pi \, e^{-|k|}$. ($\theta$ is the Heaviside function, $1$ when its argument is positive, $0$ when negative.) Using the symmetry of the integrand, we may conclude that

$$\begin{align}\int_0^{\infty} dx \frac{\sin^2{x}}{x^2 (1+x^2)} &= \frac{\pi}{2} \int_0^{2} dk \, \left ( 1-\frac{k}{2} \right ) e^{-k} \\ &= \frac{\pi}{2} \left (1-\frac1{e^2} \right ) – \frac{\pi}{4} \int_0^{2} dk \, k \, e^{-k} \\ &= \frac{\pi}{2} \left (1-\frac1{e^2} \right ) + \frac{\pi}{2 e^2} – \frac{\pi}{4} \left (1-\frac1{e^2} \right )\\ &= \frac{\pi}{4} \left (1+\frac1{e^2} \right )\end{align} $$

Here is my attempt:
\begin{align}
\int_0^\infty\frac{\sin^2x}{x^2(1+x^2)}dx&=\int_0^\infty\left[\frac{\sin^2x}{x^2}-\frac{\sin^2x}{1+x^2}\right]dx\\
&=\int_0^\infty\frac{\sin^2x}{x^2}dx-\frac{1}{2}\int_0^\infty\frac{1-\cos2x}{1+x^2}dx\\
&=\frac{\pi}{2}-\frac{1}{2}\int_0^\infty\frac{1}{1+x^2}dx+\frac{1}{2}\int_0^\infty\frac{\cos2x}{1+x^2}dx\\
&=\frac{\pi}{2}-\frac{1}{2}\frac{\pi}{2}+\frac{1}{2}\frac{\pi}{2e^2}\\
&=\frac{\pi}{4}+\frac{\pi}{4e^2}
\end{align}
where I use these links: $\displaystyle\int_0^\infty\frac{\sin^2x}{x^2}dx$ and $\displaystyle\int_0^\infty\frac{\cos2x}{1+x^2}dx$ to help me out.

Unfortunately, this is not the Feynman way but I still love this method.

Consider
$$
I(a)=\int_0^\infty\frac{\sin^2(ax)}{x^2(x^2+1)}dx
$$
Differentiate it twice. Since
$$
\int_0^\infty\frac{\cos(kx)}{x^2+1}dx=\frac{\pi}{2e^k}
$$
for $k>0$ we get $I”(a)=\pi e^{-2a}$. Note that $I'(0)=I(0)=0$, so after solving respective IVP we get
$$
I(a)=\frac{\pi}{4}(-1+2a+e^{-2a})
$$
Now it only remains to substitute for $a=1$.