I'm trying to evaluate the following integral:
$ \int_{\gamma} \frac{z^2 -1}{z^2 +1}dz$
where $\gamma$ is the radius 2 circle centered at $(0,0)$.
This function is holomorphic in $\mathbb{C}$\ $\{i,-i\}$. I'm assuming the circle is only traversed once, since it is not specified. This excersice is included in the Cauchy Integral Formula section of Basic Complex Analysis - by Marsden but I don't see how to apply it here since I can't get the denominator to look like $z-z_0$ or $(z-z_0)^{k+1}$. Also Cauchy's theorem is no useful since the region enclosed by $\gamma$ is not simply connected.
Any hint would be helpful, thank you.
Note that
\begin{equation} \frac{1}{z^2 + 1} = \frac{1}{2i}\left(\frac{1}{z - i} - \frac{1}{z + i}\right). \end{equation}
Therefore
\begin{equation} \int_\gamma \frac{z^2 - 1}{z^2 + 1}\, dz = \frac{1}{2i}\left(\int_\gamma \frac{z^2 - 1}{z - i}\, dz - \int_\gamma \frac{z^2 - 1}{z + i}\, dz\right). \end{equation}
Use the Cauchy integral formula for each integral on the right to finish the calculation.