Use the Cauchy Integral Formula to evaluate: $$\int_\gamma \frac{e^z \, dz}{z^2+1}$$ where $\gamma$ is the circle with centre $i$ and radius $1$.
I found that the poles of the function were at $\pm i$, but I don't understand how to use this as part of the formula. $$f(z_0) = \frac{1}{2\pi i}\int_C \frac{f(z)}{z-z_0}\,dz$$ Any help would be greatly appreciated.
Since$$\frac{e^z}{z^2+1}=\frac{\frac{e^z}{z+i}}{z-i},$$the answer is$$2\pi i\frac{e^i}{i+i}=\pi\bigl(\cos(1)+i\sin(1)\bigr).$$