<s>[INST] A Sine and Inverse Sine integral A demonstration of methods
While reviewing an old text book an integral containing sines and sine inverse was encountered, namely,
$$\int_{0}^{\pi/2} \int_{0}^{\pi/2} \sin(x) \, \sin^{-1}(\sin(x) \, \sin(y)) \, dx \, dy = \frac{\pi^{2}}{4} - \frac{\pi}{2}.$$
One can express $\sin^{-1}(z)$ as a series and integrate, but are there other methods nearly as efficient?  
 [/INST] As mickep has observed 
 \begin{equation*}
 I_{1} = \int_0^{\pi/2}\int_0^{\pi/2}\sin(x)\arcsin(\sin(x)\sin(y))\,dxdy = \dfrac{1}{2} \int_{0}^{\pi/2}\ln\left(\dfrac{1+\sin x}{1-\sin x}\right)\dfrac{\cos^{2}x}{\sin x}\, dx.
\end{equation*}
We intend to finish the solution without using series expansion. Instead we will use complex integration and Cauchy integral theorem.
After integration by parts we have
\begin{gather*}
I_{1} = \dfrac{1}{2}\int_{0}^{\pi/2}\left(\dfrac{1}{\sin x}-\sin x\right)\ln\left(\dfrac{1+\sin x}{1-\sin x}\right)\, dx = \dfrac{1}{2}\left[\left(\ln\left(\tan\dfrac{x}{2}\right)+\cos x\right)\ln\left(\dfrac{1+\sin x}{1-\sin x}\right)\right]_{0}^{\pi/2}\\
- \int_{0}^{\pi/2}\left(\ln\left(\tan\dfrac{x}{2}\right)+\cos x\right)\dfrac{1}{\cos x}\, dx = - \underbrace{\int_{0}^{\pi/2}\dfrac{\ln\left(\tan\dfrac{x}{2}\right)}{\cos x}\, dx}_{I_{2}} - \dfrac{\pi}{2}.
 \end{gather*}
 Finally we will prove that $I_2 = -\dfrac{\pi^{2}}{4}.$ Since $\displaystyle \tan^{2}\dfrac{x}{2} = \dfrac{1-\cos x}{1+\cos x}$ we get
 \begin{gather*}
I_{2}= \dfrac{1}{2}\int_{0}^{\pi/2}\dfrac{1}{\cos x}\ln\left(\dfrac{1-\cos x}{1+\cos x}\right)\, dx = \dfrac{1}{2}\int_{0}^{\pi/2}\dfrac{1}{\sin x}\ln\left(\dfrac{1-\sin x}{1+\sin x}\right)\, dx = \left[t = \tan\dfrac{x}{2}\right]\\
= \int_{0}^{1}\dfrac{1}{t}\ln\left(\dfrac{1-t}{1+t}\right)\, dt = \left[\ln(t)\ln\left(\dfrac{1-t}{1+t}\right)\right]_{0}^{1} - 2\int_{0}^{1}\dfrac{\ln(t)}{t^{2}-1}\, dt.
\end{gather*}
But
\begin{equation*}
\int_{0}^{1}\dfrac{\ln(t)}{t^{2}-1}\, dt = \int_{1}^{\infty}\dfrac{\ln(t)}{t^{2}-1}\, dt .
\end{equation*}
Thus $
\displaystyle I_{2} = -\int_{0}^{\infty}\dfrac{\ln(t)}{t^{2}-1}\, dt.$ If $\log $ is the principal branch of the logarithm then the function $ f(z) = \dfrac{\log(z)}{z^{2}-1}$ has a removable singularity at $z=1$. If
we integrate $f(z)$ ''around quadrant 1'' and use Cauchy integral theorem we get
\begin{equation*}
\int_{0}^{\infty}\dfrac{\ln(x)}{x^{2}-1}\, dx - \int_{0}^{\infty}\dfrac{\ln(|iy|)+i\pi/2}{(iy)^{2}-1}i\, dy = 0.
\end{equation*}
 Consequently
 \begin{equation*}
-I_{2} + i\int_{0}^{\infty}\dfrac{\ln(y)}{y^{2}+1}\, dy -\dfrac{\pi}{2}\underbrace{\int_{0}^{\infty}\dfrac{1}{y^{2}+1}\, dy}_{ = \pi/2}  = 0.\tag{1}
\end{equation*}
From the real part in (1) we finally get $I_2 = -\dfrac{\pi^2}{4}$.
</s>