A closed form for $ \int_{0}^{\frac{\pi}{2}}{\left(\frac{\sin{\left(nx\right)}}{\sin{x}}\right)^{2p}\,\mathrm{d}x} $?

By symmetry, we have $\int_0^{\pi/2}=\frac12\int_{-\pi/2}^{\pi/2}$. Substituting $z=e^{2\mathrm{i}x}$, we get (using the "coefficient-of" notation) $$I_p(n)=\frac{1}{4\mathrm{i}}\oint_{|z|=1}\left(\frac{z^n-1}{z-1}\right)^{2p}\frac{\mathrm{d}z}{z^{(n-1)p+1}}=\frac{\pi}{2}[z^{(n-1)p}](1+z+\ldots+z^{n-1})^{2p}.$$ For a fixed $p$, a closed form is easy to obtain. But for a fixed $n$, even the case $n=3$ is hard enough.


You can use somme proprieties of Fejér Kernel. So we have: $$F_n(2x)=\frac{1}{n}\biggl(\frac{\sin (nx)}{\sin x}\biggr)^2=\sum_{k=-n}^n\biggl(1-\frac{|k|}{n}\biggr)e^{2ikx}$$ Then we have, $$I_p(n)=n\sum_{k_1=-n}^n\sum_{k_2=-n}^n...\sum_{k_p=-n}^n\prod_{j=1}^p\biggl(1-\frac{|k_j|}{n}\biggr)\int_0^{\pi/2}e^{2xi\sum_{j=1}^pk_j}dx$$ Therefore we get, $$I_p(n)=n\sum_{k_1=-n}^n\sum_{k_2=-n}^n...\sum_{k_p=-n}^n\prod_{j=1}^p\biggl(1-\frac{|k_j|}{n}\biggr)\biggl(\frac{(-1)^{\sum_{j=1}^pk_j}-1}{2i\sum_{j=1}^pk_j}\biggr)$$ For more information about Fejér Kernel see this link https://en.wikipedia.org/wiki/Fej%C3%A9r_kernel.