I need to compute$$ \int_{c} \frac{e^{z}}{z(z-3)}dz$$when $C: |z|=2$ by Cauchy's integral theorem or Cauchy's integral formula.

Cauchy's integral formula says if $f(z)$ is analytic in a simply connected domain $D$. Then for any point $z_{0}$ in $D$ and any simple closed path $C$ in $D$ which encloses $z_{0}$, $$\int_{c}\frac{f(z)}{z-z_{0}} dz = 2\pi if(z_{0})$$

In my case, $f(z) = \frac{e^{z}}{z}$ is analytic when $z \neq 0$ but $z_{0}=3 \notin C$.

Cauchy's integral theorem says if $f(z)$ is analytic in a simply connected domain $D$, then for every simple closed path $C$ in $D$, $\int_{c} f(z) dz = 0$.

but right now I feel confused because $z_{0}$ is not in C and I can't apply the first theorem but I think the second is not possible either.


Let$$\begin{array}{rccc}f\colon&\{z\in\Bbb C\mid |z|<3\}&\longrightarrow&\Bbb C\\&z&\mapsto&\displaystyle\frac{e^z}{z-3}.\end{array}$$Then $f$ is analytic and its domain is simply connected. So, Cauchy's integral formula tells us that$$\int_C\frac{f(z)}z\,\mathrm dz=2\pi if(0)=-\frac{2\pi i}3.$$