<s>[INST] Variable change in integral I need to calculate the integral $$\int_0^{2\pi}\sqrt{1-\cos\,x}dx$$ but when I try the substitution with $u = 1-\cos\,x$ both integration limits goes to 0.
The same happens using the t-substitution.
 [/INST] Hint: Note that 
\begin{align}
1-\cos(x)
=
&
1-\cos\left(2\cdot \frac{x}{2}\right)
\\
=
&
1+\sin^2\left(\frac{x}{2}\right)-\cos^2\left(\frac{x}{2}\right)
\\
=
&
\sin^2\left(\frac{x}{2}\right)+\sin^2\left(\frac{x}{2}\right)
\\
=
&
2\sin^2\left(\frac{x}{2}\right)
\end{align}
implies 
$$
\int_{0}^{2\pi}\sqrt[2\,]{1+\cos(x)}\,\mathop{d}x=
2\cdot\int_{0}^{2\pi}\left|\sin\left(\frac{x}{2}\right)\right|\,\mathop{d}x
$$
</s>