I am having troubles evaluating this integral: $$\int_{-\infty}^{\infty} \frac{\cos x-1}{x^2(x^2+4)}dx$$ Well, actually, I'm quite sured about the numerical part: the value of this integral is likely to be $-\frac{(e^{-2}+1)\pi}{8}$. However, I am having troubles when proving it.
Firstly, by a given hint, I constructed a new function which is: $$f(z)=\frac{e^{iz}-1-iz}{z^2(z^2+4)}$$ Then, I constructed a contour $\gamma =\gamma_1\cup\gamma_2\cup\gamma_r\cup\gamma_R$, with:$$\gamma_1=\{x+0i:-R\le x\le-r\}$$ $$\gamma_2=\{x+0i:r\le x \le R\}$$ $$ \gamma_r = \{re^{i\theta}:\theta\in[\pi,0]\}$$$$ \gamma_R = \{Re^{i\theta}:\theta\in[0, \pi]\}$$ Then, by residue theorem, I evaluate the integral $\int_{\gamma}f(z)dz$ to be equal to $-\frac{(e^{-2}+1)\pi}{8}$. Then, what's left is to prove that $\int_{\gamma_1}f(z)dz$ and $\int_{\gamma_2}f(z)dz$ are both equal to zero as $r\to0$ and $R\to\infty$ and that's what's troubling me.
I have no idea how to prove that the integral: $$\lim_{r\to0}\int_{\gamma_r}\frac{e^{iz}-1-iz}{z^2(z^2+4)}dz$$where clearly, $z=re^{i\theta}$, is equal to $0$, and also, for the case where the contour is $\gamma_{R}$.
Please help me! Thanks a lot.
Appreciate you are seeking a solution via Residues. Here is a solution using Feynman's Trick coupled with Laplace Transforms (which is Residue in disguise). Here your integral is: \begin{equation} I = \int_{-\infty}^{\infty} \frac{\cos(x) - 1}{x^2\left(x^2 + 1\right)}\:dx\nonumber \end{equation} Here we introduce the function: \begin{equation} J(t) = \int_{-\infty}^{\infty} \frac{\cos(tx) - 1}{x^2\left(x^2 + 1\right)}\:dx\nonumber \end{equation} Here we see that $J(0) = 0$ and $\lim_{t \rightarrow 1^+} J(t) = I$. We begin by taking the derivative with respect to $t$. To do so, we need to employ Leibniz's Integral Rule: \begin{equation} J'(t) = \int_{-\infty}^{\infty} \frac{\frac{\partial}{\partial t}\left[\cos(tx) - 1\right]}{x^2\left(x^2 + 1\right)}\:dx = \int_{-\infty}^{\infty} \frac{-x\sin(tx)}{x^2\left(x^2 + 1\right)}\:dx = \int_{-\infty}^{\infty} \frac{-\sin(tx)}{x\left(x^2 + 1\right)}\:dx \end{equation} We note that $J'(0) = 0$. Differentiating with respect to $t$ again, yields: \begin{equation} J''(t) = \int_{-\infty}^{\infty} \frac{-x\cos(tx)}{x\left(x^2 + 1\right)}\:dx = - \int_{-\infty}^{\infty} \frac{\cos(tx)}{x^2 + 1}\:dx \end{equation} We proceed by taking the Laplace Transform with respect to $t$. To do so, we must employ Fubini's Theorem: \begin{align} \mathscr{L}\left[J''(t)\right] &=- \int_{\infty}^{\infty}\frac{\mathscr{L}\left[\cos(tx)\right]}{x^2 + 1}\:dx \nonumber \\ s^2\mathscr{L}\left[J(t)\right] - sJ(0) - sJ'(0) &= -\int_{\infty}^{\infty} \frac{s}{s^2 + x^2} \cdot \frac{1}{x^2 + 1}\:dx \nonumber \\ s^2\mathscr{L}\left[J(t)\right] &= -s \int_{\infty}^{\infty} \frac{1}{\left(s^2 + x^2\right)\left(x^2 + 1\right)} \:dx \nonumber \\ -s\mathscr{L}\left[J(t)\right] &= \frac{1}{s^2 - 1}\int_{\infty}^{\infty}\left[\frac{1}{x^2 + 1} - \frac{}{s^2 + x^2} \right]\:dx = \frac{1}{s^2 - 1}\left[\arctan(x) - \frac{1}{s}\arctan\left(\frac{x}{s} \right) \right]_{-\infty}^{\infty} \nonumber \\ &= \frac{1}{s^2 - 1}\left[\pi - \frac{\pi}{s} \right] = \frac{\pi}{s^2 - 1}\cdot\frac{s - 1}{s} = \frac{\pi}{s\left(s + 1\right)} \end{align} And so, \begin{equation} \mathscr{L}\left[J(t)\right] = -\frac{\pi}{s^2\left(s + 1\right)} \Longrightarrow J(t) = \mathscr{L}^{-1}\left[-\frac{\pi}{s^2\left(s + 1\right)} \right] = -\pi\left( t + e^{-t} - 1\right) \end{equation} We now may resolve $I$ by taking the limit as above: \begin{equation} I = \int_{-\infty}^{\infty} \frac{\cos(x) - 1}{x^2\left(x^2 + 1\right)}\:dx = -\pi\left(1 + e^{-1} - 1\right) = -\pi e^{-1}\nonumber \end{equation}