# Indefinite integral with trigonometric functions under square root

Consider indefinite integral:

$I = \int \mathrm{d}x \sqrt{2+\cos(x)+\cos(2x)}$

I was expecting simple result in terms of elliptic function. Unfortuntely, Mathematica spits out very ugly thing.

Can anyone give route for tidier expression?

• Why were you expecting a simple result out of this? It is a complicated integral. What are you supposed to evaluate this for? – infinitylord Dec 28 '16 at 20:27
• Yes, it's going to look a bit messy in the end. Mathematica is not too good at elliptic integrals (something I've griped about many times). After making the substitution $u=\cos x$, you can put your integral into a form where formula 259.03 of Byrd and Friedman applies. – J. M. is a poor mathematician Dec 28 '16 at 20:36
• this leads to an elliptic integral and this looks very ugly – Dr. Sonnhard Graubner Dec 28 '16 at 22:12