TITLE: Can we simplify $\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^mdx$?
QUESTION [30 upvotes]: Letting $m,n$ be natural numbers, can we simplify the following definite integral?
$$\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^mdx$$
I've known the followings:
$$\int_0^{\pi}\frac{\sin 2kx}{\sin x}dx=0, \int_0^{\pi}\frac{\sin (2k-1)x}{\sin x}dx=\pi, \int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^2dx=n\pi.$$
Proof: Letting $I_n=\int_0^{\pi}\frac{\sin nx}{\sin x}dx$, we get 
$$I_n-I_{n-2}=\int_0^{\pi}\frac{\sin{nx}-\sin{(n-2)x}}{\sin x}dx=2\int_0^{\pi}\cos(n-1)xdx=2\left[\frac{\sin{(n-1)x}}{n-1}\right]_0^{\pi}=0$$
for $n\ge 3$. Then, we get
$$I_{2k}=I_2=0, I_{2k-1}=I_1=\pi.$$
Letting $J_n=\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^2dx$, we get
$$J_n-J_{n-1}=\frac{-1}{2}\int_0^{\pi}\frac{\cos{2nx}-\cos{(2n-2)x}}{\sin^2x}=\frac{-1}{2}\int_0^{\pi}\frac{-2\sin\left(\frac{4n-2}{2}x\right)\sin\left(\frac{2x}{2}\right)}{\sin^2}$$$$=\int_0^{\pi}\frac{\sin{(2n-1)x}}{\sin x}=I_{2n-1}=\pi.$$
Then, we get
$$J_n=J_{n-1}+\pi=J_{n-2}+2\pi=\cdots=J_1+(n-1)\pi=n\pi.$$
Now the proof is completed.
I'm interested in the generalization of these definite integrals. Here is my question.
Question: Letting $m,n$ be natural numbers, can we simplify the following definite integral?
$$\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^mdx$$
I don't have any good idea. Could you show me how to simplify this?

REPLY [17 votes]: An explicit sum form may be derived. Consider first the case of odd $n$. Take $n=2N+1$ to be an odd integer and note that:
\begin{equation}
\begin{aligned}
\int_0^{\pi}\left(\frac{\sin nx}{\sin x}\right)^mdy&=\frac{1}{2}\int_0^{2\pi}\left(\frac{\sin (N+\frac{1}{2})y}{\sin \frac{y}{2}}\right)^mdy\\
&=\frac{1}{2}\int_0^{2\pi}\left(\sum_{k=-N}^{N}e^{Iky}\right)^mdy\\
&=\sum_{k_1,k_2,..,k_m=-N}^{N}\frac{1}{2}\int_0^{2\pi}e^{I\left(k_1+k_2+...k_m\right)x}dy\\
&=\sum_{k_1,k_2,..,k_m=-N}^{N}\pi\delta_{k_1+k_2+..k_m,0}=\pi L\\
\end{aligned}\tag{1}\end{equation}
where we have used the Dirichlet Kernel and the integral representation of the Kronecker Delta.
We see straight away that the result is an integer multiple of $\pi$. I am hoping someone better schooled in combinatorics will be able to spot that number $L$ straight away (or perhaps name it if it has a name); it is the number of ways to add $m$ integers between $-N$ and $N$ to make $0$. If this doesn't happen, it is still possible to obtain an explicit sum for $L$ using an ordinary generating function by noting that $L$ is the coefficient of $x^0$ in:
$$\left(\sum_{j=-N}^{N}x^j\right)^m=\left( {\frac {{x}^{N+1}-{x}^{-N}}{x-1}} \right) ^{m}\tag{2}$$
Unfortunately we can't put $x=0$ in there because that contains negative powers of $x$. Instead we multiply $(2)$ by $x^{Nm}$ and take $L$ as the coefficient of $x^{Nm}$ to get:
$$\int_0^{\pi}\left(\frac{\sin (2N+1)x}{\sin x}\right)^mdx=\frac{\pi}{(Nm)!}\lim_{x=0}
 \dfrac{d^{Nm}}{dx^{Nm}}\left( {\frac {{x}^{2N+1}-1}{x-1}}\right)^m\quad :N\in\mathbb{Z}^+ \tag{3}
