Recently, I came across the following integral: $\int_{0}^{2\pi}\sin(x)\sin(2x)\sin(3x)\sin(4x)~\mathrm dx=\frac{\pi}{4}$, which can be easily solved by some trigonometry.
But when trying to find a more general result: $I_n=\int_{0^{2\pi}}\prod_{k=1}^n\sin(kx)\mathrm dx$, I wasn't able to find a very general result for the problem. Is there any way to find $I_n$ as a "simple" formula?
My attempt: It's easy to see that $I_n = 0$ for odd n. Using the sine product to sum formula for $I_{2n}$: $I_{2n}=\frac{(-1)^n}{4^n}\int_{0}^{2\pi}\sum_{e_k\in\{-1,1\}}(\cos(e_1x+2e_2x+3e_3x+\cdots+2ne_{2n}x)e_1e_2\cdots e_{2n})~\mathrm dx$.
Notice that every integral in the sum goes to zero, except when the expression inside the cosine is zero. We can rewrite $I_{2n}$ as: $I_{2n}=2\pi\frac{(-1)^n(A_{2n}-B_{2n})}{4^n}$, where $A_{2n}$ and $B_{2n}$ are related to the number of ways to zero this expression with an even and odd number of negative signs for $e_k$. After that, I was not able to simplify the problem.