Why am I getting this error using Cauchy's integral formula?

30 Views Asked by At

$$ \int_{\gamma}\frac{dz}{z^2+1} = \frac{1}{2i}\int_{\gamma}\frac{dz}{z-i}-\frac{1}{2i}\int_{\gamma}\frac{dz}{z+i} = 2 \pi i \times0$$

By cauchy's integral formula right?

According to my lecture notes this should be $ \pi$

Where $\gamma$ is a closed contour, semicircle of radius $R$. in the upper half plane