<s>[INST] Complex Partial Fraction Decomposition The question I need help with is:
Prove that
$$\sum_{k=0}^{6}\frac{1-z^{2}}{1-2z\cos\left(\frac{2k\pi}{7}\right)+z^{2}}=\frac{7(z^{7}+1)}{1-z^{7}}$$
I have already tried brute forcing this by combining the LHS into a single fraction. While this worked, it is an extremely long proof.
I was wondering if there is a more elegant approach that uses partial fractions. I tried decomposing each term in the sum of the LHS into $$-1+\frac{B}{z-\omega^{k}}+\frac{C}{z-\omega^{-k}}$$but this gave me very complicated expressions for constants B and C so I gave up. 
 [/INST] Following the posts that were first to appear we introduce
$\zeta=\exp(2\pi i/n)$ and seek to evaluate
$$S = \sum_{k=0}^{n-1} \frac{1-z^2}{(z-\zeta^k)(z-1/\zeta^k)}.$$
where presumably  $z$ is  not a  power of  $\zeta$ and  no singularity
appears.  Introducing
$$f(v) = \frac{1-z^2}{(z-v)(z-1/v)} \frac{n/v}{v^n-1}
= \frac{1-z^2}{(z-v)(vz-1)} \frac{n}{v^n-1}
\\ = -\frac{1}{z} \frac{1-z^2}{(v-z)(v-1/z)} \frac{n}{v^n-1}$$
we have
$$S = \sum_{k=0}^{n-1} \mathrm{Res}_{v=\zeta^k} f(v).$$
The residue at infinity is zero by inspection and since residues
sum to zero we get
$$S = - \mathrm{Res}_{v=z} f(v) - \mathrm{Res}_{v=1/z} f(v).$$
This yields
$$\frac{1}{z} \frac{1-z^2}{z-1/z} \frac{n}{z^n-1}
+ \frac{1}{z} \frac{1-z^2}{1/z-z} \frac{n}{1/z^n-1}
\\ = \frac{1-z^2}{z^2-1} \frac{n}{z^n-1}
+ \frac{1-z^2}{1-z^2} \frac{z^n n}{1-z^n}
= \frac{n}{1-z^n}
+ \frac{z^n n}{1-z^n}.$$
We obtain
$$\bbox[5px,border:2px solid #00A000]{ S=n\frac{1+z^n}{1-z^n}.}$$
</s>