How do I integrate $\int \log(1+2m\cos x+m^2) dx $ ?
I tried 2 things. First, I tried complex numbers. Putting $\cos x = \frac{e^{ix}+e^{-ix}}{2} $ which led me to $\int \log((me^{ix} +1)(me^{-ix}+1))dx $ and finally $\int \log(me^{ix} +1)+\log(me^{-ix}+1)dx $ , which I expanded using taylor expansion of $ \log(1+x)$ and then transformed it back to sine and cos, and then integrated but the answer was pretty ugly. And I'm not even sure it is correct.
Another thing I tried was to differentiate the integral with respect to m and then integrate it with respect to x and then with respect to m. But I couldn't do the last step, id est, integrating with respect to m.
Is there any other method which can be applied for this integration ?