# 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?

• Just to be sure before trying something: Is it on purpose that the last factor is $n^2$ and not $n+1$ (that would fit the pattern)? – mickep Jun 29 '16 at 7:20
• If it would have been n+1 instead of n^2 .. then I know the answer for sure – Aman Rajput Jun 29 '16 at 7:47
• I used mathematica to calculate some results,we set result is I, and $n=1,I=\frac{\pi}{2}$,$n=2,I=\pi$,$n=3,I=3 \pi$,$n=4,I=12 \pi$,$n=5,I=60 \pi$ – Young1997 Jun 29 '16 at 8:48
• so the answer is $\frac{n!\pi}{2}$ – Young1997 Jun 29 '16 at 8:50
• @Young1997 In this case, that method works. But sometimes, it can fail for large numbers. See this – Sophie Agnesi Jun 29 '16 at 13:29

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} .$$

• awesome answer. a very big (+1)! – tired Jul 19 '16 at 10:09

$$\frac12[\pi(n^2 n!)-\frac{\pi}{2^n(n+1)!}((1+2+..+n+n^2)-2)^2]$$
• Are you sure this is correct? In the case of $n = 1$ the integral evaluates to $\pi/2$, but your solution gives $\pi$? – okrzysik Jun 29 '16 at 8:14
• I don't think this gives the correct answer either, my calculations seem to agree with the OPs' in the comment section of $\pi n!/2$. – okrzysik Jun 29 '16 at 9:41