# log and poisson-like integral

Here is a fun looking one some may enjoy.

Show that:

$$\int_{0}^{1}\log\left(\frac{x^{2}+2x\cos(a)+1}{x^{2}-2x\cos(a)+1}\right)\cdot \frac{1}{x}dx=\frac{\pi^{2}}{2}-\pi a$$

-
The LHS is a periodic function of $\large a$ which is not consistent with the RHS. In addition, the LHS is an even function of $\large a$. – Felix Marin Jul 14 '14 at 7:19

Starting from $${\rm Log}(1+x e^{ia})=\sum_{n=1}^\infty\frac{(-1)^{n-1}e^{ina}}{n}x^n$$ we see that $$\int_0^1{\rm Log}(1+x e^{ia})\cdot \frac{1}{x}dx=\sum_{n=1}^\infty\frac{(-1)^{n-1}e^{ina}}{n^2}$$ Taking real parts we get $$\int_0^1 \log|1+x e^{ia}|\cdot \frac{1}{x}dx=\sum_{n=1}^\infty\frac{(-1)^{n-1}\cos(na)}{n^2}$$ applying this to $a+\pi$ instead of $a$ we obtain also $$\int_0^1 \log|1-x e^{ia}|\cdot \frac{1}{x}dx=-\sum_{n=1}^\infty\frac{\cos(na)}{n^2}$$ Subtracting these two formulas: $$\int_0^1 \log\frac{|1+x e^{ia}|}{|1-x e^{ia}|}\cdot \frac{1}{x}dx= \sum_{n=1}^\infty\frac{((-1)^{n-1}+1)\cos(na)}{n^2} =\sum_{n=0}^\infty\frac{2\cos((2n+1)a)}{(2n+1)^2}$$ or $$\int_0^1 \log\left(\frac{1+2x\cos(a)+x^2}{ 1-2x \cos(a)+x^2 }\right)\cdot \frac{1}{x}dx =\sum_{n=0}^\infty\frac{4\cos((2n+1)a)}{(2n+1)^2}\tag{1}$$ On the other hand if $f$ is the $2\pi$-periodic even function that coincides with $a\mapsto \frac{\pi^2}{2}-\pi a$ on $[0,\pi]$ then it is straightforward to check that the Fourier series expansion of $f$ coincides with the right side of $(1)$. So, we have shown that $$\int_0^1 \log\left(\frac{1+2x\cos(a)+x^2}{ 1-2x \cos(a)+x^2 }\right)\cdot \frac{1}{x}dx =\frac{\pi^2}{2}-\pi |a|$$ for $a\in[-\pi,\pi]$.$\qquad\square$

-

Denote $$I(r) =\int_{0}^{1}\log\left(\frac{x^{2}+2x r +1}{x^{2}-2x r+1}\right)\cdot \frac{1}{x}dx$$ then \begin{align} \frac{dI}{dr} &=\int_0^1 \frac{4 \left(x^2+1\right)}{\left(2-4 r^2\right) x^2+x^4+1} dx\\ &=\int_0^1 \left(\frac{2}{x^2+2rx+1}+\frac{2}{x^2-2 r x+1} \right)dx\\ &=\frac{2 \tan ^{-1}\left(\frac{x+r}{\sqrt{1-r^2}}\right)}{\sqrt{1-r^2}}\Biggl|_0^1 +\frac{2 \tan ^{-1}\left(\frac{x-r}{\sqrt{1-r^2}}\right)}{\sqrt{1-r^2}}\Biggl|_0^1\\ &=\frac{2}{\sqrt{1-r^2}}\left(\tan ^{-1}\left(\frac{x+r}{\sqrt{1-r^2}}\right)+\tan ^{-1}\left(\frac{x-r}{\sqrt{1-r^2}}\right)\right)\Biggl|_0^1\\ &=\frac{2}{\sqrt{1-r^2}}\tan^{-1}\frac{\frac{x+r}{\sqrt{1-r^2}}+\frac{x-r}{\sqrt{1-r^2}}}{1-\frac{x+r}{\sqrt{1-r^2}}\frac{x-r}{\sqrt{1-r^2}}}\Biggl|_0^1\\ &=\frac{2}{\sqrt{1-r^2}}\tan^{-1}\frac{2x\sqrt{1-r^2}}{1-x^2}\Biggl|_0^1\\ &=\frac{2}{\sqrt{1-r^2}}\frac{\pi}{2}\\ &=\frac{\pi}{\sqrt{1-r^2}}\\ \end{align} Since $I(0)=0$, then $$I(\cos a)=I(0)+\int_0^{\cos a} \frac{dI}{dr}dr=\int_0^{\cos a}\frac{\pi}{\sqrt{1-r^2}}dr=\pi\sin^{-1}s|_0^{\cos a}=\frac{\pi^{2}}{2}-\pi a$$

