Evaluate the Cauchy Principal Value of $\int_{-\infty}^{\infty} \frac{\sin x}{x(x^2-2x+2)}dx$ Evaluate the Cauchy Principal Value of  $\int_{-\infty}^\infty \frac{\sin x}{x(x^2-2x+2)}dx$
so far, i have deduced that there are poles at $z=0$ and $z=1+i$ if using the upper half plane. I am considering the contour integral $\int_C \frac{e^{iz}}{z(z^2-2z+2)}dz$ I dont know how to input graphs here but it would be intended at the origin with a bigger R, semi-circle surrounding that. So, I have four contour segments. 
$\int_{C_R}+\int_{-R}^{-r}+\int_{-C_r}+\int_r^R=2\pi i\operatorname{Res}[f(z)e^{iz}, 1+i]+\pi iRes[f(z)e^{iz},o]$ I think.   Ok, so here is where I get stuck. Im not sure how to calculate the residue here, its not a higher pole, so not using second derivatives, not Laurent series. Which method do I use here?

$\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\dsc}[1]{\displaystyle{\color{red}{#1}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,{\rm Li}_{#1}}
 \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$

Zeros of $\ds{x^{2} - 2x + 2}$ are given by $\ds{r_{\pm} = 1 \pm \ic=\root{2}\exp\pars{\pm\ic\,{\pi \over 4}}}$.

\begin{align}&\color{#66f}{\large%
\int_{-\infty}^{\infty}{\sin\pars{x} \over x\pars{x^{2} - 2x + 2}}\,\dd x}
=\int_{-\infty}^{\infty}{1 \over x^{2} - 2x + 2}\,\
\overbrace{\half\int_{-1}^{1}\expo{\ic kx}\,\dd k}
^{\ds{=\ \dsc{\sin\pars{x} \over x}}}\ \,\dd x
\\[5mm]&=\half\,\Re\int_{-1}^{1}\int_{-\infty}^{\infty}
{\expo{\ic\verts{k}x} \over x^{2} - 2x + 2}\,\dd x\,\dd k
=\half\,\Re\int_{-1}^{1}2\pi\ic\lim_{x\ \to\ r_{+}}\bracks{\pars{x - r_{+}}
{\expo{\ic\verts{k}x} \over x^{2} - 2x + 2}}\,\dd k
\\[5mm]&=\pi\,\Re\int_{-1}^{1}
{\expo{\ic\verts{k}r_{+}} \over 2r_{+} - 2}\,\dd k
={\pi \over 2}\,\Re\bracks{%
\ic\int_{-1}^{1}{\expo{\pars{-1 + \ic}\verts{k}} \over \ic}\,\dd k}
=\pi\,\Re\bracks{%
\int_{0}^{1}\expo{\pars{-1 + \ic}k}\,\dd k}
\\[5mm]&=\pi\,\Re\bracks{\expo{\pars{-1 + \ic}}  - 1\over -1 + \ic}
=\pi\,\Re{\bracks{\expo{-1}\cos\pars{1}  - 1 + \expo{-1}\sin\pars{1}\ic}
\pars{-1 - \ic}\over 2}
\\[5mm]&={\pi \over 2}\bracks{-\expo{-1}\cos\pars{1}  + 1 + \expo{-1}\sin\pars{1}}
=\color{#66f}{\large%
{\pi \over 2}\bracks{1 + {\sin\pars{1} - \cos\pars{1} \over \expo{}}}}
\end{align}
