<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] (Edit: the following was posted before the OP added "I have already tried brute forcing this ...".)
I don't see the elegant solution offhand, but the problem can certainly be brute-forced as sketched below. Note that the first term of the sum (excluding the $\,\,1-z^2$ factor ) is $\,\dfrac{1}{(z-1)^2}\,$ then the rest of terms are pairwise equal since $\,\cos \left(2k\pi/7\right) = \cos\left(2(7-k)\pi/7)\right)\,$. Therefore the sum of those remaining $\,6\,$ terms is twice the sum of the first $\,3\,$, which works out to:
$$
\begin{align}
& \frac{1}{z^2-(\omega+\omega^6)z+1}+\frac{1}{z^2-(\omega^2+\omega^5)z+1}+\frac{1}{z^2-(\omega^3+\omega^4)z+1} \\[15px]
 =\;\; &{\frac{(z^2-(\omega^2+\omega^5)z+1)(z^2-(\omega^3+\omega^4)z+1)\\+(z^2-(\omega+\omega^6)z+1)(z^2-(\omega^3+\omega^4)z+1)\\+(z^2-(\omega+\omega^6)z+1)(z^2-(\omega^2+\omega^5)z+1)}{(z-\omega)(z-\omega^6)\cdot(z-\omega^2)(z-\omega^5) \cdot (z-\omega^3)(z-\omega^4)}} 
\end{align}
$$
The denominator of the latter fraction is $\,\dfrac{z^7-1}{z-1}\,$, and the numerator eventually evaluates to:
$$
3z^4 -2(\omega^6+\omega^5+\omega^4+\omega^3+\omega^2+\omega)z^3 \\+(\omega^{11}+\omega^{10}+2\omega^9+2\omega^8+2\omega^6+2\omega^5+\omega^4+\omega^3+6)z^2 \\-2(\omega^6+\omega^5+\omega^4+\omega^3+\omega^2+\omega)z +3
$$
Using that $\,\omega^7=1\,$ and $\,1+\omega+\omega^2+\omega^3+\omega^4+\omega^5+\omega^6=0\,$ the above simplifies to:
$$
3z^4 +2z^3 +4z^2 +2z +3
$$
Then the problem reduces to verifying the algebraic identity:
$$
(1-z^2)\left(\frac{1}{(z-1)^2} + 2\cdot\frac{3z^4+2z^3+4z^2+2z+3}{\dfrac{z^7-1}{z-1}}\right) = \dfrac{7(z^7+1)}{1-z^7}
$$
</s>