I'd really like some help with this problem. I'm supposed to find $ \int_{\partial B_{2}(0)} \frac{1}{(z^n-1)^2}dz,$ where $B_2(0) = \{ z \in \mathbb{C} \; | \; |z|<2 \}$ (ie. the ball of radius 2 and centered at 0). This, of course, amounts to finding the residues. I can do it by investigating the derivative $(\text{Res}(f, z_i) = \frac{d}{dz}\left( \prod_{j \neq i} \frac{1}{(z-z_j)^2} \right)$, where I'm denoting $z_i$ the $i$-th root of unity), but it looks kind of messy attacking it straight on. Any ideas?
Also, in a later item in the same question I should be able to find a primitive for $\frac{z^4}{(1-z^3)^2}$, where $|z|<1/2$. I have absolutely no idea here (at an intermediary item, we have to find $\int_{\partial B_{1/2}(0)} \frac{z^{2n-2}}{(1-z^n)^2}$, but this is zero since there are no residues, and this calculation doesn't seem to help...). Can you give me some direction?
Thanks!