Using differentiation with respect to the parameter,show that for $|r|<1$
$$\mathbf{F}(r)=\int_{0}^{\pi}\ln\left(1-2r\cos x +r^2 \right)dx =0$$
my attempt is $$\mathbf{F}'(r)=\int_{0}^{\pi}{-2\cos x + 2r \over1-2r\cos x +r^2}dx$$
let $u=\tan{x \over2}$ then $\cos x = {1-u^2 \over 1+u^2} $ and $dx={2du \over 1+u^2}$
Now $$\mathbf{F}'(r)=\int_{0}^{\infty}{-2{1-u^2 \over 1+u^2} + 2r \over1-2r{1-u^2 \over 1+u^2} +r^2}{2du \over 1+u^2}$$ $$\mathbf{F}'(r)= 4\int_{0}^{\infty}{r+ru^2+u^2-1 \over 1+u^2-2r+2ru^2+r^2}{du \over 1+u^2}$$ but I do not know how to continue, I tried with partial fractions but it becomes too tedious.