<s>[INST] How to show that this integral is correct? How can one show that
$$\int_0^{\pi/2}\cos\left(\frac{x}{2}\right)\ln\left[\frac{1}{\alpha} \tan(x) \tan\left(\frac{x}{2}\right)\right] \sqrt{\sin(x) \tan \left(\frac{x}{2}\right)} \, \mathrm dx=-\frac{\ln(\alpha)}{\sqrt{2}}$$
assume $\alpha\ge1$.
I can't see how to simplify $\tan(x)\tan(x/2)$ and $\sin(x)\tan(x/2)$.
 [/INST] Using 
$$\tan(x) \, \tan(x/2) = \frac{2 \, \sin^{2}(x/2)}{\cos(x)}$$
and 
$$\sin(x) \, \tan(x/2) = 2 \, \sin^{2}(x/2)$$ 
then
\begin{align}
I &= \int_{0}^{\pi/2}\cos\left(\frac{x}{2}\right)\ln\left[\frac{1}{\alpha}\tan(x)\tan\left(\frac{x}{2}\right)\right]\sqrt{\sin(x)\tan\left(\frac{x}{2}\right)}\mathrm dx \\
&= 2\sqrt{2} \, \int_{0}^{\pi/2} \sin(x/2) \, \cos(x/2) \, \ln\left(\frac{2}{\alpha} \, \frac{\sin^{2}(x/2)}{\cos(x)} \right) \, dx 
\end{align}
Let $u = \sin(x/2)$ to obtain
\begin{align}
I &= 4 \sqrt{2} \, \int_{0}^{1/\sqrt{2}} u \, \ln u \, du - 2\sqrt{2} \, \ln\left(\frac{\alpha}{2}\right) \, \int_{0}^{1/\sqrt{2}} u \, du - \sqrt{2} \,\int_{0}^{\pi/2} \sin(x) \, \ln(\cos(x)) \, dx \\
&= - \frac{1 + \ln 2}{\sqrt{2}} - \frac{1}{\sqrt{2}} \, \ln\left(\frac{\alpha}{2}\right) + \frac{1}{\sqrt{2}} \\
&= - \frac{\ln \alpha}{\sqrt{2}}.
\end{align}
</s>