Evaluating $\int _{|z-i|=1} \frac{ e^z }{ z^{2} + 1 } dz $ I stumbled on this question and I'm struggling with it. Could you try to help me me?
$\int _{|z-i|=1} \frac{ e^z }{ z^{2} + 1 } dz  $
I know that the answer is $\pi e^{i} $
I was trying to use the Cauchy's integral formula
 A: Your path of integration looks to be the unit circle centered at $i$.
We can rewrite the expression as $$\int_{|z-i|=1}\frac{e^z}{(z+i)(z-i)}dz$$
Since $i$ is located inside the path of integration, we can use Cauchy's Formula: $$f^n(a)=\frac{n!}{2\pi i}\int_{C}\frac{f(z)}{(z-a)^{n+1}}dz$$
So $$\int_{|z-i|=1}\frac{e^z}{(z+i)(z-i)}dz=\int_{|z-i|=1}\frac{e^z(z+i)^{-1}}{(z-i)}dz=2\pi i\frac{e^z}{z+i}|_{z=i}=\pi e^i$$
A: The poles of the function 
$$f(z) = \frac{ e^z }{ z^{2} + 1 } $$
are :
$$z^2 + 1 = 0 \Leftrightarrow z^2 = -1 \Leftrightarrow z_1 = i,z_2 = -i$$
You wish to integrate over the curve : $|z-1| =1$, which is a circle of radius $1$ with its center on $i$.
Your integral can be written as :
$$\int _{|z-i|=1} \frac{ e^z }{ z^{2} + 1 } dz = \int _{|z-i|=1} \frac{ e^z }{ (z-i)(z+i)} dz$$
The pole $z_1 = i$ is located in the path of integration (i.e. the circle $|z-1| = 1$, since $|i| =1$).
Cauchy's formula states as followed : 
$$f^n(z_0)=\frac{n!}{2\pi i}\int_{C}\frac{f(z)}{(z-z_0)^{n+1}}dz$$
So, now we can calculate as : 
$$\bigg(\frac{e^z}{z+i}\bigg)'\bigg|_{z=i} = \frac{1!}{2\pi i}\int _{|z-i|=1} \frac{ e^z }{ (z-i)(z+i)} \Leftrightarrow \int _{|z-i|=1} \frac{ e^z }{ (z-i)(z+i)} = \pi e^i $$
Which means that the initial integral :
$$\int _{|z-i|=1} \frac{ e^z }{ z^{2} + 1 } dz = \pi e^i$$
