Calculating an integral (using methods from complex analysis) (hints only please) From Rudin's book, we are to calculate $\int_\mathbb{R} \Big(\frac{\sin x}{x}\Big)^2 e^{itx}dx$ where $i$ is the imaginary number and $t\in\mathbb{R}$.
I'm looking for a hint on how to get started. I know the Residue Theorem, but I'm unsure whether it would be better to take a path which includes or excludes the singularity at $z=0$ (after converting the integrand to a complex function of the variable $z$). I have a solution which shows how to integrate $\int_\mathbb{R}\frac{\sin x}{x}dx$ from John B. Conway's text, but I am unsure if I am able to adapt this to the current problem. Any hints you may have would be greatly appreciated. Thanks in advance!
 A: Assuming you have the line of real numbers. Then you can extend it to a complex plane by adding a line of imaginary numbers perpendicular to the line of real numbers. You can form a very very big half-circle connecting the two Ends of the real lines. On this half-circle, your Integrand is Zero (because of the $x$ in the denominator). Now you extend your real $x$ to a complex number $z$, i.e. $x=z$ and your integral over all real numbers can be Extended to a closed contour integral over the complex plane involving the half-circle. Now you can evaluate the contour integral by Cauchy's integral formula. 
A: Hint and outline of evaluation:
Let$$\Phi (z)=\frac{1}{z^2}\left(e^{i(t+2)z}-e^{2itz}+e^{i(t-2)z}\right).$$
Prop.$1$.$$\lim_{ R\to \infty} \int_{C_R^+}\frac{e^{i\alpha z}}{z^2}dz=0\,\, \text{when} \,\,\alpha >0$$
where $C_R^+$ is the upper semi-circle radius $R$.$$\lim_{ R\to \infty} \int_{C_R^-}\frac{e^{i\beta  z}}{z^2}dz=0\,\, \text{when} \,\,\beta  <0$$
where $C_R^-$ is the lower semi-circle radius $R\,\,$  (oriented clockwise).  
Prop.$2$.$$\lim_{ \epsilon\to 0} \int_{C_\epsilon} \Phi(z) dz=0$$
where $  {C_\epsilon} $:$\, z=\epsilon e^{i\theta }, \pi\le \theta \le 2\pi$.  
For $t$ with $0<t<2$, take $$\varphi (z)=\frac{1}{z^2}\left(e^{i(t+2)z}-e^{2itz}\right) \,\,\text{and}\,\, \,
\phi(z)=\frac{e^{i(t-2)z}}{z^2} .$$
Then$$\left(\int_{-R}^{-\epsilon}+\int_\epsilon^R\right)\varphi (x)dx+\int_{C_\epsilon}\varphi (z)dz +\int_{C_R^+}\varphi (z)dz=2\pi i\operatorname{Res}(\varphi , 0),$$$$\left(\int_{-R}^{-\epsilon}+\int_\epsilon^R\right)\phi (x)dx+\int_{C_\epsilon}\phi (z)dz +\int_{C_R^-}\phi (z)dz=0.$$Therefore
$$  \left(\int_{-R}^{-\epsilon}+\int_\epsilon^R\right)\Phi (x)dx+\int_{C_\epsilon}\Phi (z)dz +\int_{C_R^+}\varphi (z)dz+\int_{C_R^-}\phi (z)dz=2\pi i\operatorname{Res}(\varphi , 0).$$Letting $R \to \infty$ and $\epsilon \to 0$, we find that$$\int_{-\infty}^\infty \Phi (x)dx=2\pi i \operatorname{Res}(\varphi , 0).$$  
For $t$ with $2<t$,  take $$\varphi (z)=\frac{1}{z^2}\left(e^{i(t+2)z}-e^{2itz}+e^{i(t-2)z}\right) \,\,\text{and}\,\, \phi(z)=0 .$$
