Evaluating $\int_{-\infty}^\infty\frac{\cos(2x)}{x^2+4}\:\mathrm{d}x$

calculusdefinite integralsimproper-integralsintegration

As stated in the title, I want to evaluate the integral
$$I=\int_{-\infty}^\infty\frac{\cos(2x)}{x^2+4}\:\mathrm{d}x$$
I'm pretty sure it evaluates to
$$\frac{\pi}{2e^4}$$
But I'm not sure how to evaluate it.

I have read an Instagram post where 3 different methods are provided for proving that
\begin{equation}
I(t)=\int_{-\infty}^\infty\frac{\cos(tx)}{x^2+1}\:\mathrm{d}x=\frac{\pi}{e^t}
\end{equation}

and I think similar logic can be applied here, but I am not sure how yet.

One of the methods mentioned in the post uses laplace transform to prove it but it's a little bit long. I'm wondering if there's any elegant method for evaluating $I$

I encountered this integral when I tried to solve this integral from one of the members of the Instagram math community.
$$\omega=\int_0^{\infty}\frac{x^2-4}{x^2+4}\:\frac{\sin 2x}{x}\mathrm{d}x$$
I first split the integral, used a property of laplace transform and some properties of the sine integral then used integration by parts and got to here
$$\omega=\frac{\pi}{2}-\left(2\int_{-\infty}^\infty\frac{\cos(2s)}{s^2+4}\:\mathrm{d}s+\pi\right)$$
Thank you so much for your help and attention! (BTW I'm not so proficient in complex analysis so I would prefer a solution without one :P)

Best Answer

It can be solved using differentiation under the integral sign. Consider the following integral:

\begin{equation} I(t)=\int\limits_{-\infty}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx = 2\int\limits_{0}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx \end{equation}

for any positive real $t$ and $k$. The first derivative with respect to $t$ is:

\begin{equation} I'(t)= -2\int\limits_{0}^{+\infty} \frac{x\sin(tx)}{x^{2}+k} \,dx \end{equation}

\begin{equation} \Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{x^{2}\sin(tx)}{x(x^{2}+k)} \,dx \end{equation}

\begin{equation} \Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{(x^{2}+k-k)\sin(tx)}{x(x^{2}+k)} \,dx \end{equation}

\begin{equation} \Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x} \,dx +2k\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x(x^{2}+k)} \,dx \end{equation}

The first one is just the sine integral as $x\rightarrow \infty$ and it is known to converge to $\frac{\pi}{2}$. Thus:

\begin{equation} I'(t)= 2k\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x(x^{2}+k)} \,dx -\pi \end{equation}

Differentiating once more with respect to $t$ yields:

\begin{equation} I''(t)= 2k\int\limits_{0}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx \end{equation}

\begin{equation} \Leftrightarrow \hspace{.3cm}I''(t)-kI(t)=0 \end{equation}

The general solution to the ODE is:

\begin{equation} I(t)=c_{1}e^{\sqrt{k}t}+c_{2}e^{-\sqrt{k}t} \end{equation}

Plugging some conditions $\left(I(t=0) \,\,\text{and}\,\, I'(t=0)\right)$ allows you to find that $c_{1}=0$ and that $c_{2}=\frac{\pi}{\sqrt{k}}$. Then:

\begin{equation} \boxed{\int\limits_{-\infty}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx = \frac{\pi}{\sqrt{k}}e^{-\sqrt{k}t}} \end{equation}

for positive real values of $t$ and $k$. If you plug $t=2$ and $k=4$, you obtain the desired result.

Related Question