Integrating powers of the Fejer kernel

141 Views Asked by At

In attempting to solve a combinatorics problem (number of ways of rolling $2n$ $k$-sided dice and getting the median sum), I reduced things to finding the constant term the Laurent series for $(f(z)f(1/z))^n$ where $f(z)=\frac{1-z^k}{1-z}$ for some (unspecified) $n,k\in \mathbb N$. One can compute this as a contour integral over a circle containing the origin, e.g.,

$$\frac{1}{2\pi i}\oint_{|z|=1}\frac{1}{z}\left(\frac{z^{k/2}-z^{-k/2}}{z^{1/2}-z^{-1/2}}\right)^{2n}dz=\frac{1}{2\pi}\int_{-\pi}^{\pi}\left(\frac{1-\cos(kx)}{1-\cos(x)}\right)^ndx.$$

However, I do not know how to evaluate this integral (and neither does WolframAlpha, at least not for generic $n,k$). Is there perhaps a reduction formula that one could use to tackle the problem? Or was converting the problem from combinatorics to integration not the right approach to begin with?