Integrate $\int\limits_{0}^{1} \frac{\log(x^{2}-2x \cos a+1)}{x} dx$ How do I solve this: $$\int\limits_{0}^{1} \frac{\log(x^{2}-2x \cos{a}+1)}{x} \ dx$$
Integration by parts is the only thing which I could think of, clearly that seems cumbersome. Substitution also doesn't work.
 A: Rewriting the integral as
$$
\int\limits_{0}^{1} \frac{\log|x-e^{i a}|^2}{x} \ dx=
\int\limits_{0}^{1} \frac{\log|1-xe^{-i a}|^2}{x} \ dx=
$$
$$
\int\limits_{0}^{1} \frac{\log(1-xe^{i a })}{x} \ dx+
\int\limits_{0}^{1} \frac{\log(1-xe^{-i a })}{x} \ dx,
$$
expanding and integrating termwise leads to an answer in the form of series.
A: Assume $0<a<2 \pi$. In this case $x^2-2 \, x \, \cos a+1 > 0$ for $0\le x \le 1$, so integral converges.
Denote $I(a)$ the value of the integral. Consider $\partial_a I(a)$. You can exchange the order of integration and differentiation, getting
$$
 \partial_a I(a) = \int_0^1 \mathrm{d} x \frac{2 \sin a}{x^2 + 1 - 2 \, x \, \cos a} = \pi - a
$$ 
The integral above is computed after a substitution $x = \cos a + \sin a \cdot \tan \frac{t}{2}$ and carefully considering integration region.
From here, knowing that for $I(\frac{\pi}{2}) = \frac{\pi^2}{24}$, we get
$$I(a) = \frac{\pi^2}{24} + \int_{\frac{\pi}{2}}^a \mathrm{d} \alpha ( \pi - \alpha) = \pi a - \frac{a^2}{2} - \frac{\pi^2}{3}.$$ 
The formula also extends to $a=0$ because the $I(0)$ converges.
The answer is extended to real $a$ by periodicity.
A: Please see $\textbf{Problem 4.30}$ in the book: ($\text{solutions are also given at the end}$)


*

*$\text{The Math Problems Notebook,}$ by Valentin Boju and Louis Funar.
A: Apply the identity $Li_2(z) + Li_2({1/z})=-\frac{\pi^2}6-\frac12\ln^2(-z)$ in the evaluation below
\begin{align}
\int_{0}^{1} \frac{\ln(x^{2}-2x\cos{a}+1)}{x} \ dx 
=& \int\limits_{0}^{1} \frac{\ln(1-xe^{i a})+ \ln(1-xe^{-ia })}{x} \ dx  \\=&-Li_2(e^{ia })- Li_2(e^{-ia }) \\
=& \frac{\pi^2}6 + \frac12\ln^2(-e^{ia})= \frac{\pi^2}6+\frac12[i (a-\pi)]^2\\
= &-\frac12a^2 +\pi a - \frac{\pi^2}3
\end{align}
