Evaluating $\int_0^1 \frac{x-x^2}{\sin \pi x} dx = \frac{7 \zeta(3)}{\pi^3}.$ I tried to use the series for $\sin \pi x$ and maybe find something related to $\zeta(3)$, but didn't work. I'm guessing this integral needs more than the little calculus that I know.
\begin{equation}
\int_0^1 \frac{x-x^2}{\sin \pi x} dx =  \frac{7 \zeta(3)}{\pi^3}.
\end{equation}
 A: Probably not an answer.
For the antiderivative
$$I=2 \pi^3\int \frac{x^2-x}{\sin (\pi x)}\, dx$$ a CAS give the ugly
$$I=-i \pi  (2 x-1) \left(4 \text{Li}_2\left(e^{i \pi  x}\right)-\text{Li}_2\left(e^{2
   i \pi  x}\right)\right)+8 \text{Li}_3\left(e^{i \pi 
   x}\right)-\text{Li}_3\left(e^{2 i \pi  x}\right)-$$ $$4 \pi ^2 (x-1) x \tanh
   ^{-1}\left(e^{i \pi  x}\right)$$
$$\lim_{x\to 1} \, I=-7 \zeta (3)+i\frac{ \pi ^3}{2} \qquad \text{and} \qquad \lim_{x\to 0} \, I=7 \zeta (3)+i\frac{ \pi ^3}{2}$$
What is interesting is that a rather good approximation could be obtained using a $[2,2]$ Padé approximant built at $x=\frac 12$ making
$$\frac{x^2-x}{\sin (\pi x)}=\frac{-\frac 14+ a(x-\frac 12)^2 }{1+ b(x-\frac 12)^2 }$$ where
$$a=-\frac{384-48 \pi ^2+\pi ^4}{48 \left(\pi ^2-8\right)} \qquad \text{and} \qquad b=-\frac{5 \pi ^4-48 \pi ^2}{12 \left(\pi ^2-8\right)}$$ making the definite integral easy to solve (leading to a value of $\approx -0.271415$ while the exact value is $\approx -0.271377$).
Still more amazing (at least to me), the approximation 
$$\sin(y) \simeq \frac{16 (\pi -y) y}{5 \pi ^2-4 (\pi -y) y}\qquad (0\leq y\leq\pi)$$  proposed by Mahabhaskariya of Bhaskara I, a seventh-century Indian mathematician would lead to $-\frac{13}{48} \approx -0.270833$ .
A: An elementary evaluation:
$$\int_0^1 \frac{x-x^2}{\sin \pi x} dx \overset{ibp}
=\int_0^1 \frac{2x-1}\pi\ln \tan \frac{\pi x}2 dx
\overset{t=\tan^2\frac{\pi x}2}=
\frac2{\pi^3}\int_0^\infty \frac{\ln t\tan^{-1}\sqrt t}{\sqrt t(1+t)}dt
$$
Let $J(a)=\int_0^\infty \frac{\ln t\tan^{-1}a\sqrt t}{\sqrt t(1+t)}dt$
$$J’(a)= \int_0^\infty \frac{\ln t \>dt}{(1+t)(1+a^2t)}
\overset{y=\frac1{a^2t}}=- \ln a\int_0^\infty \frac{ dy}{(1+y)(1+a^2y)}= \frac{2\ln^2a}{1-a^2}
$$
Then
$$I = \frac2{\pi^3}J(1)= \frac2{\pi^3}\int_0^1 J’(a)da
=\frac4{\pi^3}\int_0^1 \frac{\ln^2a}{1-a^2} da
= \frac4{\pi^3}\frac{7\zeta(3)}4
=\frac{7 \zeta(3)}{\pi^3}
$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

$\ds{\int_{0}^{1}{x - x^{2} \over \sin\pars{\pi x}}
\,\dd x =
{7\zeta\pars{3} \over \pi^{3}}:\ {\LARGE ?}}$.