-
i am wondering how did this receive a downvote ... i doing same except differentiated w.r.t. $a$. – Santosh Linkha May 24 '14 at 21:35
@SantoshLinkha, then you may upvote :) After long time I understood that there is no point in asking "why the downvote?", "downvoter, explain what's wrong". In most cases you won't get respond. – Norbert May 24 '14 at 21:39
who upvoted both answers along with the question?? me ... of course!! :D – Santosh Linkha May 24 '14 at 21:46
both solutions are very nice and clever. Whomever downvoted must have done it just to be a *****. – Cody May 24 '14 at 22:01

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{\int_{0}^{1}\ln\pars{x^{2} + 2x\cos\pars{a} + 1 \over x^{2} - 2x\cos\pars{a} + 1}\,{\dd x \over x}:\ {\large ?}}$

Then, with $\ds{0 < \epsilon < 1}$: \begin{align} &\int_{\epsilon}^{1}\ln\pars{x^{2} + 2x\cos\pars{a} + 1 \over x^{2} - 2x\cos\pars{a} + 1}\,{\dd x \over x} \\[3mm]&= \int_{\epsilon}^{1}{\ln\pars{x + p} \over x}\,\dd x +\int_{\epsilon}^{1}{\ln\pars{x + p^{*}} \over x}\,\dd x -\int_{\epsilon}^{1}{\ln\pars{x - p} \over x}\,\dd x -\int_{\epsilon}^{1}{\ln\pars{x - p^{*}} \over x}\,\dd x \end{align}
However, \begin{align} &\int_{\epsilon}^{1}{\ln\pars{x + b} \over x}\,\dd x =-\ln\pars{b}\ln\pars{\epsilon} +\int_{\epsilon}^{1}{\ln\pars{x/b + 1} \over x}\,\dd x \\[3mm]&=-\ln\pars{b}\ln\pars{\epsilon} +\int_{\epsilon/b}^{1/b}{\ln\pars{x+ 1} \over x}\,\dd x =-\ln\pars{b}\ln\pars{\epsilon} +\int_{-\epsilon/b}^{-1/b}{\ln\pars{1 - x} \over x}\,\dd x \\[3mm]&=-\ln\pars{b}\ln\pars{\epsilon} -\int_{-\epsilon/b}^{-1/b}{{\rm Li}_{1}\pars{x} \over x}\,\dd x =-\ln\pars{b}\ln\pars{\epsilon} -\int_{-\epsilon/b}^{-1/b}{\rm Li}_{2}'\pars{x}\,\dd x \end{align} $$\begin{array}{|c|}\hline\\ \quad \int_{\epsilon}^{1}{\ln\pars{x + b} \over x}\,\dd x =-\ln\pars{b}\ln\pars{\epsilon} + {\rm Li}_{2}\pars{-\,{\epsilon \over b}} -{\rm Li}_{2}\pars{-\,{1 \over b}} \quad\\ \\ \hline \end{array}$$
Since $\ds{pp^{*} = 1}$, we get in the limit $\ds{\epsilon \to 0^{+}}$: \begin{align} &\int_{0}^{1}\ln\pars{x^{2} + 2x\cos\pars{a} + 1 \over x^{2} - 2x\cos\pars{a} + 1}\,{\dd x \over x} \\[3mm]&=-{\rm Li}_{2}\pars{-\,{1 \over p}} -{\rm Li}_{2}\pars{-\,{1 \over p^{*}}} +{\rm Li}_{2}\pars{1 \over p} +{\rm Li}_{2}\pars{1 \over p^{*}} \\[3mm]&=-\bracks{{\rm Li}_{2}\pars{-p} + {\rm Li}_{2}\pars{-\,{1 \over p}}} +\bracks{{\rm Li}_{2}\pars{p} + {\rm Li}_{2}\pars{1 \over p}} \end{align}
\begin{align} &\int_{0}^{1}\ln\pars{x^{2} + 2x\cos\pars{a} + 1 \over x^{2} - 2x\cos\pars{a} + 1}\,{\dd x \over x} \\[3mm]&=-\bracks{{\rm Li}_{2}\pars{-\expo{\ic a}} +{\rm Li}_{2}\pars{-\expo{-\ic a}}} +\bracks{{\rm Li}_{2}\pars{\expo{\ic a}} + {\rm Li}_{2}\pars{\expo{-\ic a}}} \end{align} This is the general solution for $\ds{a \in {\mathbb R}}$. The OP proposed solution is found when $\ds{0 \leq a \leq \pi}$. A little later, I'll explain how to handle the general case by means of the DiLogarithm Inversion Formula.
As soon as complex numbers enter the frame, the function $\ln$ stops to be well defined. Hence what this "solution" does is to hide the problem behind misapplications of notations. (Fortunately, rigorous answers are on the page.) – Did Jul 14 '14 at 9:39
You're right concerning the different $\large \ln$-branchs. However, the solution turns out to be right: An odd function of $\large\cos\left(a\right)$ and a periodic function of $\large a$ which is reduced to the OP proposed solution when $\large a \in \left[0,\pi\right)$. I agree my $\large\ln$-handling is somehow loosely done. I'll check my answer. Thanks. – Felix Marin Jul 14 '14 at 18:12