differentiation under the integral sign $\int_{0}^{\pi}\ln\left(1-2r\cos x +r^2 \right)dx$ 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.

If you continue $$A={r+ru^2+u^2-1 \over 1+u^2-2r+2ru^2+r^2}{1 \over 1+u^2}=\frac{(r+1) u^2+(r-1) } {(1+u^2)((r+1)^2 u^2+(r-1)^2)} $$ For the time being, let $t=u^2$ to get
$$A=\frac{(r+1) t+(r-1) } {(1+t)((r+1)^2 t+(r-1)^2)} $$
 being and partial fraction decomposition leads to 
$$A=\frac{1}{2 r}\frac{1}{
   \left(t+1\right)}+\frac{r^2-1}{2 r} \frac{1}{ (r+1)^2 t+(r-1)^2}$$ and , bach to $u$
$$A=\frac{1}{2 r}\frac{1}{
   \left(u^2+1\right)}+\frac{r^2-1}{2 r} \frac{1}{ (r+1)^2 u^2+(r-1)^2}$$ does not seems too bad.
