finding the integral of complex function as follows Let $C$ be a circle with equation $|z-1| = 1$ and positive direction. Find
\begin{equation*}
\int_C \frac{e^z}{z^2-4} dz.
\end{equation*}
Attempt:
The contour $C$ is a circle with center in $(1,0)$ and radius $1$. Let $f(z)=\frac{e^z}{z^2-4}$.
Notice that $f$ doesn't analytic on $z=-2$ and $z=2$. Since $2 \in C$, then
$\int_C f(z) dz$ doesn't exists.
Am I correct? Thanks in advanced.
 A: This depends a bit on your definition of convergence. There is clearly a point of blowup at $z = 2$, but the blowups on either side of this point cancel out; in other words, the principal value of the integral exists and is equal to $\frac{i \pi e^2}{4}$.
Indeed, we can calculate the principal value via the residue theorem by deforming the contour slightly. About $z = 2$ we can "push in" the contour a bit to get a semicircle $C_\epsilon$ of radius $\epsilon$ about $z=2$ as such:
             
             
             
             

Note the integral about $C_\epsilon$ is exactly half what the Residue Theorem would give there, i.e. $\int_{C_\epsilon} f = \pi i \operatorname{Res}(f,2)$. Since there are no residues inside the contour, we conclude:
$$\int_C \frac{e^z}{z^2-4} dz = \pi i \operatorname{Res}\left(\frac{e^z}{z^2-4},2\right) = \pi i \left(\frac{e^2}{4}\right) = \frac{i \pi e^2}{4}$$

Note: the principal value can here be defined by:
$$\int_C \frac{e^z}{z^2-4} dz := \lim_{\epsilon \to 0} \int_\epsilon^{2 \pi - \epsilon} \frac{\exp(1+e^{it})e^{it}}{(1+e^{it})^2-4} dt$$
