<s>[INST] 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?
 [/INST] 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}$.
</s>