Cotangent summation (proof)
Solution 1:
Like Sum of tangent functions where arguments are in specific arithmetic series,
$$\cot(nx)=\dfrac1{\tan(nx)}=\dfrac{1-\binom n2\tan^2x+\cdots}{\binom n1\tan x-\binom n3\tan^3x+\cdots}=\dfrac{\cot^nx-\binom n2\cot^{n-2}x+\cdots}{\binom n1\cot^{n-1}x-\binom n3\cot^{n-3}x+\cdots}(\text{multiplying the N & D by }\cot^nx)$$
If $\cot(nx)=\cot(nA)\iff\tan nx=\tan nA, nx=nA+m\pi$ where $m$ is any integer
$x=A+\dfrac{m\pi}n$ where $m\equiv0,1,\cdots,n-2,n-1\pmod n$
So, the roots of $$\cot^nx-\binom n1\cot nA\cdot\cot^{n-1}x-\binom n2\cot^{n-2}x+\cdots=0$$ are $\cot\left(A+\dfrac{m\pi}n\right)$ where $m\equiv0,1,\cdots,n-2,n-1\pmod n$
$$\implies\sum_{m=0}^{n-1}\cot\left(A+\dfrac{m\pi}n\right)=\binom n1\cot nA=n\cot nx$$
Solution 2:
Another chance is given by the residue theorem. $\cot(\pi z)$ is a meromorphic function with simple poles at the integers, with residue $\frac{1}{\pi}$. It follows that: $$ \cot(\pi z) = \frac{1}{\pi}\sum_{m\in\mathbb{Z}}\frac{1}{z-m} = \frac{1}{\pi z}+\frac{2}{\pi}\sum_{m\geq 1}\frac{z}{z^2-m^2}.\tag{1}$$ On the other hand, due to $(1)$ both $$ \sum_{k=0}^{n-1}\cot\left(x+\frac{\pi k}{n}\right)\quad\text{and}\quad n\cot(n x) $$ are meromorphic functions with the same set of singularities (simple poles) and the same residues at these poles. In particular, $n \cot(nx)$ is the logarithmic derivative of $\sin(nx)$ and $\cot\left(x+\frac{\pi k}{n}\right)$ is the logarithmic derivative of $\sin\left(x+\frac{\pi k}{n}\right)$. The identity: $$ \prod_{k=0}^{n-1}\sin\left(x+\frac{\pi k}{n}\right) = 2^{1-n}\sin(nx) \tag{2}$$ is well-known and can be proved in a similar spirit.
Solution 3:
Hint: Consider the argument of $$\prod_{k=0}^{n-1}\left(1+i\cot\left(x+\frac{k\pi}{n}\right)\right)$$ in two different ways.