TITLE: Why is the sum of residues of $\frac{1}{1+z^n}$ in the upper half plane $1/[in\sin(\pi/n)]$?
QUESTION [5 upvotes]: 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.

REPLY [8 votes]: The poles of $(1+z^n)^{-1}$ occur at the $n^{\text{th}}$ roots of $-1$, namely
$$z_k = e^{i\pi(2k+1)/n}.$$
Those poles in the upper half-plane are given by $0 \leq k \leq \frac{n}{2}-1$.  As you noticed, the residue at $z_k$ is
$$-\frac{1}{n}e^{i\pi(2k+1)/n},$$
so that the sum of the residues in the upper half-plane is
$$\begin{align}
\sum_{k=0}^{n/2-1} - \frac{1}{n} e^{i\pi(2k+1)/n} &= - \frac{1}{n} e^{i\pi/n} \sum_{k=0}^{n/2-1} \left(e^{i 2 \pi/n}\right)^k \\
        &= -\frac{1}{n} e^{i \pi/n} \frac{\left(e^{i 2 \pi/n}\right)^{n/2}-1}{e^{i 2 \pi/n}-1} \\
        &= \frac{1}{n} e^{i \pi/n} \frac{2}{e^{i 2 \pi/n}-1} \\
        &= \frac{1}{n} \cdot \frac{2}{e^{i\pi/n} - e^{-i\pi/n}} \\
        &= \frac{1}{i n} \cdot \frac{2 i}{e^{i\pi/n} - e^{-i\pi/n}} \\
        &= \frac{1}{i n \sin(\pi/n)}.
\end{align}$$