a) Let $D = \{z\in\mathbb{C}: z \neq \pm i\}$ and let $\gamma$ be a closed contour in D. Find all the possible values of $\int_{\gamma} \frac{1}{z^2+1}dz$.
b) If $\sigma$ is a contour from 0 to 1,, find all possible values of $\int_{\sigma} \frac{1}{z^2+1}dz$
I am stuck on a) I am not sure which $\gamma$ to choose. (I cannot use the Residue theorem, I did not learn it yet)
but for b) I chose $\sigma(t) = t$ for $t \in [0,1]$ which then when I solved the integral I got $\int_{\sigma} \frac{1}{z^2+1}dz = \pi/4$
Note that$$\frac1{z^2+1}=\frac{i/2}{z+i}-\frac{i/2}{z-i}.$$So,$$\oint_\gamma\frac1{z^2+1}\,\mathrm dz=2\pi i\left(\frac i2\operatorname{ind}_\gamma(-i)-\frac i2\operatorname{ind}_\gamma(i)\right).$$Since each of the numbers $\operatorname{ind}_\gamma(-i)$ and $\operatorname{ind}_\gamma(i)$ can be any integer, $\oint_\gamma\frac1{z^2+1}\,\mathrm dz$ can be any integer multiple of $\pi$.