Evaluating a trigonometric integral with square root I want to evaluate the integral
$ \int_0^{2\pi} \sqrt{1+a\cdot \cos(x)} ~dx$  where $|a| \leq 1$.
I have already tried to split the integral using the periodicity of $\cos$ into
$ \int_0^{\pi} \left( \sqrt{1+a\cdot \sin(x)} + \sqrt{1-a\cdot \sin(x)} \right) ~dx$,
but that does not seem to make things easier.
Do you have any suggestion on how to proceed?
 A: Unless $a = 1$ exactly, your integral is what turns out to be an Elliptic integral. No analytical solution can be found. Yet it is a well know integral. Indeed in literature we have that
$$\int \sqrt{1 + a\cos(x)}\ \text{d}x = 2 \sqrt{a+1} E\left(\frac{x}{2}|\frac{2 a}{a+1}\right)$$
As long as $a > 0$.
The notation $E\left( \cdot | \cdot \right) $ denotes the Elliptic integral of the second kind.
More here: https://en.wikipedia.org/wiki/Elliptic_integral#Incomplete_elliptic_integral_of_the_second_kind
In your case, it is well known that
$$\int_0^{2\pi} \sqrt{1 + a \cos(x)}\ \text{d}x = 4 \sqrt{a+1} E\left(\frac{2 a}{a+1}\right)$$
A: You are entering the world of elliptic integrals.
Start using $\cos(x)=1-2 \sin ^2\left(\frac{x}{2}\right)$ to make
$$I=\int \sqrt{1+a\, cos(x)}\,dx=\int\sqrt{(1+a)-2 a \sin ^2\left(\frac{x}{2}\right)}\,dx$$
$$I=\sqrt{1+a}\int\sqrt{1-\frac{2 a }{1+a}\sin ^2\left(\frac{x}{2}\right)}\,dx$$ Now, let $x=2y$
$$I=2\sqrt{1+a}\int\sqrt{1-\frac{2 a }{1+a}\sin ^2\left(y\right)}\,dy$$
Have a look here.
