Evaluate the complex integral of function 
Use the residue theorem to evaluate $\int_\gamma \frac{z^5}{1-z^3}dz$
  where $\gamma$ is the circle $|z|=2$.

I have that $z_0=1$ is a singularity point and taking $g(z)=z^5$ and $h(z)=1-z^3$ and knowing that $g(z_0)\neq 0$ , $h(z_0)=0$ and $h'(z_0)\neq 0$ then $f(z)=\frac{g(z)}{h(z)}$ have simple pole at $z_0$ and  $$Res(f;z_0)=\frac{g(z_0)}{h'(z_0)}=-\frac{1}{3}$$
then $\int_\gamma \frac{z^5}{1-z^3}dz=2\pi i* Res(f;z_0)=-\frac{2\pi i}{3}$
but the answer is $-2\pi i$
 A: Here is an approach that avoids factorization. Start by noticing
$$
\frac{z^5}{1-z^3}=\frac{z^2}{1-z^3}-z^2
$$
Since there are no singularities outside of the unit circle, for any $R\ge2$, we have
$$
\begin{align}
\int_{|z|=2}\frac{z^5}{1-z^3}\,\mathrm{d}z
&=\int_{|z|=2}\frac{z^2}{1-z^3}\,\mathrm{d}z\\
&=\int_{|z|=R}\frac{z^2}{1-z^3}\,\mathrm{d}z
\end{align}
$$
Furthermore, noticing that $\frac{z^2}{1-z^3}=-\frac1z\frac1{1-1/z^3}$ is very close to $-\frac1z$ when $|z|$ is large, we add the integral of $\frac1z$ in hopes that it will cancel.
$$
\begin{align}
\left|\,\int_{|z|=R}\frac{z^2}{1-z^3}\,\mathrm{d}z+\int_{|z|=R}\frac1z\,\mathrm{d}z\,\right|
&\le\sup_{|z|=R}\left|\,\frac{z^2}{1-z^3}+\frac1z\,\right|2\pi R\\
&\le\sup_{|z|=R}\left|\,\frac1{(1-z^3)z}\,\right|2\pi R\\
&\le\frac{2\pi}{R^3-1}
\end{align}
$$
Since $R$ is arbitrary, the sum of the integrals on the left must be $0$. Therefore,
$$
\begin{align}
\int_{|z|=2}\frac{z^5}{1-z^3}\,\mathrm{d}z
&=\int_{|z|=2}\frac{z^2}{1-z^3}\,\mathrm{d}z\\
&=-\int_{|z|=2}\frac1z\,\mathrm{d}z\\[6pt]
&=-2\pi i
\end{align}
$$
A: First of all note that 
$$
1-z^3=-(z-z_1)(z-z_2)(z-z_3)=-(z-1)\left(z-\frac{1}{2}(-1-i\sqrt{3})\right)\left(z-\frac{1}{2}(-1+i\sqrt{3})\right)
$$
Hence, since $|z_j|=1$ for $j=1,2,3$, all three poles of $g/h$ are simple an lie inside the circle $|z|=2$. Therefore by the residue theorem we must have
$$
\int_{|z|=2}\frac{z^5}{1-z^3}dz = 2\pi i \sum_{j=1}^3 Res(g/h,z_j )
$$
But, since all the poles are simple ones, 
$$
Res(g/h,z_1)=\lim_{z\to z_1} (z-z_1)\frac{g(z)}{h(z)} = \lim_{z\to 1} \frac{z^5}{-\left(z-\frac{1}{2}(-1-i\sqrt{3})\right)\left(z-\frac{1}{2}(-1+i\sqrt{3})\right)} =- \frac{1}{3}
$$
Similarly 
$$
Res(g/h,z_2)=\lim_{z\to z_2} (z-z_2)\frac{g(z)}{h(z)} =- \frac{1}{3}
$$
and
$$
Res(g/h,z_3)=\lim_{z\to z_3} (z-z_3)\frac{g(z)}{h(z)} = - \frac{1}{3}
$$
Thus 
$$
 2\pi i \sum_{j=1}^3 Res(g/h,z_j )= 2\pi i\left(3 \times \frac{-1}{3}\right)=-2\pi i 
$$
A: If $a\ne 1$ denotes a root of $z^3-1$, then
$$
\int_{|z|=2}\frac{z^5}{1-z^3}\,dz=2\pi i\left[\frac{(a^0)^5}{-3(a^0)^2}+\frac{a^5}{-3a^2}+\frac{(a^2)^5}{-3(a^2)^2}\right]=-\frac{2\pi i}{3}(1+a^3+(a^2)^3)=-2\pi i.
$$
A: All three poles are inside of the curve. In this situation, rather than computing the residue at each pole, you can calculate the residue at infinity:
$\mathrm{Res}_{z=\infty} f(z) = - \mathrm{Res}_{w=0} \dfrac{f(1/w)}{w^2}$
Using a simple change of variables $z\mapsto 1/w$, can be shown that 
$$\int_{C} f(z) dz = - \mathrm{Res}_{z=\infty} f(z) =\mathrm{Res}_{w=0} \dfrac{f(1/w)}{w^2},$$ if $C$ encloses all finite singular points.
In this case, 
$$\dfrac{f(1/w)}{w^2} = \dfrac{1}{w^3-1}\dfrac{1}{w^4}$$
So now the residue of this new expression at $w=0$ can be computed in one of the two ways:


*

*This is a pole of order 4. So we can take the 3rd derivative of $1/(w^3-1)$ at $0$ then divide by 3!.

*Using the geometric series expansion of $1/(w^3-1)$. You can use the relationship between the Taylor series coefficients and derivatives. Alternatively, you can look at the $w^{-1}$th term in the series expansion of $\dfrac{1}{w^3-1}\dfrac{1}{w^4}$ for the residue.
No matter what, the residue of $\dfrac{1}{w^3-1}\dfrac{1}{w^4}$ at $w=0$ is $-1$. So the original integral is $-2\pi i$. 
A: I think your mistake is, that you forgot 2 singularities: $- \frac{1}{2} + i\sqrt{\frac{3}{4}}$ and $- \frac{1}{2} - i\sqrt{\frac{3}{4}}$.
The way to find these singularities is to set $z^3-1=0$ and then factor your solution $z=1$ out, this leads you to $z^2+z+1=0$. And this equation has the two complex solutions i mentioned above.
The nice thing is that (if you calculate it) the residue at these points are $-\frac{1}{3}$ for each of them, so in total the solution $-2 \pi i$ is correct.