$$
If we then apply the generalized Leibniz rule for the ${Nm}^{th}$ derivative to $(3)$ the RHS becomes:$$\frac{\pi}{(Nm)!}\sum_{j=0}^{Nm}{Nm \choose j}\left(\lim_{x=0}  \dfrac{d^{j}}{dx^{j}}\left( {x}^{2 N+1}-1\right)^m\right)\left(\lim_{x=0}  \dfrac{d^{Nm-j}}{dx^{Nm-j}} \dfrac{1}{\left(x-1\right)^m}\right)\tag{4}$$  we then note that:  
\begin{equation}\begin{aligned}  \lim_{x=0}  \dfrac{d^{Nm-j}}{dx^{Nm-j}} \dfrac{1}{\left(x-1\right)^m}&=\lim_{x=0}  \dfrac{d^{Nm-j}}{dx^{Nm-j}} \left(\dfrac{(-1)^{m-1}}{(m-1)!}\dfrac{d^{m-1}}{dx^{m-1}} \dfrac{1}{\left(x-1\right)}\right)\\  &=\dfrac{(-1)^{m-1}}{(m-1)!} \lim_{x=0}\dfrac{d^{(N+1)m-j}}{dx^{(N+1)m-j}} \dfrac{1}{\left(x-1\right)}\\  &={\frac { \left( -1 \right) ^{m} \left(  \left( N+1 \right) m-j-1   \right) !}{ \left( m-1 \right) !}}  \end{aligned}\tag{5}\end{equation}
and that:
\begin{equation}\begin{aligned}  
\lim_{x=0}  \dfrac{d^{j}}{dx^{j}}\left( {x}^{2 N+1}-1\right)^m&=(-1)^m\lim_{x=0}  \dfrac{d^{j}}{dx^{j}}\sum_{l=0}^{m}{m \choose l}(-1)^l{x}^{l(2 N+1)}\\
&=\cases{0&$j\neq l \left( 2\,N+1 \right) $\cr  \left( -1 \right) ^{m+l}{m\choose l}  \left( l \left( 2\,N+1 \right)  \right) !&$j=l \left( 2\,N+1 \right) $\cr}
 \end{aligned}\tag{6}\end{equation}
where we read $(6)$ as meaning that the result is zero unless $j$ is a multiple $l$ times $2N+1$ in which case we insert $l$ into the non-zero formula. After using $(5)$ and $(6)$ in $(4)$, summing $j$ only over multiples of $2N+1$ and simplifying the factorials and binomial coefficients we obtain an explicit sum form for $(3)$:
$$\int_0^{\pi}\left(\frac{\sin (2N+1)x}{\sin x}\right)^mdx=\pi\sum_{l=0}^{\left\lfloor\tfrac{Nm}{2N+1}\right\rfloor}\left( -1 \right) ^{l}{m\choose l} { \left( N+1 \right) m-l \left( 2N+1 \right) -1\choose m-1}\tag{7}
$$
where $\lfloor\, \rfloor$ denotes the floor function.
In the case of even $n=2N$ and even $m=2M$ we would use:
$${{\rm e}^{ix}}\sum _{k=-N}^{N-1}{{\rm e}^{2\,ikx}}={\frac {\sin
 \left( 2\,xN \right) }{\sin \left( x \right) }}\tag{8}$$
to show:
\begin{equation}
\begin{aligned}
\int _{0}^{\pi }\! \left( {\frac {\sin \left( 2xN \right) }{\sin
 \left( x \right) }} \right) ^{2M}{dx}&=\frac{\pi}{(M(2N-1))!}\lim_{x=0}
 \dfrac{d^{M(2N-1)}}{dx^{M(2N-1)}}\left( {\frac {{x}^{2N}-1}{x-1}}\right)^{2M}\\
&=\pi \sum _{l=0}^{\left\lfloor {\tfrac{M\left(2N-1\right)}{2N}} \right\rfloor }\left( -1 \right) ^{l}{2M\choose l}{M \left( 2N+1\right) -l2N-1\choose 2M-1}
\end{aligned}\tag{9}\end{equation}
The integral is zero by symmetry when $n$ is even and $m$ is odd; otherwise, combining $(7)$ and $(9)$ gives:
$$\int _{0}^{\pi }\! \left( {\frac {\sin \left( nx \right) }{\sin
 \left( x \right) }} \right)^{m}{dx}=\pi \sum _{l=0}^{\left\lfloor {\tfrac{m\left(n-1\right)}{2n}} \right\rfloor }\left( -1 \right) ^{l}{m\choose l}{\frac{m}{2}\left( n+1\right) -ln-1\choose m-1}\tag{10}$$