How do you solve the following integral? How do you solve the following integral
$$\int_0^{2\pi}\sqrt{\frac{5}{4} + \cos(t)} \, dt.$$
It has been a while since I have done integration and I think somehow I could multpily by the conjugate but I am unsure.  Any assistance would be appreciated.
This problem is part of a larger problem to find the length of the cardiod.
$$r(\theta)=\frac{1}{2}+\cos(\theta).$$
This integral is the length integral and I originally just found a numerical approximation but after reviewing my problem my teacher said there is a nice way to antidifferentiate but I was unsure how to go about that.
 A: Let $a\ge1$ and note that, because of symmetry of the integrand, we can write
$$J(a)=\int_0^{2\pi}\sqrt{a+\cos x}\,dx=2\int_0^\pi\sqrt{a+\cos x}\,dx.$$
Write $x=2u$ to get
$$J(a)=2\int_0^{\pi/2}\sqrt{a+\cos2u}\,du=2\int_0^{\pi/2}\sqrt{a+1-2\sin^2u}\,du,$$
which is $$J(a)=2\sqrt{a+1}\int_0^{\pi/2}\sqrt{1-\frac{2}{a+1}\sin^2u}\,du=2\sqrt{a+1}\,E\left(\tfrac{\pi}{2},\sqrt{\tfrac{2}{a+1}}\right),$$
with $$E(\phi,k)=\int_0^\phi\sqrt{1-k^2\sin^2\theta}\,d\theta$$ being the elliptic integral of the second kind. Your integral is $$J(5/4)=3E\left(\tfrac\pi2,\tfrac{2\sqrt2}{3}\right)\approx 6.68244661028.$$
A: Your are facing an interesting problem. Not repeating what has been already answered, using Wolfram convention
$$\int_0^{2\pi}\sqrt{k + \cos(t)} \, dt=4 \sqrt{k+1}\, E\left(\frac{2}{k+1}\right)$$ In your case, $k$ is close to $1$. Using expansions
$$E\left(\frac{2}{k+1}\right)=1-\frac{1}{8} (k-1) (\log (k-1)+1-5 \log (2))+$$ $$\frac{1}{256} (k-1)^2 (10 \log
   (k-1)+19-50 \log (2))-$$ $$\frac{1}{2048} (k-1)^3 (31 \log (k-1)+68-155 \log (2))+O\left((k-1)^4\right)$$
Using $k=\frac 54$, this would give
$$\int_0^{2\pi}\sqrt{\frac{5}{4} + \cos(t)} \, dt\sim \frac{3 (127516+26649 \log (2))}{65536} =6.68279$$ which is not bad for a shortcut calculation.
