Yet another difficult integration question For $r \in (0,1)$ and $k \in \mathbb Z^+$, prove
$$ \frac{1}{\pi} \int_{0}^\pi \ln\left(1 + r \cos(u)\right) \ln \left( 1 + r \cos(3^k u)\right) du = \left(\ln\left(\frac{2(1-\sqrt{1-r^2})}{r^2}\right)\right)^2.$$
Given that for any $n \in \mathbb Z^+$
$$ - \frac{1}{\pi} \int_{0}^\pi \ln\left(1 + r \cos(nu)\right) du = \ln\left(\frac{2(1-\sqrt{1-r^2})}{r^2}\right).$$
In my mind, the strategy should be to use the fact that $\cos(u)$ and $\cos(3^ku)$ are orthogonal. Write $[0,\pi]$ as a product space where $\cos(u)$ and $\cos(3^ku)$ are constant along the (orthogonal) fibres. Then use Fubini's theorem. But I am having difficulty in putting the pieces together. Thanks for your help.
For a positive integer $s$, and $r\in(0,1)$, let $I_s(r)$ be defined by
$$
I_s(r)=\frac{1}{\pi}\int_0^\pi\ln(1+r\cos(t))\ln(1+r\cos(s t))dt.
$$
We will prove the following result:


  Proposition. For every positive integer $s$, and every $r\in(0,1)$ we have
  $$
I_s(r)=\left(\ln\left(\frac{2(1-\sqrt{1-r^2})}{r^2}\right)\right)^2
+\frac{2}{s}{\rm Li}_2\left(\left(\frac{\sqrt{1-r^2}-1}{r}\right)^{s+1}\right)
$$
  where ${\rm Li}_2$ is the well-known Dilogarithm.


This result shows that the proposed formula in the question is wrong.

${\it Proof.}$ In what follows $z=\frac{1-\sqrt{1-r^2}}{r}$. $z$ is the root that belongs to $(0,1)$ of the equation $z^2-\frac{2}{r}z+1=0$.

Now
$$\eqalign{
\ln(1+z^2+2z \cos t)&amp;=\ln(|1+z e^{it}|^2)=2{\rm Re}\,{\rm Log}(1+ze^{it})\cr
&amp;=\sum_{n=1}^\infty\frac{2(-1)^{n-1}z^n}{n}\cos(nt)
}
$$
using the fact that $\frac{2z}{1+z^2}=r$ we conclude that
$$
\ln(1+r \cos t)=-\ln\left(\frac{2z}{r}\right)+\sum_{n=1}^\infty\frac{2(-1)^{n-1}z^n}{n}\cos(nt)\tag{1}
$$
Replacing $t$ by $st$ we get also
$$
\ln(1+r \cos (st))=-\ln\left(\frac{2z}{r}\right)+\sum_{n=1}^\infty\frac{2(-1)^{n-1}z^n}{n}\cos(sn t)\tag{1}
$$
Using Parseval's formula we conclude that
$$ 
\frac{1}{2\pi}\int_{-\pi}^{\pi}
\ln(1+r \cos (t))\ln(1+r \cos (st))dt =\left(\ln\left(\frac{2z}{r}\right)\right)^2
+\frac{2}{s}\sum_{n=1}^\infty
\frac{(-z)^{(s+1) n}}{n^2}
$$
Or, equivalently
$$
I_s(r)=\left(\ln\left(\frac{2z}{r}\right)\right)^2
+\frac{2}{s}\,{\rm Li}_2((-z)^{s+1}).
$$
which is the announced result.$\qquad\square$

Finally, note that the proposed integral corresponds to $s=3^k$.
Lemma 1: Let $n \in \mathbb{Z}\backslash\{0\}$ and let $f$ be a function such
  that $f(x+T)=f(x)$ for all $x$. Then $$
     \int_0^T f(nx) \mathrm{d}x =  \int_0^T f(x) \mathrm{d}x  $$


${}$


  Lemma 2: Let $f$ be any function such that $\int_0^{\pi} f(x)\,\mathrm{d}x  $ converges, then $$\int_0^{\pi} f(\cos x)\,\mathrm{d}x=\frac{1}{2}\int_0^{2\pi} f(\cos x)\,\mathrm{d}x$$


Using these two results it follows immediately that

\begin{align*}
I_n(r)
&amp; = - \frac{1}{\pi} \int_{0}^\pi \ln\left(1 + r \cos(nu)\right) du \\
&amp; = - \frac{1}{2\pi} \int_{0}^{2\pi} \ln\left(1 + r \cos(nu)\right) du \\
&amp; = - \frac{1}{\pi} \int_{0}^\pi \ln\left(1 + r \cos u\right) du \\
&amp; = I_1(r) = I(r)
\end{align*}

The next step is to differentiate under the integral sign. I will come back to the conditions where this holds, so

\begin{align*}
I'(r) 
= 
- \frac{1}{2\pi} \int_{0}^{2\pi} \frac{\partial }{\partial r} \ln\left(1 + r \cos u\right)\,\mathrm{d}u
= \frac{-1}{2\pi} \int_{0}^{2\pi} \frac{\cos u}{1 + r \cos u}\,\mathrm{d}u
=  \frac{1}{r} - \frac{1}{r\sqrt{1-r^2}}\end{align*}

Also note that $I(0) = 0$, so integrating the above expression from $0$ to $r$ gives

\begin{align*}
\int_0^r I(\tau) \mathrm{d}\tau &amp; = \int_0^r \frac{1}{\tau} - \frac{1}{\tau\sqrt{1-\tau^2}} \mathrm{d}\tau \\
I(r) - I(0) &amp; = \log \left( \frac{2}{r} \right) - \operatorname{arctanh}\left( \frac{1}{\sqrt{1-r^2}} \right)
\end{align*}

This is valid since we assume that $|r|&lt; 1$. Hence

$$
I_n(r)
 = - \frac{1}{\pi} \int_{0}^\pi \ln\left(1 + r \cos(nu)\right) du
 = \log \left( \frac{2}{r} \right) - \operatorname{arctanh}\left( \frac{1}{\sqrt{1-r^2}} \right)
$$

The proof of the second lemma is trivial, and the evaluation of the trigonometric integral can be done something along the lines of 
$$
\frac{1}{r}\int_0^{2\pi} \frac{r\cos x}{1 + r \cos x} \mathrm{d}x 
= \frac{1}{r}\int_0^{2\pi} 1 - \frac{\mathrm{d}x}{1 + r \cos x} 
= \frac{2\pi}{r} - \int_{-\infty}^\infty \frac{2\mathrm{d}u}{(1-r)u^2 + 1+r}
$$
Then use something like $u \mapsto u\frac{1+r}{\sqrt{1-r}}$ to complete the work.
The proof of the first integral is also elementary note 
\begin{align}
          \int_0^{T} f(kx) \mathrm{d}x
 = \frac{1}{k}\int_{0}^{kT} f(x)\mathrm{d}x
 = \frac{1}{k}\sum_{n=0}^{k-1} \int_{nT}^{(n+1)T} f(x)\mathrm{d}x
 = \frac{1}{k}\sum_{n=0}^{k-1} \int_{0}^{T} f(u + nT)\mathrm{d}u
\end{align}
This completes the proof since, $f$ is has a period of $T$ then $f(u+nT)=f(u)$.
Eg intuitively we have $k$ integrals $\int_0^T + \int_T^{2T} + \cdots + \int_{(k-1)T}^{kT}$ equally big.