Given $$\int_C \frac{e^z}{z}dz$$ $C$ consists of two circles located at the origin with radius $R = 2$ and $R = 1$. Determine the integral.
Since the singularity is located at $z_0=0$ which is in both circles, we can say that the value for both is the same. Then i used the Cauchy integral formula and determined the integral is simply $2\pi if(z_0)=2\pi i e^0=1(2\pi i)$
But the official solution is $0$. Where did i go wrong?
let $\int_C \frac{e^z}{z}dz$ and $f(z)=\frac{e^z}{z}$ since $e^z=\sum_{n=0}^\infty \frac{z^n}{n!} $ so $\frac{e^z}{z}=\sum_{n=0}^\infty a_nz^n=\sum_{n=0}^\infty \frac{z^{(n-1)}}{n!} $ and $Res(f,0)=a_{-1}=1$ Let $C=C_1 \cup C_2$ where $C_1, C_2$ are respectively the circle with radius 1 and 2.
By residue theorem $\int_{C_1\cup C_2}f(z)dz=2\pi i[Res(f,0)-(!)Res(f,0)]=2\pi i[1-1]=0$ (!) Note that the the second is "-"because is oriented clockwise.