I want to evaluate the integral $$\int_{\left | z \right |=3} \frac{e^{z}-1}{z(z-1)(z-i)}\,dz$$ by using the following theorem:
If a function $f$ is analytic everywhere in the finite plane except for a finite number of singularities interior to a positively oriented simple closed curve $C$, then $$\int_{C}f(z) dz=2\pi i\text{Res}\left ( \frac{1}{z^{2}}f(\frac{1}{z}), 0 \right ).$$
I want to calculate this integral by calculating the residue at 0 of $\frac{1}{z^{2}}f(\frac{1}{z})=\frac{1+\frac{1}{2!z}+\frac{1}{3!z^{2}}\cdot \cdot \cdot }{1-(1+i)z+iz^{2}}$ So I did long division but the coefficient of 1/z is 0. I know the method of calculating the residues at each singularities 0, 1, i, respectively. This method gives me the answer $2\pi i(0+\frac{e-1}{1-i}+\frac{e^{i}-1}{i(i-1)})$ which is not 0. Why answers are different?? Why does not hold long division method? Any help please.
$$e^z-1=\sum_{n=1}^{\infty}\frac{z^n}{n!}=zg(z)$$ where $g(0) \neq 0$
So $0$ is a removable singularity of $f$.
Now $f$ has poles of order $1$ at $z=1,i \in D(0,3)$.
Thus $$\int_{|z|=3}f(z)dz=\frac{1}{2 \pi i} [Res(f,1)+Res(f,i)]=\frac{1}{2 \pi i}[\frac{e^i-1}{i(i-1)}+\frac{e-1}{1-i}]$$