\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\begin{document}
\newcommand\ds{\displaystyle}
\parindent=0pt

QUESTION

Evaluate the following real Fourier integrals:

\begin{description}

\item[(i)]
$\ds\int_{-\infty}^\infty \frac{\cos nx}{x^2+x+1}\,dx$

\item[(ii)]
$\ds\int_{-\infty}^\infty \frac{\sin nx}{x^2+x+1}\,dx$

\item[(iii)]
$\ds\int_{-\infty}^\infty \frac{\cos x}{(x^2+1)^2(x^2+2)}\,dx$

\end{description}
Hint: to solve $\int \cos x f(x)\,dx$, where $f(x)$ is a real
function of $x$, solve

$\int e^{ix}f(x)\,dx$, then take the real part of the result.

Similarly, to calculate $\int \sin x
f(x)\,dx$, take the imaginary part. Remember that to evaluate
$\int e^{ix}f(x)\,dx$, you must close the contour with a
semicircle in the upper half- if you closed in the lower half the
semicircle would contribute.

\bigskip

ANSWER

\begin{description}

\item[(i)]
 $\ds I=\int_{-\infty}^\infty \frac{\cos (nx)}{x^2+x+1}=$ Re$J$ where
 $\ds J=\int_{-\infty}^\infty \frac{e^{inx}}{x^2+x+1}$

 $\begin{array}{l}
 \textrm{Closed contour in upper half plane }
 \end{array}
 \ \ \
 \begin{array}{c}
 \epsfig{file=272-2-1.eps, width=30mm}
 \end{array}$

 Simple poles at $z^2+z+1=0,\ (z+\frac{1}{2})^2=\frac{1}{4}-1,\
 z=-\frac{1}{2}\pm \frac{\sqrt{3}}{2}$; only
 $z=-\frac{1}{2}+\frac{\sqrt{3}}{2}$ is inside the closed contour.
 \begin{eqnarray*}
 \textrm{J}&=& 2 \pi i
 \textrm{Res}\left(\frac{e^{inz}}{z^2+z+1},-\frac{1}{2}+\frac{\sqrt{3}}{2}i\right)\\
 &=& 2 \pi i \lim_{z \to
 -\frac{1}{2}+\frac{\sqrt{3}}{2}i}\frac{e^{inz}}{2z+1}\\
 &=&2 \pi i
 \frac{e^{in\left(-\frac{1}{2}+\frac{\sqrt{3}}{2}i\right)}}{\sqrt{3}i}\\
 &=&\frac{2\pi}{\sqrt{3}} e^{-\frac{1}{2}in-\frac{\sqrt{3}}{2}n}
 \end{eqnarray*}

 $I=\textrm{Re}J=\frac{2 \pi}{\sqrt{3}}e^{-\frac{\sqrt{3}}{2}n}\cos
 \frac{n}{2}$

\item[(ii)]
 $$\int_{-\infty}^\infty \frac{\sin
 (nx)}{x^2+x+1}=\textrm{Im}J=-\frac{2
 \pi}{\sqrt{3}}e^{-\frac{\sqrt{3}}{2}n}\sin \frac{n}{2}$$

\item[(iii)]
 $I=\textrm{Re}J, J=\int_\gamma \frac{e^{iz}}{(z^2+1)^2(z^2+2)}$

 Poles inside the contour are : $z=i$ a double pole and
 $z=\sqrt{2}i$ a simple pole.
 $$\textrm{Res}\left(\sqrt{2}i\right)=\frac{e^{i\left(\sqrt{2}i\right)}}
 {\left(\left(\sqrt{2}\right)^2+1\right)^22
 \left(\sqrt{2}i\right)}=\frac{e^{-\sqrt{2}}}{2\sqrt{2}i}$$


 $\ds\textrm{Res}(i)=\lim_{z \to
 i}\frac{d}{dz}\frac{e^{iz}}{(z^2+2)(z+i)^2}$

 $\ds =\lim_{z \to i}\left(\frac{ie^{iz}}{(z^2+2)(z+i)^2}-\frac{2ze^{iz}}{(z^2+2)^2(z+i)^2}
\right) -\left(\frac{2e^{iz}}{(z^2+2)(z+i)^3}\right)$

$\ds
=e^{-1}\left(\frac{1}{1.(2i)^2}-\frac{2i}{1^2(2i)^2}-\frac{2}{1(2i)^3}\right)
=e^{-1}\left(-\frac{i}{4}+\frac{i}{2}-\frac{i}{4}\right)=0$

 $J=2 \pi i
 \frac{e^{-\sqrt{2}}}{2\sqrt{2}i}=\frac{\pi}{\sqrt{2}}e^{-\sqrt{2}}.
 \ \ I=J$


\end{description}


\end{document}
