How can I calculate $\int_{0}^{2\pi}\sqrt{2-\sin(2t) }dt$? I'm trying to calculate the perimeter of a curve $C$ in ${\mathbb R}^3$ where $C$ is given by 
$$
\begin{cases}
x^2+y^2=1\\
x+y+z=1
\end{cases}
$$
Things boil down to calculating $$
\int_{0}^{2\pi}\sqrt{2-\sin(2t) }dt$$
using $\vec{r}(t)=(\cos t,\sin t,1-\sin t-\cos t)$. Is this an elliptic integral so that one can not find its value? Is there any other way to find the perimeter?
 A: Using symmetry:
$$
    \int_0^{2\pi} \sqrt{2 - \sin(2t)} \mathrm{d}t = 2 \int_0^{\pi} \sqrt{2 - \sin(2t)} \mathrm{d}t = \int_0^{2 \pi} \sqrt{2 - \sin(t)} \mathrm{d}t
$$
Now we use $\sin(t) = 1 - 2 \sin^2\left(\frac{\pi}{4} - \frac{t}{2} \right)$:
$$
  \int_0^{2 \pi} \sqrt{2 - \sin(t)} \mathrm{d}t = \int_0^{2\pi} \sqrt{1+2 \sin^2\left(\frac{\pi}{4} - \frac{t}{2} \right)} \mathrm{d} t = 2\int_{-\tfrac{\pi}{4}}^{\tfrac{3 \pi}{4}} \sqrt{1+2 \sin^2(u)} \mathrm{d} u
$$
The anti-derivative is not elementary (uses elliptic integral of the second kind):
$$
    \int \sqrt{1 - m \sin^2 \phi} \, \mathrm{d} \phi = E\left(\phi|m\right) + C
$$
Thus the parameter of interest equals
$$
   2 \left( E\left(\left.\frac{3 \pi}{4}\right|-2\right) - E\left(\left.-\frac{\pi}{4}\right|-2\right)\right) = 2 \left( E\left(\left.\frac{3 \pi}{4}\right|-2\right) + E\left(\left.\frac{\pi}{4}\right|-2\right)\right)
$$

Inspired by Mhenni's result:
$$
 2\int_{-\tfrac{\pi}{4}}^{\tfrac{3 \pi}{4}} \sqrt{1+2 \sin^2(u)} \mathrm{d} u = 2\int_{0}^{\pi} \sqrt{1+2 \sin^2(u)} \mathrm{d} u = 4 \int_0^{\frac{\pi}{2}} \sqrt{1+2 \sin^2(u)} \mathrm{d} u = 4 E(-2)
$$
where $E(m)$ is the complete elliptic integral of the second kind.

Numerical verification in Mathematica:
In[67]:= NIntegrate[Sqrt[2 - Sin[2 t]], {t, 0, 2 Pi}, 
 WorkingPrecision -> 20]

Out[67]= 8.7377525709848047416

In[68]:= N[4 (EllipticE[-2]), 20]

Out[68]= 8.7377525709848047416

A: You can get the answer in terms of the complete elliptic integral of the second kind
$$ 4\,\sqrt {3}{\it EllipticE} \left( \frac{\,\sqrt {2}}{\sqrt {3}} \right) = 8.737752576\,. $$
