I am not certain if my Process of using Cauchy's Theorem is sound. $$ \int_{1=|z-i|} \frac {1}{z^2+1}dz = \int_{1=|z-i|} \frac {1}{(z-i)(z+i)}dz = \int_{1=|z-i|} \frac {\frac {1}{z-1}}{(z+i)}dz $$ Now I can use Cauchy's Theorem and get $$ = 2 \pi i * \frac{1}{2i} = -\pi $$
Similarly i get the $\int_{1=|z-i|} \frac {1}{z^2+1}dz =\pi$
Is my process correct?
Thank you for your time :)
The function $f(z)=\frac1{z^2+1}$ has simple poles at $z=i$ and $z=-i$. The pole at $z=-i$ is not enclosed by the contour $|z-i|=1$. Only the pole at $z=i$ is enclosed.
Hence, we have from Cauchy's Integral Formula
$$\begin{align} \oint_{|z-i|=1}\frac1{z^2+1}\,dz&=\oint_{|z-i|=1}\frac{\frac1{z+i}}{z-i}\,dz\\\\ &=2\pi i \frac{1}{i+i}\\\\ &=\pi \end{align}$$