Integrating partial Weierstrass products of $\sin(x)$ divided by $\sin(x)$ Recall the Weierstrass factorization of $\sin(z)$, valid for any complex $z$:
$$
\sin(z) = z \prod_{k=1}^{\infty}\left(1-\frac{z^2}{k^2\pi^2}\right)
$$Apropos of nothing, I thought, 'what if I integrated these partial products divided by sine over integer multiples of $\pi$?' The results Mathematica gave were somewhat striking:
\begin{align}
\int_{-\pi}^{\pi} \frac{x\left(1-\frac{x^2}{\pi^2}\right)}{\sin(x)}\,dx &= \frac{-21 \zeta(3)}{\pi}\\
\int_{-2\pi}^{2\pi} \frac{x\left(1-\frac{x^2}{\pi^2}\right)\left(1-\frac{x^2}{4\pi^2}\right)}{\sin(x)}\,dx &= \frac{5 \left(35 \pi ^2 \zeta (3)-93 \zeta (5)\right)}{2 \pi ^3}\\
\int_{-3\pi}^{3\pi} \frac{x\left(1-\frac{x^2}{\pi^2}\right)\left(1-\frac{x^2}{4\pi^2}\right)\left(1-\frac{x^2}{9\pi^2}\right)}{\sin(x)}\,dx &= \frac{7 \left(392 \pi ^4 \zeta (3)-2170 \pi ^2 \zeta (5)+1905 \zeta (7)\right)}{8 \pi ^5}\\
\int_{-4\pi}^{4\pi} \frac{x\left(1-\frac{x^2}{\pi^2}\right)\left(1-\frac{x^2}{4\pi^2}\right)\left(1-\frac{x^2}{9\pi^2}\right)\left(1-\frac{x^2}{16\pi^2}\right)}{\sin(x)}\,dx &= \frac{7 \left(3044 \pi ^6 \zeta (3)-24831 \pi ^4 \zeta (5)+51435 \pi ^2 \zeta (7)-22995 \zeta
   (9)\right)}{16 \pi ^7}\\ &
\end{align}
Here as usual, $\zeta(s)$ is the Riemann zeta function, the analytic continuation of $\sum_{n=1}^{\infty} n^{-s}$; the odd positive-integer values are presently unknown. The results had a similar form with different integer coefficients if the range of integration was restricted to $(-\pi,\pi)$. I am seeking an explanation for these identities, as well as an explanation for how they were derived. I don't think computing antiderivatives is the best way to go; perhaps there is a transform that makes these integrals more manageable?

Use integration by parts and induction in $k$ to find $$\int_{-\pi}^\pi x^{k}e^{-inx}dx$$
then
$$\int_{-\pi}^{\pi} \frac{x^{k+1}(1-x^2/\pi^2)}{\sin(x)}d=\lim_{r\to 1^-} \int_{-\pi}^\pi \frac{x^{k+1}(1-x^2/\pi^2) 2i e^{-ix}}{1-re^{-2ix}}dx$$ $$=\lim_{r\to 1^-} \int_{-\pi}^\pi \sum_{n=0}^\infty 2i x^{k+1}(1-x^2/\pi^2) r^n e^{-(2n+1)ix}dx$$ $$= 2i\lim_{r\to 1^-} \sum_{n=0}^\infty r^n \int_{-\pi}^\pi x^{k+1}(1-x^2/\pi^2) e^{-(2n+1)ix}dx$$
