My question concerns the path-independence integrals calculated using the residue theorem.
Consider the integral $$I=\int_{-\infty}^\infty\! \frac{1}{(z+i)(z+2i)(z+3i)}\ \mathrm{d}z. $$
It seems that by integrating over different contours, one could arrive at different values of $I$. For example, if one chose a semi-circle in the upper half-plane as a contour, applying Cauchy's Residue Theorem would show $I=0$. On the other hand if, if one chose a contour in the lower half-plane, one would arrive at $I=-2\pi i\sum_{j=1}^3\mathrm{Res}(f;z_j)$, where $z_j=-i,\ -2i, -3i$. However, it seems like the value of $I$ should be unique and not depend upon the chosen contour.
Is this logic correct? This question is driving me mad, and I would very much appreciate any help!!
Edit: Forgot a minus sign in application of Residue Theorem.
Using the second method (lower half-plane) you have $$ I=-2\pi i\left(\frac{1}{(-i+2i)(-i+3i)}+\frac{1}{(-2i+i)(-2i+3i)}+\frac{1}{(-3i+i)(-3i+2i)}\right)=0 $$ so you have $0$ with both methods. (I'm assuming the integral is over reals)