Evaluating $\int_{0}^{\infty}{\sin(x)\sin(2x)\sin(3x)\ldots \sin(nx)\sin(n^{2}x) \over x^{n + 1}}\,dx $

How can we calculate $$ \int_{0}^{\infty}{\sin\left(x\right)\sin\left(2x\right)\sin\left(3x\right)\ldots \sin\left(nx\right)\sin\left(n^{2}x\right) \over x^{n + 1}}\,\mathrm{d}x ? $$

I believe that we can use the Dirichlet integral

$$ \int_{0}^{\infty}{\sin\left(x\right) \over x}\,\mathrm{d}x = {\pi \over 2} $$

But how do we split the integrand?


We have (theorem $2$, part $(ii)$, page 6) that:

If $a_{0},\dots,a_{n} $ are real and $a_{0}\geq\sum_{k=1}^{n}\left|a_{k}\right|$, then $$\int_{0}^{\infty}\prod_{k=0}^{n}\frac{\sin\left(a_{k}x\right)}{x}dx=\frac{\pi}{2}\prod_{k=1}^{n}a_{k}.$$

So it is sufficient to note that if we take $a_{0}=n^{2},\, a_{k}=k,\, k=1,\dots,n $ we have $$a_{0}=n^{2}\geq\frac{n\left(n+1\right)}{2}=\sum_{k=1}^{n}a_{k} $$ hence

$$\int_{0}^{\infty}\frac{\sin\left(n^{2}x\right)}{x}\prod_{k=1}^{n}\frac{\sin\left(kx\right)}{x}dx=\frac{\pi n!}{2}.$$


We can use contour integration to show that $$\int_{0}^{\infty} \frac{\sin(x) \sin(2x) \cdots \sin(nx) \sin(n^{2}x)}{x^{n+1}} \, dx = \frac{\pi n!}{2} . $$

Consider the complex function $$f(z) = \frac{\sin(z) \sin(2z) \cdots \sin(nz) e^{in^{2}z}}{z^{n+1}}. $$

If we can argue that the magnitude of the numerator is bounded in the upper half-plane, then it follows from the estimation lemma that $\int f(z ) \, dz$ vanishes along the upper half of the circle $|z|=R$ as $R \to \infty$.

Notice that numerator of $f(z)$ can be expressed as $$\frac{e^{in^{2}z}}{(2i)^{n}}\prod_{k=1}^{n} \left(e^{ikz}-e^{-ikz} \right) . $$

Since $n^2 \ge \frac{n(n+1)}{2} = \sum_{k=1}^{n} k$ , this is a linear combination of exponential functions of the form $e^{i a z}$, where $a \ge 0$. And in the upper half-plane, the magnitude of such exponential functions never exceed $1$.

Therefore, by integrating $f(z)$ around a indented contour that consists of the real axis and the large semicircle above it, we get $$ \text{PV} \int_{-\infty}^{\infty} f(x) \, dx - \pi i \, \text{Res} [f(z), 0] = 0 \, , $$ where

$$ \begin{align} \text{Res} [f(z), 0] &= \lim_{z \to 0} z \, \frac{\sin(z) \sin(2z) \cdots \sin(nz) e^{in^{2}z}}{z^{n+1}} \\ &= \lim_{z \to 0} \frac{\sin(z)}{z} \frac{\sin(2z)}{z} \cdots \frac{\sin(nz)}{z} \, e^{inz^{2}} \\ &=1 \cdot 2 \cdots n \cdot 1 \\ &=n!. \end{align}$$

Equating the imaginary parts on both sides of the equation, we get $$\int_{-\infty}^{\infty} \frac{\sin(x) \sin(2x) \cdots \sin(nx) \sin(n^{2}x)}{x^{n+1}} \, dx = \pi n! . $$

And since the integrand is even, it follows that $$\int_{0}^{\infty} \frac{\sin(x) \sin(2x) \cdots \sin(nx) \sin(n^{2}x)}{x^{n+1}} \, dx = \frac{\pi n!}{2} .$$