I am trying to evaluate $$\int_{\gamma(0;2)}\frac {e^{i\pi z/2}}{z^2-1}\, \mathrm d z$$ using the Cauchy integral formula
The problem is it is not holomorphic at $1$ and $-1$. My textbook suggests partial fractions, but surely the issue still exists?
$f(z)=\frac{e^{i\pi z/2}}{z^2-1} $ is a meromorphic function with simple poles at $z=\pm 1$, having residues:
$$ \text{Res}\left(f(z),z=\pm 1\right) = \lim_{z\to \pm 1}\frac{e^{i\pi z/2}}{z\pm 1}=\frac{i}{2}, $$ so, by the residue theorem: $$ \oint_{\|z\|=2} f(z)\,dz = 2\pi i\left(\frac{i}{2}+\frac{i}{2}\right)=\color{red}{-2\pi}.$$