Evaluate the integral over all circles centered at the origin. Find all possible values for
$$\int_\gamma \frac{e^z}{z^3+1} dz,$$
where $\gamma$ varies over all circles centered at the origin not passing through a zero of the denominator traversed once in the counterclockwise direction.
Solution attempt: I rewrote the original integral as
$$\int_\gamma \frac{e^z}{(z+1)(z^2-z+1)} dz,$$
then applied the Cauchy integral formula with $f(z) = \frac{e^z}{z^2-z+1}$, and $z = -1$
Is that correct?
 A: Your approach is incorrect. Detailed description is in Omnomnomnom's post. Instead, you can apply residue theorem.
Let $R$ be the radius of $\gamma$. If $R<1$, then $\dfrac{e^z}{z^3+1}$ is analytic inside $\gamma$. Thus we get
$$
\int_{\gamma} \dfrac{e^z}{z^3+1} dz = 0.
$$
If $R>1$, then $\dfrac{e^z}{z^3+1}$ is analytic inside $\gamma$ except $z=e^{\frac{i\pi}{3}}$, $z=e^{-\pi i}$, $z=e^{-\frac{i\pi}{3}}$. Using residue theorem, we get
$$
\int_{\gamma} \dfrac{e^z}{z^3+1} dz=2\pi i (\operatorname{Res}(f;e^{\frac{i\pi}{3}})+\operatorname{Res}(f;e^{-\pi i})+\operatorname{Res}(f;e^{-\frac{i\pi}{3}})).
$$
If you can compute residue of $f$, then you will solve the problem.
A: First of all, you should separately consider the case when the radius of your circle $\gamma$ is less than $1$.
Second, I believe that Cauchy's integral theorem can only be applied when $f(z)$ is holomorphic on the interior of the curve $\gamma$.  This is not the case for your $f(z)$, which has two additional poles.
The way you are probably mean to handle this second case is to break the loop down into the concatenation of three smaller loops, each around one of the poles. 
