Calculate the following definite integral
$$\int_{- \infty}^{\infty}\frac{\sin 3x}{x(x^2+1)}dx$$
using the residue theorem
This was my attempted solution:
Solution: $$\int_{- \infty}^{\infty}\frac{\sin 3x}{x(x^2+1)}dx = \int_{-\infty}^{\infty} \operatorname{Im}\left[\frac{e^{i3z}}{z(z^2+1)}\right]dz = \operatorname{Im}\left[\int_{- \infty}^{\infty} \frac{e^{i3z}}{z(z^2+1)} dz\right]$$
Now note that $f(z) = \frac{e^{i3z}}{z(z^2+1)}$ has singularities at $z_0 = 0$ and $z_1 = i$ and $z_2 = -i$ then using the residue theorem we have $$\int_{- \infty}^{\infty} \frac{e^{i3z}}{z(z^2+1)} dz = 2\pi i \sum_{k=0}^2 \operatorname{Res}_{z = z_k} f(z)$$
Then calculating the residues at $z_0$, $z_1$ (we don't need to calcualte $z_2$ since it's not in the upper half-plane) we get $\operatorname{Res}_{z = z_0} f(z) = 1$ and $\operatorname{Res}_{z = z_1} f(z) = \frac{1}{-2e^3}$
Hence $$ \sum_{k=0}^2 \operatorname{Res}_{z = z_k} f(z) = 1- \frac{1}{2e^3}$$ and we have that $$\operatorname{Im}\left[\int_{- \infty}^{\infty} \frac{e^{i3z}}{z(z^2+1)} dz\right] = \pi\left(2 -\frac{1}{e^3} \right)$$ and thus $$\int_{- \infty}^{\infty}\frac{\sin 3x}{x(x^2+1)}dx = \pi\left(2 -\frac{1}{e^3} \right)$$
However the solution that my lecturer gave was $\pi\left(1 -\frac{1}{e^3} \right)$, is his solution incorrect or is mine incorrect and if so why?