I am trying to evaluate this very long definite integral given below:
$$ \int_{-\infty}^{+\infty} \frac{\cos(4x)}{x^2 + 2x + 2} \, dx$$
The direction it can go is by decomposing the denominator to $(x−i+1)$ and $(x+i+1)$ and then taking partial fraction
$$ \frac{i\cos(4x)}{2(x−i+1)} - \frac{i\cos(4x)}{2(x−i+1)}. $$
The online mathematical integral solvers follow this procedure, which ends up with a long and ugly solution to this integral.
Is there a better way to go about this integral? And are there any elegant solutions?
Thanks for your time!
Let $x+1=t$
\begin{align} I=& \int_{-\infty}^{\infty} \frac{\cos(4x)}{x^2 + 2x + 2} \, dx =\cos4 \int_{-\infty}^{\infty} \frac{\cos(4t)}{t^2 +1} \, dt \end{align}
where the odd $\sin 4t$ term vanishes upon integration. Denote $J(a)=\int_{-\infty}^{\infty} \frac{\cos(at)}{t^2 +1} dt$. Then, $J’(a)=-\pi+ \int_{0}^{\infty} \frac{\sin(at)}{t(t^2 +1)} dt$ and $J’’(a)=J(a) $. Given the boundary values $J(0) = -J’(0)= \pi$, solve to get $J(a)= \pi e^{-a}$. As a result
$$I=\cos4 \ J(4) =\pi e^{-4} \cos4$$