I am trying to compute the following integral: $$\int_0^{2\pi} \frac{y}{y^n-1} dy$$
I've tried to decompose $y^n-1$ into $(y-1)(y-e^{i\theta})(y-e^{i2\theta})...(y-e^{i(n-1)\theta})$ but I don't know what to do with this factorization. I've read some others similar questions with the answers but I don't know if the same methods apply.