# Evaluating Integral with Residue Theorem

The integral in question is

$$\int_{_C} \frac{z}{z^2+1}\,dz,$$ where $C$ is the path $|z-1| = 3.$

The two pole of $f(x)$ where $f(x)=\frac{z}{z^2+1}$ is $-j$ and $j$

$${\rm Res}_{z=z_0}f(x)=\lim_{z\rightarrow\infty}(z-z_0)f(z)$$

For the first pole:

$${\rm Res}_{z=j}f(z)= \lim_{z\rightarrow\\j}(z-j)\frac{z}{z^2+1} \\ = \lim_{z\rightarrow\\j}\frac{(z-j)z}{(z+j)(z-j)}\\ =\lim_{z\rightarrow\\j}\frac{z}{(z+j)} =\frac{j}{(j+j)}$$

${\rm Res}_{z=j}f(z)= \frac{1}{2}$.

For the second pole:

$${\rm Res}_{z=-j}f(z)= \lim_{z\rightarrow\\-j}(z+j)\frac{z}{z^2+1} \\ = \lim_{z\rightarrow\\-j}\frac{(z+j)z}{(z+j)(z-j)}\\ = \lim_{z\rightarrow\\-j}\frac{z}{(z-j)}\\ = \frac{j}{(-j-j)}$$

${\rm Res}_{z=-j}f(z)= \frac{-1}{2}$.

Sum:

$${\rm Res}_{z=j}f(z)+ {\rm Res}_{z=-j}f(z)= \frac{1}{2}-\frac{1}{2} = 0$$

Now I have always been under the impression that when integrating inside a path, the only time when the result is 0 is when there are no pole in or on the path.

Am I mistaken? or have I made an error in the calculation? Or should I not be trying to use the Residue Theorem all together?

Any help would be much appreciated.

-
I guess the answer of naveenk903 is to say that the integral might well be 0, even though some poles are inside the path. If some poles are on the path, well..., I have not been familiar with this part. Inform me if necessary.Thanks. –  awllower Jun 19 '12 at 11:47

For the second pole: $${\rm Res}_{z = -i} f(z) = \lim_{z \to -i} \frac{(z+i) z}{(z+i)(z-i)} = \lim_{z \to -i} \frac{z}{z-i} = \frac{-i}{-2i} = \frac{1}{2}$$ so in fact two poles contribute the same to the final result which is $2\pi i \cdot \left( \frac{1}{2} + \frac{1}{2} \right) = 2\pi i$.
@Synia sure, if the residues sum up to $0$ why not? Consider for example function $g(z) = \frac{1}{z} - \frac{1}{z-1}$. Then ${\rm Res}_{z=0} g(z) = 1$ and ${\rm Res}_{z=1} g(z) = -1$ so when integrating along adequate contour the integral will be $0$. –  qoqosz Jun 19 '12 at 20:28