# Integrate $\int_0^{\pi} \frac{x}{\sin x} \log {\frac{1+\sin x} {1-\sin x}}\,\mathrm d x$

$\int_0^{\pi} \frac{x}{\sin x} \log {\frac{1+\sin x} {1-\sin x}}\,\mathrm d x$

I'm stuck on this one. Any ideas? I have tried substitutions and integration by parts.

I managed to show it is equivalent to $\pi \int_0^{\pi/2} \frac{1}{\sin x} \log {\frac{1+\sin x} {1-\sin x}}\,\mathrm d x$

$$-\pi\int_{0}^{1}\frac{1}{x\sqrt{1-x^2}}\log\left(\frac{1-x}{1+x}\right)\,dx \stackrel{\frac{1-x}{1+x}\mapsto z}{=}\pi\int_{0}^{1}\frac{-\log z}{\sqrt{z}(1-z)}\,dz\stackrel{z\mapsto u^2}{=}4\pi\int_{0}^{1}\frac{-\log u}{1-u^2}\,du$$ or to $$4\pi\sum_{n\geq 0}\int_{0}^{1} u^{2n}\left(-\log u\right)\,du = 4\pi \sum_{n\geq 0}\frac{1}{(2n+1)^2} = \color{red}{\frac{\pi^3}{2}}.$$