Page 1 of 1

Nice integral

Posted: Sat Mar 16, 2024 2:17 pm
by Aryan
$$\int_{-\infty}^{+\infty}\frac{\cos x}{\left(1+x+x^2\right)^2+1}\mathrm{~d}x$$

Re: Nice integral

Posted: Sat Apr 06, 2024 8:37 am
by Riemann
Let $\displaystyle f(z) = \frac{e^{iz}}{\left ( 1 + z + z^2 \right )^2+1}$ and consider a semicircle $\gamma$ of radius $R$ at the upper half plane. The poles of $f$ are $z_1=i$ and $z_2=-1+i$. Then,


$$\oint \limits_{\gamma} f(z) \, \mathrm{d}z = \int_{-R}^{R} f(x) \, \mathrm{d}x + \int \limits_{\text{arc} \; \gamma} f(z) \, \mathrm{d}z $$

Letting $R \rightarrow +\infty$ we see that $\displaystyle \int \limits_{\text{arc} \; \gamma} f(z) \, \mathrm{d}z \overset{R \rightarrow +\infty}{\longrightarrow} 0$. On the other hand,

\begin{align*}
\oint \limits_{\gamma} f(z) \, \mathrm{d}z & = \oint \limits_{\gamma} \frac{e^{iz}}{\left ( 1 + z + z^2 \right )^2+1} \, \mathrm{d}z \\
&=2 \pi i \left [ - \frac{1}{e} \left ( \frac{1}{5} + \frac{i}{10} \right ) + \left ( \frac{1}{5} - \frac{i}{10} \right ) e^{-1-i} \right ] \\
&= \frac{\pi \left ( 1 + 2 \sin 1 + \cos 1 \right )}{5e} + i \frac{\pi \left ( 2 \cos 1 - \sin 1 - 2 \right )}{5e}
\end{align*}

Thus, $\displaystyle \int_{-\infty}^{\infty} \frac{\cos x}{\left ( 1 + x + x^2 \right )^2+1} \, \mathrm{d}x = \frac{\pi \left ( 1 + 2 \sin 1 + \cos 1 \right )}{5e}$. Furthermore,

$$\displaystyle \int_{-\infty}^{\infty} \frac{\sin x}{\left ( 1 + x + x^2 \right )^2+1} \, \mathrm{d}x = \frac{\pi \left ( 2 \cos 1 - \sin 1 - 2 \right )}{5e}$$