Use Cauchy Residue Theorem to evaluate (i) $\int_0^\infty \frac{\cos x}{(x^2+1)^2}dx$ (ii) $\int_0^\infty \frac{\sin^2 x}{1+x^2}dx$
Aryan Yadav, AIR 31, 2025
i) $\int_0^\infty \frac{\cos x\, dx}{(x^2+1)^2} = \frac{1}{2}\int_{-\infty}^\infty \frac{\cos z\, dz}{(z^2+1)^2} = \frac{1}{2}\text{Real}(I)$
$I = \int_{-\infty}^\infty \frac{e^{iz}}{(z^2+1)^2}$
[an upper semicircular contour in the complex plane with counter-clockwise arrows, $-R$ and $R$ marked on the real axis and $\Gamma$ on the arc]
For given contour $\Rightarrow I = \int_\Gamma \frac{e^{iz}dz}{(z^2+1)^2} + \int_{-R}^R \frac{e^{iz}dz}{(z^2+1)^2}$
Clearly $\lim_{z\to\infty} \frac{1}{z^2+1} = 0$
By Jordan's Lemma $\int_\Gamma \frac{e^{iz}}{(z^2+1)^2} = 0$ as $R\to\infty$
$\Rightarrow I = \int_{-\infty}^\infty \frac{e^{iz}dz}{(z^2+1)^2} = 2\pi i \sum R$ -(1)
Sum of Residues inside contour
Singularities are $z^2+1 = 0 \Rightarrow z = \pm i$
Only $z = i$ lies inside Contour (Pole of order 2)
Residue at $z = i$ is $\lim_{z\to i}\frac{d}{dz}\left(\frac{e^{iz}}{(z^2+1)^2}(z-i)^2\right)$
$= \lim_{z\to i} \frac{d}{dz}\left(\frac{e^{iz}}{(z+i)^2}\right)$
$= \lim_{z\to i} \frac{i e^{iz}}{(z+i)^2} - \frac{2e^{iz}}{(z+i)^3} = \frac{-i}{2e}$
From (1) $I = 2\pi i\left(\frac{-i}{2e}\right) = \frac{\pi}{e}$
Required integral $= \frac{1}{2}$ Real part of $I$
$= \boxed{\frac{\pi}{2e}}$
(ii) $\int_0^\infty \frac{\sin^2 x}{x^2+1}\,dx = \int_0^\infty \frac{1-\cos 2x}{2(x^2+1)}\,dx$
$= \frac{1}{2}\int_{-\infty}^{\infty} \frac{1-\cos 2x}{2(x^2+1)}\,dx$
$= \frac{1}{4}$(Real part of $I$) $-$①
Where $I = \int_{-\infty}^{\infty} \frac{1-e^{2iz}}{z^2+1}$
Using same contour as above
again singularities are $z = \pm i$
only $z=i$ (simple pole) lies inside
$\Rightarrow I = 2\pi i \left(\frac{1-e^{2i(i)}}{(i+i)}\right)$
$= 2\pi i \left(\frac{1-e^{-2}}{2i}\right) = \pi(1-e^{-2})$
From (1)
Integral is $\boxed{\frac{\pi}{4}(1-e^{-2})}$