Suppose $F_n=1/(1+z^n)$ for $n$ even. I'm curious, why is the sum of residues of $F_n$ in the upper half plane a geometric series whose sum is $1/[in\sin(\pi/n)]$?
I know that if $f(z)=\frac{P(z)}{Q(z)}$ has a simple root $a$ of $Q(z)$, then $\text{Res}[f(z),a]=\frac{P(a)}{Q'(a)}$. Hence if $p$ is a pole of $F_n$, then $$ \text{Res}[F_n,p]=\frac{1}{np^{n-1}}=\frac{p}{np^n}=-\frac{p}{n}. $$
By Cauchy's Integral Formula, the sum of the residues in the upper half plane is $$ \sum_{y>0}\text{Res}[F_n,z]=\frac{1}{2\pi i}\int_{-\infty}^\infty F_n(x)dx=\frac{1}{2\pi i}\int_{-\infty}^{\infty}\frac{dx}{1+x^n}. $$
I don't know how to proceed in showing this is a geometric series which sums to $1/[in\sin(\pi/n)]$. I'd appreciate suggestions on how to reach the conclusion. Thanks.