For what simple piecewise smooth loops is this integral zero? I'm trying to solve the following problem:

For what simple piecewise smooth loops $\gamma$  does the following equation hold:
  $$\int\limits_\gamma \frac{1}{z^2 + z + 1}  \, \mathrm{d}z= 0$$

I'm allowed to appeal to Cauchy's integral theorem, and I have determined that the roots of the denominator are $\frac{-1}{2} \pm \sqrt{3}i$. But I am not exactly sure how to proceed, or even what the ideal solution would be. For example, I know that the integral is $0$ over any loop that is homotopic to a constant loop (at a point in the domain of the function), but I'm not sure of what else I should say.
 A: $z^2+z+1 = \left( z^2+z+\frac 1 4 \right) + \frac 3 4 = \left( z + \frac 1 2 \right)^2 + \frac 3 4 = 0$ if and only if $z= -\frac 1 2 \pm i\sqrt{\frac 3 4} = - \frac 1 2 \pm i\frac{\sqrt 3} 2$, so you're missing a $2$.
$$
\frac 1 {z^2+z+1} = \frac 1 { \left( z+ \frac 1 2 + i \frac{\sqrt 3} 2 \right) \left( z+ \frac 1 2 - i \frac{\sqrt 3} 2 \right) }
$$
Fortunately you said the path is "simple" so that precludes winding $10$ times around one of these points and $7$ times around the other, etc.  But you didn't say "closed", i.e. returning to its starting point.
There is a simple pole at each of those two points.  If a curve winds once around one of those points and not around the other, then the integral will not be $0$.  If it winds around neither, the integral will be $0$.
But what if it winds around both, once each?  Then the integral will be the sum of the two numbers you get by winding around each once.  Will that be $0$, or not?
First suppose $\gamma$ winds once around $- \frac 1 2 + i \frac{\sqrt 3} 2$ and not around $- \frac 1 2 - i \frac{\sqrt 3} 2$.  Let $w= z - \left( - \frac 1 2 + i \frac{\sqrt 3} 2 \right)$ so that $dw=dz$.  Then we have 
$$
\int_\gamma \frac 1 { \left( z+ \frac 1 2 + i \frac{\sqrt 3} 2 \right) \left( z+ \frac 1 2 - i \frac{\sqrt 3} 2 \right) } \, dz = \int_{\gamma - \left( - \frac 1 2 + i \frac{\sqrt 3} 2 \right)} \frac{dw}{(w + i\sqrt 3)w}
$$
and the curve $\gamma - \left( - \frac 1 2 + i \frac{\sqrt 3} 2 \right)$ winds once around $0$ and not around $-i\sqrt 3.$  The value of $w + i\sqrt 3$ at $w=0$ is $i\sqrt 3$, so the integral is
$$
i\sqrt 3 \int_{\gamma - \left( - \frac 1 2 + i \frac{\sqrt 3} 2 \right)} \frac {dw} w.
$$
Evaluate that integral and do the same with a curve winding only around the other point and see if they add up to $0$ or not.
A: The roots of $z^{3}-1$ are $e^{k(2\pi i/3)}$ for $k=0,1,2$ and
$$
            z^3-1 = (z-1)(z^2+z+1).
$$
So $(z-e^{2\pi i/3})(z-e^{-2\pi i/3})=z^2+z+1$, and
$$
     \frac{1}{(z-e^{2\pi i/3})(z-e^{-2\pi i/3})}=\frac{A}{z-e^{2\pi i/3}}+\frac{B}{z-e^{-2\pi i/3}},
$$
where $A$, $B$ are easily seen to satisfy $A=-B$.
Assuming $\gamma$ does not pass through the points $e^{\pm 2\pi i/3}$, you get zero iff the curve $\gamma$ has a winding number around $e^{-2\pi i/3}$ that is the same as the winding number around $e^{2\pi i/3}$.
