help with integral using residue theorem I'm solving the following integral:
$$I=\int_{-\infty}^{+\infty}\frac{x\cdot\cos x}{x^2-2x+10}\mathrm{d}x$$
I used the residue theorem as follows:
$$I=\mathrm{Re}\left(\int_{-\infty}^{+\infty}\frac{z\cdot e^{iz}}{z^2-2z+10}\mathrm{d}z\right)$$
The roots of the polynomials are:
$x_1=1+3i$
$x_2=1-3i$
Of which the first one lies in the integration half-circle. I computed the residue in $x_1$ as
$$\frac{(1+3i)e^{1+3i}}{6i}=\frac{(1+3i)e\cdot (\cos 3+i\cdot\sin 3)}{6i}$$
Value of the integral should thus be
$$\mathrm{Re}\left(2\pi i\frac{(1+3i)e\cdot (\cos 3+i\cdot\sin 3)}{6i}\right)$$
$$I=-\frac{\pi}{3}e\cdot(\cos 3-3\sin 3)$$
But according to both book and Wolfram the result should be 
$$\frac{\pi}{3e^3}(\cos 1-3\sin 1)$$
My result looks almost correct, but seems like I somehow interchanged 1 a 3. Can you please help me find the mistake?
Thanks


I used the residue theorem as follows:
  $$I=\mathrm{Re}\left(\int_{-\infty}^{+\infty}\frac{z\cdot e^{iz}}{z^2-2z+10}\mathrm{d}z\right)$$

Presumably you're integrating over a half-circle $\gamma.$ It should be
$$I=\mathrm{Re}\left(\int_\gamma\frac{z\cdot e^{iz}}{z^2-2z+10}\mathrm{d}z\right).$$

I computed the residue in $x_1$ as
  $$\frac{(1+3i)e^{1+3i}}{6i}=\frac{(1+3i)e\cdot (\cos 3+i\cdot\sin 3)}{6i}.$$

Here's your mistake, it should be $\dfrac{(1+3i)e^{\color{red}i(1+3i)}}{6i}$ which equals $$\dfrac{(\cos(1)-3\sin(1))+i(3\cos(1)+\sin(1))}{6e^{3}i}.$$