\begin{align}
&\bbox[10px,#ffd]{\int_{0}^{1}{x - x^{2} \over \sin\pars{\pi x}}\,\dd x}
\,\,\,\stackrel{x\ \mapsto\ x + 1/2}{=}\,\,\,
\int_{-1/2}^{1/2}{1/4 - x^{2} \over
\cos\pars{\pi x}}\,\dd x
\\[5mm]  = &\
{1 \over 2}\int_{0}^{1/2}{1 - 4x^{2} \over
\cos\pars{\pi x}}\,\dd x
\,\,\,\stackrel{\pi x\ \mapsto\ x}{=}\,\,\,
{1 \over 2\pi^{3}}\int_{0}^{\pi/2}{\pi^{2} - 4x^{2} \over \cos\pars{x}}\,\dd x
\\[5mm] = &\
\left. {1 \over 2\pi^{3}}\Re\int_{x\ =\ 0}^{x\ =\ \pi/2}{\pi^{2} - 4\bracks{-\ic\ln\pars{z}}^{2} \over \pars{z + 1/z}/2}\,{\dd z \over \ic z}
\,\right\vert_{\ z\ =\ \exp\pars{\ic x}}
\\[5mm] = &\
\left. {1 \over \pi^{3}}\,\Im\int_{x\ =\ 0}^{x\ =\ \pi/2}{\pi^{2} + 4\ln^{2}\pars{z} \over
1 + z^{2}}\,\dd z\,\right\vert_{\ z\ =\ \exp\pars{\ic x}}
\\[5mm]
= &\
-\,{1 \over \pi^{3}}\,\Im\int_{1}^{0}{\pi^{2} + 4\bracks{\ln\pars{y} + \ic\pi/2}^{\, 2} \over
1 + \pars{\ic y}^{2}}\,\ic\,\dd y
\\[5mm] = &\
{4 \over \pi^{3}}\
\underbrace{\int_{0}^{1}
{\ln^{2}\pars{y} \over 1 - y^{2}}\,\dd y}
_{\ds{7\zeta\pars{3} \over 4}} =
\bbx{7\zeta\pars{3} \over \pi^{3}} \approx 0.2714
\end{align}
A: First, denote the integral below as $I$$$I=\int\limits_0^1dx\space\frac {x(1-x)}{\sin\pi x}$$and through integration by parts on $u=x-x^2$, then we have
$$\begin{align*}I & =-\frac 1{\pi}(x-x^2)\log\cot\left(\frac {\pi x}2\right)\,\Biggr\rvert_0^1+\frac 1{\pi}\int\limits_0^1dx\, (1-2x)\log\cot\left(\frac {\pi x}2\right)\\ & =\frac 1{\pi}\int\limits_0^1dx\,\log\cot\left(\frac {\pi x}2\right)-\frac 2{\pi}\int\limits_0^1dx\, x\log\cot\left(\frac {\pi x}2\right)\\ & =-\frac 8{\pi^3}\int\limits_0^{\pi/2}dx\, x\log\cot x\tag1\end{align*}$$
where equation ($1$) comes from making the substitution $x\mapsto\frac {\pi x}2$. The latter integral can be evaluated by splitting up the natural log into two separate integrals and using the Fourier series for $\log\sin x$ and $\log\cos x$, which I have included below

$$\begin{align*}\log\cos x & =\sum\limits_{k\geq1}(-1)^{k-1}\frac {\cos2kx}{k}-\log 2\tag2\\\log\sin x & =-\sum\limits_{k\geq1}\frac {\cos 2kx}k-\log 2\tag3\end{align*}$$

Expanding ($1$) gives
$$I=-\frac 8{\pi^3}\underbrace{\int\limits_0^{\pi/2}dx\, x\log\cos x}_{I_1}+\frac 8{\pi^3}\underbrace{\int\limits_0^{\pi/2}dx\, x\log\sin x}_{I_2}\tag4$$
Call the first and second integrals $I_1$ and $I_2$ respectively. Using ($2$) and ($3$) gives the following two identities
$$\begin{align*}I_1 & =\int\limits_0^{\pi/2}dx\,\left(\sum\limits_{k\geq1}\frac {(-1)^{k-1}\cos 2kx}k-x\log 2\right)\\ & =\sum\limits_{k\geq1}\frac {(-1)^{k-1}}k\left[\frac {\pi}{4k^2}\sin\pi k+\frac 1{4k^3}\cos\pi k-\frac 1{4k^2}\right]-\frac {\pi^2}8\log2\\ & =\frac 14\sum\limits_{k\geq1}\frac {(-1)^{k-1}}{k^3}\cos\pi k-\frac 14\sum\limits_{k\geq1}\frac {(-1)^{k-1}}{k^3}-\frac {\pi^2}8\log 2\\ & \color{blue}{=-\frac 14\zeta(3)-\frac 3{16}\zeta(3)-\frac {\pi^2}8\log 2}\tag5\end{align*}$$
As a side note, the infinite sum with $\sin\pi k$ vanishes because $\sin\pi k=0$ for $k\in\mathbb{Z}$. In a similar manner, $I_2$ can be integrated as follows
$$\begin{align*}I_2 & =-\int\limits_0^{\pi/2}dx\,\left(\sum\limits_{k\geq1}\frac {\cos 2kx}k+x\log 2\right)\\ & =-\sum\limits_{k\geq1}\frac 1k\left[\frac {\pi}{4k}\sin\pi k+\frac 1{4k^2}\cos\pi k-\frac 1{4k^2}\right]-\frac {\pi^2}8\log 2\\ & =-\frac 14\sum\limits_{k\geq1}\frac {\cos\pi k}{k^3}+\frac 14\sum\limits_{k\geq1}\frac 1{k^3}-\frac {\pi^2}8\log 2\\ & \color{red}{=\frac 14\zeta(3)+\frac 3{16}\zeta(3)-\frac {\pi^2}8\log 2}\tag6\end{align*}$$
Substituting the results for ($5$) and ($6$) into ($4$) leaves us with
$$\begin{align*}I & =-\frac 8{\pi^3}\left[\color{blue}{-\frac 14\zeta(3)-\frac 3{16}\zeta(3)}\color{red}{-\frac 14\zeta(3)-\frac 3{16}\zeta(3)}\right]\\ & =\frac 7{\pi^3}\zeta(3)\end{align*}$$
Multiply by $-1$ to get the integral under question
$$\int\limits_0^1dx\space\frac {x^2-x}{\sin\pi x}\color{brown}{=-\frac 7{\pi^3}\zeta(3)}$$
A: $\displaystyle f(a):=\int\limits_0^1 x e^{ax}dx = \frac{1+e^a(a-1)}{a^2}$
$\displaystyle g(a):=\int\limits_0^1 x^2 e^{ax}dx = \frac{-2+e^a(a^2-2a+2)}{a^3}$
$\displaystyle \int\limits_0^1 \frac{x^2-x}{\sin(\pi x)}dx = i2\int\limits_0^1\frac{x^2-x}{e^{i\pi x}-e^{-i\pi x}}dx = i2\sum\limits_{k=0}^\infty \int\limits_0^1 (x^2-x)e^{-i\pi x(2k+1)}dx $
$\displaystyle = i2\sum\limits_{k=0}^\infty (g(-i\pi(2k+1))-f(-i\pi(2k+1)))$
$\displaystyle = 2\sum\limits_{k=0}^\infty i\frac{-2+i\pi(2k+1) + e^{-i\pi(2k+1)}(2+i\pi(2k+1))}{(-i\pi(2k+1))^3} \enspace$ with $\enspace e^{-i\pi(2k+1)}=-1$
$\displaystyle = -8\sum\limits_{k=0}^\infty\frac{1}{(\pi(2k+1))^3}=-\frac{8}{\pi^3}(1-\frac{1}{2^3})\zeta(3)=-\frac{7\zeta(3)}{\pi^3}$
A: Basically The Same As @FrankW.
First, a warmup integral.
Let $$S(x)=\int\frac{dx}{\sin\pi x}\overset{t=\pi x}=\frac1\pi \int\frac{dt}{\sin t}.$$
The sub $u=\tan(t/2)$ provides 
$$S(x)=\frac1\pi\int\frac{1}{\frac{2u}{1+u^2}}\frac{2du}{1+u^2}=\frac1\pi\ln\tan\frac{\pi x}{2}\ .$$
So we have that the integral in question is
$$I=\frac1\pi\int_0^1(x-x^2)\left(\ln\tan\tfrac{\pi x}{2}\right)'\ dx.$$
Thus 
$$\begin{align}
\pi I&=\underbrace{(x-x^2)\ln\tan\tfrac{\pi x}{2}\bigg |_0^1}_{=0}+\int_0^1(2x-1)\ln\tan\tfrac{\pi x}{2}\ dx\\
&=2\int_0^1 x\ln\tan\tfrac{\pi x}{2}\ dx-\underbrace{\int_0^1\ln\tan\tfrac{\pi x}{2}\ dx}_{=0}\\
&=\frac2{\pi^2}\int_0^\pi x\ln\tan\tfrac{x}{2}\ dx\ .
\end{align}$$
Then recall the definition of the Clausen function of order $2$:
$$\mathrm{Cl}_2(x)=-\int_0^x \ln\left|2\sin\tfrac{t}{2}\right|\ dt.$$
Then using the Fourier series given by @FrankW. one can show that 
$$\mathrm{Cl}_2(x)=\sum_{k\ge1}\frac{\sin kx}{k^2}.$$
So we have
$$\begin{align}
\int_0^x \ln\tan\tfrac{t}{2}\ dt&=\int_0^x \ln\left(2\sin\tfrac{t}{2}\right)\ dt-\int_0^x \ln\left(2\cos\tfrac{t}{2}\right)\ dt\\
&=-\mathrm{Cl}_2(x)-\int_0^x \ln\left(2\cos\tfrac{t}{2}\right)\ dt\\
&=-\mathrm{Cl}_2(x)-\mathrm{Cl}_2(\pi-x).
\end{align}$$
Integration by parts again:
$$\begin{align}
\frac{\pi^3}{2}I&=\left[-x(\mathrm{Cl}_2(x)+\mathrm{Cl}_2(\pi-x))\right]_0^\pi+\int_0^\pi\mathrm{Cl}_2(x)dx+\int_0^\pi \mathrm{Cl}_2(\pi-x)dx\\
&=\int_0^\pi\mathrm{Cl}_2(x)dx+\int_0^\pi \mathrm{Cl}_2(\pi-x)dx\\
&=2\int_0^\pi\mathrm{Cl}_2(x)dx.
\end{align}$$
Next, we recall the definition of the $n$-th order Clausen function:
$$\mathrm{Cl}_n(x)=\sum_{k\ge1}\frac{p_n(kx)}{k^n}$$
where $$p_n(x)=\Bigg\{{{\cos x\qquad n \text{ odd}}\atop{\sin x\qquad n\text{ even}}}$$
so that 
$$\int \mathrm{Cl}_n(x)dx=(-1)^{n+1}\mathrm{Cl}_{n+1}(x).$$
So at long last,
$$I=\frac4{\pi^3}\left(\mathrm{Cl}_3(0)-\mathrm{Cl}_3(\pi)\right).$$
Since $p_3(0)=1$ and $p_3(\pi k)=(-1)^k$ we have that 
$$I=\frac{4}{\pi^3}\sum_{k\ge1}\frac1{k^3}[1-(-1)^k]=\frac{7\zeta(3)}{\pi^3}.$$
