Show that $\int_0^\pi \log( 1 - 2r\cos(t) + r^2)\, dt=0$ Show that for $r \in (-1,1)$
$$ \int_0^\pi \log( 1 - 2r\cos(t) + r^2)\, dt = 0$$
Here's what I did so far:
$$f(r,t) = \log(1 - 2r\cos(t) + r^2) = \log( (1-re^{it})(1-re^{-it}))$$
The Leibniz rule states that $$\dfrac{d}{dr} \int_0^\pi f(r,t)\ dt = \int_0^\pi \dfrac{\partial}{\partial r} f(r,t) \ dt$$
After calculating the right part I found $2\pi r$ which means that $\displaystyle\int_0^\pi f(r,t)\ dt = \pi r^2$ when it should be $0$.
Thanks in advance.
 A: Let $ n\in\mathbb{N} $, first of all, we wanna factor the polynomial $ X^{2n}-1 $, it has $ 2n-1 $ zeros which are $ \mathrm{e}^{\mathrm{i}\frac{k\pi}{n}} ,\ k\in\left[\!\left[0,2n-1\right]\!\right] $. Thus : \begin{aligned}X^{2n}-1=\prod_{k=0}^{2n-1}{\left(X-\mathrm{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}&=\left(X-1\right)\prod_{k=1}^{n-1}{\left(X-\mathrm{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\left(X+1\right)\prod_{k=n+1}^{2n-1}{\left(X-\mathrm{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\\ &=\left(X^{2}-1\right)\prod_{k=1}^{n}{\left(X-\mathrm{e}^{\mathrm{i}\frac{k\pi}{n}}\right)}\prod_{k=1}^{n-1}{\left(X-\mathrm{e}^{\mathrm{i}\frac{\left(2n-k\right)\pi}{n}}\right)}\\ &=\left(X^{2}-1\right)\prod_{k=1}^{n}{\left(X-\mathrm{e}^{\mathrm{i}\frac{k\pi}{n}}\right)\left(X-\mathrm{e}^{-\mathrm{i}\frac{k\pi}{n}}\right)}\\ X^{2n}-1&=\left(X^{2}-1\right)\prod_{k=1}^{n-1}{\left(X^{2}-2X\cos{\left(\frac{k\pi}{n}\right)}+1\right)}\end{aligned}
Hence, if $ r\in\left(-1,1\right) $, we have : $$ \prod_{k=1}^{n-1}{\left(r^{2}-2r\cos{\left(\frac{k\pi}{n}\right)}+1\right)}=\frac{r^{2n}-1}{r^{2}-1} $$
Using Riemann sum theorem, we have the following : \begin{aligned}\int_{0}^{\pi}{\ln{\left(r^{2}-2r\cos{x}+1\right)}\,\mathrm{d}x}&=\lim_{n\to +\infty}{\frac{\pi}{n}\sum_{k=0}^{n-1}{\ln{\left(r^{2}-2r\cos{\left(\frac{k\pi}{n}\right)}+1\right)}}}\\ &=\lim_{n\to +\infty}{\left(\frac{2\pi}{n}\ln{\left(1-r\right)}+\frac{\pi}{n}\ln{\left(\prod_{k=1}^{n-1}{\left(r^{2}-2r\cos{\left(\frac{k\pi}{n}\right)}+1\right)}\right)}\right)}\\ &=\lim_{n\to +\infty}{\left(\frac{2\pi}{n}\ln{\left(1-r\right)}+\frac{\pi}{n}\ln{\left(\frac{1-r^{2n}}{1-r^{2}}\right)}\right)}\\ \int_{0}^{\pi}{\ln{\left(r^{2}-2r\cos{x}+1\right)}\,\mathrm{d}x}&=0\end{aligned}
A: Note that $1 - 2r\cos t + r^2 = (1-re^{it})(1-re^{-it})$
\begin{align} 
&\int_0^\pi \log( 1 - 2r\cos t + r^2) dt\\
 = &\ 2Re \int_0^\pi \log(1-re^{it}) dt
= - 2Re \int_0^\pi \sum_{k=1}^\infty \frac{(re^{it} )^k }kdt\\
 = &\>-2\sum_{k=1}^\infty \frac{r^k}k  \int_0^\pi \cos kt\ dt =0
\end{align}
A: I used the naive method and from your insight $f(r,t)=\log(1-e^{it}r)+\log(1-e^{-it}r)$. Then we have, by substituting the inner integrand to be $u$ for each integral,
\begin{equation}
\begin{split}
\int_0^\pi\log(1-e^{it}r)dt+\int_0^\pi \log(1-e^{-it}r) dt&=\int_{1-r}^{1+r}\log u\dfrac{du}{i(u-1)}\\ &+\int_{1-r}^{1+r}\log u\left(-\dfrac{du}{i(u-1)}\right)=0
\end{split}
\end{equation}
as desired.
A: Doubling the integral, we may integrate over $[-\pi,\pi)$. The function
$u(z)=\log(1-z)$ is analytic in the unit disk, so averaging it on the circle $\{|z|=r\}$ yields $u(0)=0$.
A: If $I(r) $ is the integral then we have $I(0)=0$ and we can show that $I'(r) =0$ for all $r\in(-1,1)$ and then we get $I(r) =0$ for all $r\in(-1,1)$.
Clearly we have $$I'(r) =\int_{0}^{\pi}\frac{2r-2\cos t} {1-2r\cos t +r^2}\,dt$$ Clearly this is $0$ for $r=0$. So let $r\neq 0$ and then we can write $$I'(r) =\frac{1}{r}\int_0^{\pi}\left(1+\frac{r^2-1}{1-2r\cos t+r^2}\right)\,dt$$ and this equals $$\frac{1}{r}\left(\pi+\frac{\pi(r^2-1)}{\sqrt {(1+r^2)^2-4r^2}}\right)=0$$ as $r^2<1$.
We have used the standard formula $$\int_0^{\pi}\frac{dx}{a+b\cos x} =\frac{\pi} {\sqrt {a^2-b^2}},a>|b|$$
A: hint
$$1-2r\cos(t)+r^2=$$
$$(r-\cos(t))^2+\sin^2(t)$$
A: By substitution $(z=e^{it})$ and computing residues, we have the well known integrals:
$$J_1 = \int_0^{2\pi} \frac{dt}{1-2r\cos t+ r^2} = \frac{2\pi}{1-r^2}, \quad (|r|<1),$$
$$J_2 = \int_0^{2\pi} \frac{\cos t\, dt }{1-2r\cos t+ r^2} = \frac{2\pi r}{1-r^2}, \quad (|r|<1).$$
Let $$J_0(r) = \int_0^{2\pi} \log \left( {1-2r\cos t+ r^2} \right) dt$$
$$\frac{dJ_0}{dr} = \int_0^{2\pi} \frac{\partial  \log \left( {1-2r\cos t+ r^2} \right)}{\partial r}dt=2 \int_0^{2\pi} \frac{r-\cos t}{ {1-2r\cos t+ r^2} }dt=rJ_1-J_2=0.$$
$$J_0(r) = \text{const}.$$
Since $J_0(0)=0,$ we have $$J_0(r) = 0,$$ but this is twice the integral we want, which is thus zero.
A: In my post, I found that
$$
\int_{0}^{\pi} \ln (b \cos x+c) d x=\pi \ln \left(\frac{c+\sqrt{c^{2}-b^{2}}}{2}\right)
$$
where $\left|\frac{b}{c}\right| \leqslant 1$ and $c \neq 0$.
$$
\begin{aligned}
\int_{0}^{\pi} \ln \left(1-2 r \cos t+r^{2}\right) d t =& \pi \ln \left(\frac{1+r^{2}+\sqrt{\left(1+r^{2}\right)^{2}-(-2 r)^{2}}}{2}\right) = 0 .
\end{aligned}
$$
