# Calculating $\int_{|z-i|=3} \frac{e^{z^2}-1}{z^3-iz^2}\mathrm{d}z$ with the residue theorem.

Use the residues theorem to calulate
$$\displaystyle \int_{|z-i|=3} \frac{e^{z^2}-1}{z^3-iz^2} \ \mathrm{d}z$$

My work :

The integrand has only one pole which is $i$, so the integral is :

$\displaystyle \int_{|z-i|=3} \frac{e^{z^2}-1}{z^3-iz^2} \ \mathrm{d}z=2\pi i\operatorname{Res}(f,i)=\frac{2 i (e-1) \pi }{e}.$

No, you miss the residue at $z=0$ since there are two poles $z=0, z=i$ inside $|z-i|=3$. The correct answer is \begin{eqnarray*} \int_{|z-i|=3}\frac{e^{z^2}-1}{z^3-iz^2}dz&=&2\pi i(\text{Res}(f,i)+\text{Res}(f,0)\\ &=&2\pi i\left(\frac{e^{z^2}-1}{z^2}\left|_{z=i}+\frac{d}{dz}\frac{e^{z^2}-1}{z-i}\right|_{z=0}\right)\\ &=&2\pi i\left(\frac{e-1}{e}+1\right)\\ &=&\frac{2\pi(2e-1)i}{e}. \end{eqnarray*}