Proving $\int_{-\infty}^{+\infty}{\mathrm dx\over x^2}\cdot\left(2-{\sin x\over \sin\left({x\over 2}\right)}\right)^{n+1}={2n\choose n}\pi$

I will first prove that if $f(x)$ is a continuous and $\pi$-periodic function on $\mathbb{R}$, then $$\int_{-\infty}^{\infty} f(x) \, \frac{\sin^{2}(x)}{x^{2}} \, dx = \int_{0}^{\pi} f(x) \, dx$$ provided that both integrals converge.

We will need that fact that $$\sum_{n=-\infty}^{\infty} \frac{1}{(z+n \pi)^{2}} = \csc^{2}(z).$$

(See THIS QUESTION for a derivation.)

$$\begin{align} \int_{-\infty}^{\infty} f(x) \, \frac{\sin^{2}(x)}{x^{2}} \, dx &= \sum_{n=-\infty}^{\infty} \int_{n \pi}^{(n+1) \pi} f(x) \frac{\sin^{2}(x)}{x} \, dx \\ &= \sum_{n = -\infty}^{\infty} \int_{0}^{\pi} f(u+ n \pi) \, \frac{\sin^{2}(u + n \pi)}{(u + n \pi)^{2}} \, du \\ &= \sum_{n=-\infty}^{\infty} \int_{0}^{\pi} f(u) \, \frac{\sin^{2}(u)}{(u + n \pi)^{2}} \, du \\ &= \int_{0}^{\pi} f(u) \sin^{2}(u) \sum_{n=\infty}^{\infty} \frac{1}{(u+n \pi)^{2}} \, du \\ &= \int_{0}^{\pi} f(u) \, du \end{align}$$

Jack D'Aurizio already showed that the integral is equivalent to $$I(n) = 2^{2n} \int_{-\infty}^{\infty} \frac{\sin^{2n+2}(x)}{x^{2}} \, dx. $$

So using the above formula, we get $$\begin{align} I(n) &= 2^{2n} \int_{0}^{\infty} \sin^{2n}(x) \frac{\sin^{2}(x)}{x^{2}} \, dx = 2^{2n}\int_{0}^{\pi} \sin^{2n}(x) \, dx \\ &= 2^{2n+1} \int_{0}^{\pi/2} \sin^{2n}(x) \, dx = 2^{2n+1} \frac{1}{2^{2n}} \binom{2n}{n} \frac{\pi}{2} \tag{1}\\&= \binom{2n}{n} \pi . \end{align}$$

$(1)$ Wallis's integral


The given integral equals $$ I(n) = 2^{n+1}\int_{\mathbb{R}}\frac{(1-\cos(x/2))^{n+1}}{x^2}\,dx = 2^n\int_{\mathbb{R}}\frac{(1-\cos z)^{n+1}}{z^2}\,dz \tag{1}$$ or: $$ I(n) = 2^{2n+2}\int_{0}^{+\infty}\frac{\sin^{2n+2}(z/2)}{z^2}\,dz = 4^n\int_{\mathbb{R}}\frac{\sin^{2n+2}(z)}{z^2}\,dz \tag{2} $$ that can be computed through the Fourier cosine series of $\sin^{2n+2}(z)$, since $$ \int_{\mathbb{R}}\frac{1-\cos(mx)}{x^2}\,dx = m\pi.\tag{3}$$ In particular, since $\sin(z)=\frac{e^{iz}-e^{-iz}}{2i}$, $$ \sin^{2n+2}(z) = \frac{1}{(2i)^{2n+2}}\sum_{k=0}^{2n+2}\binom{2n+2}{k}\exp\left((2k-2n-2)iz\right)(-1)^{k} \tag{4}$$ equals: $$ \frac{1}{(2i)^{2n+2}}\sum_{k=1}^{n+1}\binom{2n+2}{n+1+k}\left(1-\cos(kz)\right)(-1)^k \tag{5} $$ and the problem boils down to the computation of the combinatorial sum $$ \sum_{k=1}^{n+1}\binom{2n+2}{n+1+k}k(-1)^k \tag{6}$$ that is pretty simple. As an alternative, once we reach $(2)$ we may directly invoke Lagrange's inversion theorem and Cauchy's integral formula to derive that the answer is directly related with the coefficients of the Taylor series of $\arcsin(z)$ at the origin.


In this solution I will use the Fourier transform \begin{equation*} \hat{f}(\xi) = \int_{-\infty}^{\infty}e^{-i\xi x}f(x)\, dx. \end{equation*} It is well known that if $f(x) = \dfrac{\sin^2(x)}{x^2}$ then $\hat{f}(\xi) = \pi\left(1-\frac{|\xi|}{2}\right)$ if $|\xi|<2$ and $0$ otherwise. Via $1-\cos\left(\frac{x}{2}\right) = 2\sin^2(\frac{x}{4})$, the substitution $x:=4x$ and the Euler formula $\sin(x) = \frac{1}{2i}(e^{ix}-e^{-ix})$ I can proceed from Bui's formula (3). \begin{gather*} I = 2^{n+1}\int_{-\infty}^{\infty}\dfrac{1}{x^2}\left(1-\cos\left(\frac{x}{2}\right)\right)^{n+1}\, dx = 4^{n}\int_{-\infty}^{\infty}\dfrac{\sin^{2}(x)}{x^2}\sin^{2n}(x)\, dx =\\[2ex] \int_{-\infty}^{\infty}\dfrac{\sin^{2}(x)}{x^2}(-1)^{n}\left(e^{ix}-e^{-ix}\right)^{2n}\, dx. \end{gather*} But (cf. Jack D'Aurizio) \begin{equation*} \left(e^{ix}-e^{-ix}\right)^{2n}= \sum_{k=0}^{2n}\binom{2n}{k}(-1)^{2n-k}e^{-i(2n-2k)x} = \sum_{k=-n}^{n}\binom{2n}{n-k}(-1)^{n+k}e^{-i2kx}. \end{equation*} Thus \begin{gather*} I = \sum_{k=-n}^{n}\binom{2n}{n-k}(-1)^{2n+k}\int_{-\infty}^{\infty}\dfrac{\sin^{2}(x)}{x^2}e^{-i2kx}\, dx = \sum_{k=-n}^{n}\binom{2n}{n-k}(-1)^{2n+k}\hat{f}(2k) = \\[2ex] \binom{2n}{n}\hat{f}(0) = \pi\binom{2n}{n}. \end{gather*}