Prove that $ \int_{0}^{c} \frac{\sin(\frac{x}{2})x~dx}{\sqrt{\cos(x) - \cos(c)}} = \sqrt{2} \pi \ln(\sec(\frac{c}{2}))$ As the title says, I want to find a way calculate the following integral$ \int_{0}^{c} \frac{\sin(x/2)x~dx}{\sqrt{\cos(x) - \cos(c)}}$, which I know is equal to $\sqrt{2} \pi \ln(\sec(\frac{c}{2}))$.
At first glance, I thought this would not be very difficult to prove (and maybe it isn't), but after some straighforward manipulations, I was unable to make the $\pi$ factor appear.
Obs: $ 0<c < \pi$.

We can transform
\begin{align}
I(c)&=\int_{0}^{c} \frac{\sin(x/2)}{\sqrt{\cos(x) - \cos(c)}}x\,dx\\
&=\frac{1}{\sqrt{2}}\int_{0}^{c} \frac{\sin(x/2)}{\sqrt{\cos^2(x/2) - \cos^2(c/2)}}x\,dx\\
&=2\sqrt{2}\int_0^{c/2}\frac{\sin y}{\sqrt{\cos^2y-\cos^2(c/2)}}y\,dy
\end{align} 
Now, denoting $C=\cos (c/2)$ and enforcing the substitution $\cos y=Cu$, it comes
\begin{equation}
I(c)=2\sqrt{2}\int_1^{1/C}\frac{\arccos(Cu)}{\sqrt{u^2-1}}\,du
\end{equation} 
By differentiation of this expression with respect to $C$, noticing that $\arccos(1)=0$, we obtain
\begin{align}
\frac{dI(c)}{dC}&=2\sqrt{2}\left[-\frac{1}{C^2}\frac{\arccos(1)}{\sqrt{\tfrac{1}{C^2}-1}}-\int_1^{1/C}\frac{u}{\sqrt{u^2-1}\sqrt{1-C^2u^2}}\,du\right]\\
&=\frac{-2\sqrt{2}}{\sqrt{1-C^2}}\int_0^{\frac{\sqrt{1-C^2}}{C}}\frac{dw}{\sqrt{1-\left( \frac{Cw}{\sqrt{1-C^2}} \right)^2}}\\
&=\frac{-2\sqrt{2}}{\sqrt{1-C^2}}\left[\frac{\sqrt{1-C^2}}{C}\arcsin\left(\frac{Cw}{\sqrt{1-C^2}}\right)\right]_{w=0}^{w=\frac{\sqrt{1-C^2}}{C}}\\
&=-\sqrt{2}\frac{\pi}{C}
\end{align} 
(we have used the substitution $u^2=1+w^2$). Then, 
\begin{equation}
I(c)=-\pi\sqrt{2}\ln\left( \frac{C}{A} \right)
\end{equation} 
where $A$ is a constant. For $c=0$, we have $C=1 $ and $I(0)=0$, thus $A=1$.
Finally,
\begin{equation}
I(c)=\pi\sqrt{2}\ln\left(\sec\left( \frac{c}{2} \right)\right)
\end{equation} 
