How do we solve
$$\frac{1}{2\pi}\int_{0}^{2\pi}\sqrt{(ucos(\theta)+v\sin(\theta))^2-(u^2+v^2-1)} d\theta$$
According to Mathematica the answer is
$$\frac{1}{2\pi}E(u^2+v^2) \implies u^2+v^2\le1$$
Where $E(x)$ is the Complete Elliptic integral of the second kind.
$$E(x)=\int_{0}^{\pi/2}\sqrt{1+k^2\sin^2(\theta)}d\theta$$
How do I convert the integral into an elliptic integral?
My attempt is below
$$\frac{1}{2\pi}\int_{0}^{2\pi}\sqrt{u^2cos^2(\theta)+2uv\sin(\theta)\cos(\theta)+v^2\sin(\theta)^2-(u^2+v^2-1)} d\theta$$
$$\frac{1}{2\pi}\int_{0}^{2\pi}\sqrt{u^2-u^2\sin^2(\theta)+2uv\sin(\theta)\cos(\theta)+v^2\sin(\theta)^2-(u^2+v^2-1)} d\theta$$
$$\frac{1}{2\pi}\int_{0}^{2\pi}\sqrt{u^2+2uv\sin(\theta)\cos(\theta)+(v^2-u^2)\sin(\theta)^2-(u^2+v^2-1)} d\theta$$
I'm not sure how to continue.
Consider:
$$\int_{0}^{2\pi}\sqrt{(u \cos(\theta)+v\sin(\theta))^2-(u^2+v^2-1)} ~d \theta$$
Now introduce new parameters:
$$u=r \sin \phi \\ v=r \cos \phi$$
$$u^2+v^2=r^2$$
You get:
$$\int_{0}^{2\pi}\sqrt{r^2 \sin^2 (\theta + \phi)-r^2+1}~d \theta = $$
$$\sqrt{1-r^2} \int_{0}^{2\pi}\sqrt{1+k^2 \sin^2 (\theta + \phi)}~d \theta \color{blue}{=} $$
Where:
$$k^2=\frac{r^2}{1-r^2}$$
Move to the new variable:
$$x=\theta+\phi$$
$$\color{blue}{=} \sqrt{1-r^2} \int_{\phi}^{2\pi+\phi}\sqrt{1+k^2 \sin^2 x}~d x$$
This is of course, an incomplete elliptic integral of the second kind. However, experiments with different $\phi$ indicate that the value is represented in terms of complete elliptic integral and doesn't depend on $\phi$.
I'm sure there's a way to prove it.