TITLE: Daunting series of integrals: $\sum_{n=2}^\infty\int_0^{\pi/2}\sqrt{\frac{(1-\sin x)^{n-2}}{(1+\sin x)^{n+2}}}\log(\frac{1-\sin x}{1+\sin x})dx$
QUESTION [15 upvotes]: My coleague showed me the following integral yesterday

\begin{equation}
I=\sum_{n=2}^{\infty}\int_0^{\pi/2}\sqrt{\frac{(1-\sin x)^{n-2}}{(1+\sin x)^{n+2}}}\log\left(\!\frac{1-\sin x}{1+\sin x}\!\right)\ dx=\frac{5}{4}-\frac{\pi^2}{3}\tag1
\end{equation}

He also claimed the following closed-form:

\begin{equation}
J=\int_{2}^{\infty}\int_0^{\pi/2}\sqrt{\frac{(1-\sin x)^{y-2}}{(1+\sin x)^{y+2}}}\log\left(\!\frac{1-\sin x}{1+\sin x}\!\right)\ dx\ dy=-\frac{4}{3}\tag2
\end{equation}

$(1)$ and $(2)$ seem difficult to deal with, but I believe there are some tricks that I can use but I'm not able to spot it yet. Using substitution $x\mapsto\frac\pi2-x$, one gets
\begin{equation}
I=\sum_{n=2}^{\infty}\int_0^{\pi/2}\sqrt{\frac{(1-\cos x)^{n-2}}{(1+\cos x)^{n+2}}}\log\left(\!\frac{1-\cos x}{1+\cos x}\!\right)\ dx\tag3
\end{equation}
and
\begin{equation}
J=\int_{2}^{\infty}\int_0^{\pi/2}\sqrt{\frac{(1-\cos x)^{y-2}}{(1+\cos x)^{y+2}}}\log\left(\!\frac{1-\cos x}{1+\cos x}\!\right)\ dx\ dy\tag4
\end{equation}
but I don't know how to use $(3)$ and $(4)$ to evaluate $(1)$ and $(2)$. I'm quite sure that the main problem here is to evaluate
\begin{equation}
K=\int_0^{\pi/2}\sqrt{\frac{(1-\sin x)^{n-2}}{(1+\sin x)^{n+2}}}\log\left(\!\frac{1-\sin x}{1+\sin x}\!\right)\ dx
\end{equation}
How does one prove $(1)$ and $(2)$?

REPLY [18 votes]: Let's employ the weirdo substitution taught by my brother: $\sin x=\tanh t$. Doing so, one will get
\begin{align}
K&=\int_0^{\infty}\sqrt{\frac{(1-\tanh t)^{n-2}}{(1+\tanh t)^{n+2}}}\ln\left(\frac{1-\tanh t}{1+\tanh t}\right)\ \frac{dt}{\cosh t}\\[10pt]
&=\int_0^{\infty}\sqrt{\left(\frac{\cosh t-\sinh t}{\cosh t+\sinh t}\right)^{n-2}}\frac{\cosh t}{(\cosh t+\sinh t)^2}\ \ln\left(\frac{\cosh t-\sinh t}{\cosh t+\sinh t}\right)\ dt\\[10pt]
&=-\int_0^{\infty} e^{-(n-2)t}\left(e^{-t}+e^{-3t}\right)\ t\ dt\\[10pt]
&=-\frac{1}{n^2+1}-\frac{1}{n^2-1}
\end{align}
Thus, evaluating $I$ and $J$ are  easy-peasy-lemon-squeezy.