finding $ \int_{C(0,2)^+} \frac{z^3}{z^3+z^2-z-1} $ I want to find
$$
I \ = \ \int_{C(0,2)^+} \frac{z^3}{z^3+z^2-z-1}
$$
First of all, I know that $z^3+z^2-z-1 = (z+1)^2(z-1)$. I split up the integral as a sum of residues:
$$
I \ = \ 
2\pi i \cdot Res_{z=-1}\frac{z^3}{(z+1)^2\cdot(z-1)}
\ + 2 \pi i \cdot Res_{z=1}\frac{z^3}{(z+1)^2\cdot(z-1)}
$$
The rightmost part becomes $2 \pi \cdot 1^3/(1+1)^2 \ = \ \pi i /2$. The same trick can't be applied for the the other part. There was another lemma that was useful though:
$$
Res_{z=1}f(x) \ = \  \frac{1}{(2-1)!} \cdot 
\lim_{z \rightarrow -1}\left( (z+1)^2 \cdot \frac{z^3}{(z+1)^2(z-1)}\right)
\ = \ \frac{1}{(1+1)^2} \ = \ \frac{1}{4}
$$
Now I should multiply this by $2 \pi i$, which gives me $\pi \cdot i /2$.
Adding gives us $\pi i $.
Could you please check what I did and tell me if I this is the right way to solve this?
 A: You misread the other lemma, you have
$$\operatorname{Res}\left(\frac{f(z)}{(z+1)^2}; -1\right) = \frac{1}{(2-1)!}\lim_{z\to -1}\left(\frac{d}{dz}\right)^{2-1}\left((z+1)^2\frac{f(z)}{(z+1)^2}\right)  = f'(-1);$$
you forgot to take the appropriate derivative.
Here $f(z) = \frac{z^3}{z-1}$, so
$$f'(z) = \frac{(z-1)3z^2 - z^3}{(z-1)^2} = \frac{2z^3 - 3z^2}{(z-1)^2}$$
and $f'(-1) = -\frac{5}{4}$.
A: Your calculation of the residue of $\frac{z^3}{(z+1)^2(z-1)}$ at $z=+1$ is correct but I think there is an error with your calculation at $z=-1$. (I am going to be slightly informal here but this can be easily made formal.)
If you have a Laurent series expansion $\sum_{n=-\infty}^{+\infty} a_n(z-a)^n$, then the residue at $a$ is simply the coefficient $a_{-1}$.
We are interested in calculating the residue of  
$$\frac{z^3}{(z+1)^2(z-1)}$$
at $z=\pm 1$. 
If $z=-1$, then observe that we can rewrite this expression as a quotient $\frac{\frac{z^3}{(z-1)}}{(z+1)^2}$. The numerator $\frac{z^3}{(z-1)}$ is holomorphic in a neighborhood of $z=-1$ and thus admits a Taylor series expansion $\sum_{n=0}^{\infty} a_n(z+1)^n$. We are interested in the coefficient of $\frac{1}{z+1}$ in the Laurent series expansion of $\frac{\frac{z^3}{(z-1)}}{(z+1)^2}$ - however, this is simply $a_1$! 
Now, to fix your calculation, note that $a_1$ is the derivative at $z=-1$ of $\frac{z^3}{(z-1)}$, and this is also the residue at $z=-1$ of $\frac{z^3}{(z+1)^2(z-1)}$. (Exercise)
Your calculation of the residue of $\frac{z^3}{(z+1)^2(z-1)}$ at $z=+1$ is correct, as I stated, and can be calculated using the reasoning above. As you note, we this time rewrite $\frac{z^3}{(z+1)^2(z-1)}$ as $\frac{\frac{z^3}{(z+1)^2}}{z-1}$ where the numerator is holomorphic in a neighborhood of $z=+1$. Thus, it is evident that once we expand this as a Laurent series at $z=+1$, the residue will simply be the value of the numerator at $z=+1$, i.e., the value of $\frac{z^3}{(z+1)^2}$ at $z=+1$, i.e., $\frac{1}{4}$. 
The final answer can be calculated (as you already observe) by adding the residues of $\frac{z^3}{(z+1)^2(z-1)}$ at $z=\pm 1$ and multiplying the result by $2\pi i$. (I don't think your final answer is correct as your calculation of the residue at $z=-1$ is not correct so the final answer needs to be recalculated.)
Hope this helps!
