Evaluate the integral $\int\limits_{-\infty}^\infty \frac{\cos(x)}{x^2+1}dx$. Evaluate the integral $\displaystyle\int\limits_{-\infty}^\infty \frac{\cos(x)}{x^2+1} dx$. 
Hint: $\cos(x) = \Re(\exp(ix))$
Hi, I am confused that if I need to use the Residue Theorem in order to solve this, and I am not sure where I should start. 

Another approach: A combination of Feynman's Trick and Laplace Transforms:
\begin{equation}
J = \int_{-\infty}^{\infty}\frac{\cos(x)}{x^2 + 1}\:dx
\end{equation}
Here let:
\begin{equation}
I(t) = \int_{-\infty}^{\infty}\frac{\cos(xt)}{x^2 + 1}\:dx
\end{equation}
We see $I(1) = J$ and $I(0) = \pi$. Here we take the Laplace Transform w.r.t. '$t$':
\begin{align}
\mathscr{L}\left[I(t)\right] &= \int_{-\infty}^{\infty}\frac{\mathscr{L}\left[\cos(xt)\right]}{x^2 + 1}\:dx = \int_{-\infty}^{\infty} \frac{s}{s^2 + x^2}\cdot\frac{1}{x^2 + 1}\:dx \\
&=\frac{s}{s^2 - 1}\int_{-\infty}^{\infty}\left[\frac{1}{x^2 + 1} - \frac{1}{x^2 + s^2}  \right]\:dx \\
&= \frac{s}{s^2 - 1} \left[ \arctan(x) - \frac{1}{s}\arctan\left(\frac{x}{s} \right)\right]_{-\infty}^{\infty} \\
&= \frac{s}{s^2 - 1} \left[ \left(\frac{\pi}{2} - \frac{1}{s}\cdot \frac{\pi}{2} \right) - \left(-\frac{\pi}{2} - \frac{1}{s}\cdot -\frac{\pi}{2} \right) \right] \\
&= \frac{s}{s^2 - 1} \left[ \pi - \pi\frac{1}{s} \right] =  \frac{s}{s^2 - 1} \cdot \frac{s - 1}{s}\pi = \frac{\pi}{s + 1}
\end{align}
We now take the inverse Laplace Transform:
\begin{align}
 I(t) = \mathscr{L}^{-1}\left[ \frac{\pi}{s + 1}\right] = \pi e^{-t}
\end{align}
And finally:
\begin{equation}
 J = I(1) = \pi e^{-1} = \frac{\pi}{e}
\end{equation}
Now this is essentially residue analysis, but I've found it to be a useful technique for integrals of this type. 
