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.

  • 4
    $\begingroup$ Playing around in Desmos, it seems that (for $n$ up to $100$), $I_n \ne 0$ only for the indices $$\begin{align*} n \in &\{4,8,12,14,16,20,24,28,32,36,40,\\ &\quad 44,48,51,52,56,60,64,68,72,76,80,\\ &\quad84,86,88,89,90,92,94,96,98,100 \} \end{align*}$$ No clue what to make of this. $\endgroup$ Commented Jun 19 at 3:27
  • $\begingroup$ Playing around with Mathematica, I instead find that $I_{n}=0$ unless $n$ is a multiple of $4$. In particular, $I_{14}=0$. $\endgroup$ Commented Jun 19 at 4:23
  • 2
    $\begingroup$ Related: math.stackexchange.com/q/3786668/42969 $\endgroup$
    – Martin R
    Commented Jun 19 at 9:18
  • $\begingroup$ See also (2.10) in jstor.org/stable/26603380 $\endgroup$ Commented yesterday

1 Answer 1


It can be expressed in the form $\frac{\pi A_n}{2^{n-1}}$ as follows.

$$\begin{aligned}\int_0^{2\pi} \prod_{k=1}^n \sin(kx)~\mathrm dx&= \int\limits_0^{2\pi} \prod_{k=1}^n \frac{e^{i k x}-e^{-i k x}}{2i}~\mathrm dx\\&= \frac{1}{(2i)^n} \int_0^{2\pi} \prod_{k=1}^n \frac{1}{e^{i k x}} \cdot \prod_{k=1}^n \left(e^{2i k x}-1\right)\mathrm dx\\&= \frac{1}{(2i)^n} \int_0^{2\pi} \frac{1}{e^{i N x}} \cdot \prod_{k=1}^n \left(e^{2i k x}-1\right)\mathrm dx\qquad\text{where } N=\sum_{k=1}^nk=\frac{n(n+1)}2\\&= \frac{1}{i(2i)^n} \int_0^{2\pi} \frac{1}{e^{i N x+ix}} \cdot \left(\prod_{k=1}^n \left(e^{2i k x}-1\right)\right) \cdot ie^{i x}~\mathrm dx\qquad\text{Let}~z=e^{ix}\\&= \frac{1}{i(2i)^n} \int_{|z|=1}\frac{1}{z^{N+1}} \prod_{k=1}^n \left(z^{2 k }-1\right)\mathrm dz\qquad\text{Contour integral}\\&=\frac{1}{i(2i)^n} \int_{|z|=1}\frac{f_n(z)}{(z-0)^{N+1}}~\mathrm dz\qquad\text{where }f_n(z)=\prod_{k=1}^n \left(z^{2 k }-1\right)\\&=\frac{1}{i(2i)^n}\cdot\frac{2\pi i}{N!}\cdot f_n^{(N)}(0)\qquad\text{Cauchy's integral formula}\\\color{red}{\int_0^{2\pi} \prod_{k=1}^n \sin(kx)~\mathrm dx}&\color{red}{=\frac{\pi}{2^{n-1}}\cdot\frac{f_n^{(N)}(0)}{i^nN!}} \end{aligned}$$ where,
$f_n^{(N)}(0)$ is the $N$th derivative of $f_n(z)=\displaystyle\prod_{k=1}^n \left(z^{2 k }-1\right)$ at $z=0$.
$i=\sqrt{-1}$ is the imaginary unit, and $i^n=e^{i\pi n/2}$.

Intuition and Observation: Since $i^n$ is imaginary for $n\equiv1,3\pmod4$, $f_n^{(N)}(0)$ and $A_n=\frac{f_n^{(N)}(0)}{i^nN!}$ must vanish as $f_n^{(N)}(0)$ is real. Based on Mathematica, $f_n^{(N)}(0)=0$ and $A_n=0$ for $n\equiv2\pmod4$. $f_n^{(N)}(0)$ and $A_n$ are non-zero only if $n$ is a multiple of $4$. So, the integral $I_n=0$ unless $4\mid n$.

  • 7
    $\begingroup$ Based on Mathematica it seems that $$A_{4n}=2, 2, 4, 6, 8, 16, 28, 50, 100, 196,\ldots$$ for $n\geq 1$, with $A_n=0$ otherwise. This matches OEIS sequence A269298 as far as I've been able to verify, and is moreover consistent with its link to sequence A231599. $\endgroup$ Commented Jun 19 at 4:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .