<s>[INST] calculus radical integration question Does anyone know how to calculate integral of $\sqrt{ 1-\cos (x)}$ ? I tried several methods resulting in $-2\sqrt2 \cos (x/2) + c$, but this is wrong in accordance with the text book, so i dont know how to proceed...
 [/INST] \begin{align*}
\int \sqrt{ 1-\cos (x)} dx &=  \int\sqrt 2 \left| \sin \left( \frac x 2 \right ) \right | dx\\ 
 &= -2\sqrt 2 \cos \left( \frac x 2 \right ) \mathrm{sgn} \left( \sin \left( \frac x 2 \right )\right)\\ 
 &= -2\sqrt 2 \cot \left( \frac x 2   \right ) \left| \sin \left( \frac x 2\right)\right|\\ 
 &=  -2  \cot \left(\frac x 2 \right )\sqrt{ 2\sin ^2 \left(\frac x 2 \right )}\\ 
 &= -2  \cot \left(\frac x 2 \right ) \sqrt{1 - \cos x}
\end{align*}
</s>