$\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{\ds}[1]{\displaystyle{#1}} \newcommand{\dsc}[1]{\displaystyle{\color{red}{#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{\Li}[1]{\,{\rm Li}_{#1}} \newcommand{\norm}[1]{\left\vert\left\vert\, #1\,\right\vert\right\vert} \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}$ $\ds{\int_{0}^{\infty}\ln\pars{x^{2} + 2kx\cos\pars{b} + k^{2}\over x^{2} + 2kx\cos\pars{a} + k^2}\,{\dd x \over x}:\ {\large ?} \,,\qquad 0 <\ a\,,\ b\ <\pi\,,\quad k > 0.}$
\begin {align}& \overbrace { \color {#66f}{ \large\int_ {0}^{ \infty } \ln\pars {x^{2} + 2kx \cos\pars {b} + k^{2} \over x^{2} + 2kx \cos\pars {a} + k^2}\N-, {a} \dd x \over x}}} ^{ \dsc {x \over k}\ \ds { \mapsto }\ \dsc {x}} \\ [5mm]&= \int_ {0}^{ \infty } \ln\pars {x^{2} + 2x \cos\pars {b} + 1 \over x^{2} + 2x \cos\pars {a} + 1} \,{ \dd x \over x} = \lim_ {R\ \to\ \infty } \bracks { \fermi\pars {a,R} - \fermi\pars {b,R}} \\ [5mm]& \mbox {donde} \begin {array}{|c|} \hline\\ \ \fermi\pars { \mu ,R} \equiv \int_ {0}^{R} \ln\pars {x} {2x + 2 \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x\,, \quad 0 < \mu < \pi\ \\ \\ \hline \end {array} \qquad\qquad\quad\pars {1} \end {align}
Tenga en cuenta que $\ds{r_{-} \equiv \exp\pars{\bracks{\pi - \mu}\ic}}$ y $\ds{r_{+} \equiv \exp\pars{\bracks{\pi + \mu}\ic}}$ son las raíces de $\ds{x^{2} + 2x\cos\pars{\mu} + 1 = 0}$ tal que $\ds{\pars{~\mbox{with}\ R > 1~}}$ :
\begin {align}& \dsc { \int_ {0}^{R} \ln ^{2} \pars {x} {x + \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x} \\ [5mm]&=2 \pi\ic\bracks { \half\ , \ln ^{2} \pars {r_{-}} + \half\ , \ln ^{2} \pars {r_{+}}} - \int_ {R}^{0} \bracks { \ln\pars {x} + 2 \pi\ic }^{2} {x + \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x \\ [5mm]&= \pi\ic\bracks {- \pars { \pi - \mu }^{2} - \pars { \pi + \mu }^{2}} + \dsc { \int_ {0}^{R} \ln ^{2} \pars {x} {x + \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x} \\ [5mm]&+2 \pi\ic\ \overbrace { \int_ {0}^{R} \ln\pars {x} {2x + 2 \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x} ^{ \dsc { \fermi\pars { \mu ,R}}}\ +\ \pars {2 \pi\ic }^{2} \int_ {0}^{R} {x + \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x \\ [5mm]&-{ \mathfrak C} \pars {R, \mu } \end {align} donde $\ds{\left.{\mathfrak C}\pars{R,\mu} \equiv\oint\ln^{2}\pars{z} {z + \cos\pars{\mu}\over z^{2} + 2z\cos\pars{\mu} + 1}\,\dd z\,\right\vert _{z\ \equiv\ R\expo{\ic\theta}\,,\ 0\ <\ \theta\ <\ 2\pi}}$
Esta expresión lleva a: \begin {align} 0&=-2 \pi\ic\pars { \pi ^{2} + \mu ^{2}} + 2 \pi\ic\int_ {0}^{R} \ln\pars {x} {2x + 2 \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x \\ [5mm]&+ \pars {2 \pi\ic }^{2} \int_ { \cos\pars { \mu }}^{R + \cos\pars { \mu }} {x \over x^{2} + \sin ^{2} \pars { \mu }}\, \dd x - { \mathfrak C} \pars {R, \mu } \end {align}
y \begin {align} \fermi\pars { \mu ,R}&= \int_ {0}^{R} \ln\pars {x} {2x + 2 \cos\pars { \mu } \over x^{2} + 2x \cos\pars { \mu } + 1}\, \dd x \\ [5mm]&= \pi ^{2} + \mu ^{2} - \pi\ic\ln\pars { \bracks {R + \cos\pars { \mu }}^{2} + \sin ^{2} \pars { \mu }} + {{ \mathfrak C} \pars {R, \mu } \over 2 \pi\ic } \end {align}
En el $\ds{R \to \infty}$ tendremos: \begin {align} \lim_ {R \to\ \infty } \bracks { \fermi\pars {a,R} - \fermi\pars {b,R}} &=a^{2} - b^{2} \end {align}
tal que la expresión $\pars{1}$ se reduce a: \begin {align}& \color {#66f}{ \large\int_ {0}^{ \infty } \ln\pars {x^{2} + 2kx \cos\pars {b} + k^{2} \over x^{2} + 2kx \cos\pars {a} + k^2}\N-, {a} \dd x \over x}} = \color {#66f}{ \large a^{2} - b^{2}} \end {align}