Path-Independence and the Residue Theorem

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!!

• If you chose a semi circle in the upper half plane, since the singularities are not enclosed by the contour, integral is zero. However, if you are considering a semi circle in the lower half-plane, this will enclose the singularities at $-i$, $-2i$ and $-3i$ then residue theorem gives zero... – Phoenix Aug 10 '17 at 21:42
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)
• (+1) Clear and concise. Just one point ... technically, $I=-2\pi i \sum_n \text{Res}(f, z=z_n)$ since the contour in the lower-half plane is traversed clockwise. I've edited accordingly. ;-) – Mark Viola Aug 10 '17 at 21:34