Recently, I happened to discover a simple, elementary derivation of the following identity, valid for each one $ n, k in mathbb N $:

begin {align *}

frac1 pi int_0 ^ pi { rm d} x left (! frac { sin nx} { sin x} ! right) ^ {! ! k}

= sum_ {i = 0} ^ k (-1) ^ i binom {k} {i} binom {k (n {+} 1) / 2-1-ni} {k-1}

.

day 1)}

end {align *}

$ binom from $ are the binomial coefficients, with the somewhat unusual convention that $ binom ab = 0 $ whenever $ a <b $ or $ a notin mathbb N_0 $which implies that, for example, with $ i geq k / 2 $ in the sum on the right are always zero (i.e. $ k $ as upper limit could be replaced by $ lfloor k / 2 rfloor $) and for yourself $ n $ and odd $ k $ the whole expression (1) $ becomes zero.

I was looking for Integral (1) $ in Gradshteyn & Ryzhik but only found the case $ k = 1 $ (see 3.612-2 on p. 391).

I also tried Mathematica, which has succeeded in the integral (1) $ for specific $ n, k in mathbb N $but, for example, the cases could not do that $ k = 1 $ or $ k = 2 $ for general $ n in mathbb N $while after (1) $ we just have

begin {align *}

& frac1 pi int_0 ^ pi { rm d} x , frac { sin nx} { sin x}

= begin {cases}

0 & n text {even} \ 1 & n text {odd}

end {cases}

,

\

& frac1 pi int_0 ^ pi { rm d} x left (! frac { sin nx} { sin x} ! right) ^ {! ! 2}

= n

.

day 2)}

end {align *}

Can someone point out a reference where the integral lies (1) $ or something similar is calculated?