TITLE: Evaluate $\int_0^{\pi}\log\left(5-4 \cos x\right) \, \mathrm{d}x$.
QUESTION [6 upvotes]: The problem is
$$\int_0^{\pi}\log\left(5-4 \cos x\right) \, \mathrm{d}x$$
What I tried was using standard limit formulas like changing $\cos(x)$ to $\sin(x)$ and I also tried integration by parts on it to no avail.
Could anyone help?
By the way, the method is different from $\int_0^{\pi}\log\left(1-\cos x\right) \, \mathrm{d}x$, otherwise I would have solved it.

REPLY [9 votes]: Let $I(a)=\int_0^{\pi}\log\left(1-a \cos x\right) \, \mathrm{d}x$. Then
$$I’(a) = -\int_0^\pi \frac{\cos x}{1-a\cos x}dx
=\frac\pi a-\frac\pi{a\sqrt {1- a^2}}
$$
and
\begin{align}
\int_0^{\pi}\log\left(5-4 \cos x\right) \, \mathrm{d}x
=& \>\pi\ln5 + I\Big(\frac45\Big)=\pi\ln5 + \int_0^{\frac45}I’(a)da\\
=& \>\pi\ln5-\pi\ln\frac54=2\pi\ln2
\end{align}