Find all possible values of $$\int_{\gamma} \frac {dz} {1+z^2}$$ where $\gamma$ is any closed contour not passing through $\pm i$.
Assuming that $\gamma$ is homologous to zero then if both $\pm i$ lying outside $\gamma$ then the integral value is zero. If $i \in I(\gamma)$ but $-i \notin I(\gamma)$ then by Residue theorem it follows that the integral value is $\pi n(\gamma;i)$ and if $i \notin I(\gamma)$ but $-i \in I(\gamma)$ then by Residue theorem it follows that the integral value is $-\pi n(\gamma;-i)$ and when both of $\pm i \in I(\gamma)$ then by applying the same theorem it follows that the integral value is $\pi [n(\gamma;i)-n(\gamma;-i)]$; where $I(\gamma)$ denotes the interior of $\gamma$ and $n(\gamma;a)$ denotes the winding number of $\gamma$ around $a$.
Is it correct at all? Please check it.
Thank you in advance.