<s>[INST] integrating $\int \sqrt{2-2\cos(x)} \, dx$ So i am having some trouble getting the solution to the integral:
$\int \sqrt{2-2\cos(x)} \, dx$
i made my first substitution 
$u = 2-2\cos(x)$
$u' = 2\sin(x) \, dx$
then...
$\int \dfrac{1}{\sqrt{4-u}} \, du$
then the next sub of
$s = 4-u$
$s' = -du$
then...
$\int \dfrac{1}{\sqrt{s}} \, ds$
which gave me... 
$2\sqrt{s}$
subbing back $s$...
$2\sqrt{4-u}$
subbing back $u$...
$2\sqrt{2\cos(x)+2}$
but i believe this is incorrect, can someone tell me where i went wrong? 
thanks :)
 [/INST] $$
\begin{aligned}
\int \sqrt{2-2 \cos x} d x=&\int \sqrt{2(1-\cos x)} d x \\
&=\int \sqrt{2 \cdot 2 \sin ^2 \frac{x}{2}} d x \\
&=2 \operatorname{sgn}\left(\sin \frac{x}{2}\right) \int \sin \frac{x}{2} d x \\
&=-4 \operatorname{sgn}\left(\sin \frac{x}{2}\right) \cos \frac{x}{2}+C
\end{aligned}
$$
</s>