# The integral $\int \ln{(1+m^{2} +2m\cos{x})}\,\mathrm{d}x?$

I am trying to integrate the following: $$\int \ln{(1+m^{2} +2m\cos{x})}\,\mathrm{d}x.$$

Note that $m$ is a constant.

I tried using integration by parts but I didn't get the answer.

$\newcommand{\angles}{\left\langle\,{#1}\,\right\rangle} \newcommand{\braces}{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}{\displaystyle{#1}} \newcommand{\expo}{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\Li}{\,\mathrm{Li}_{#1}} \newcommand{\mc}{\mathcal{#1}} \newcommand{\mrm}{\mathrm{#1}} \newcommand{\ol}{\overline{#1}} \newcommand{\pars}{\left(\,{#1}\,\right)} \newcommand{\partiald}[]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\ul}{\underline{#1}} \newcommand{\verts}{\left\vert\,{#1}\,\right\vert}$

$\ds{\cos\pars{x} = {z^{2} + 1 \over 2z}\,,\quad z \equiv \expo{\ic x}}$.

\begin{align} &\color{#f00}{\int\ln\pars{1+m^{2} + 2m\cos\pars{x}}\,\dd x} = \int\ln\pars{mz^{2} + \bracks{1 + m^{2}}z + m \over z}\,{\dd z \over \ic z} \\[5mm] = & -\ic\int\ln\pars{m\bracks{z + m}\bracks{z + 1/m} \over z}\,{\dd z \over z} = -\ic\int\ln\pars{m\bracks{1 + z/m}\bracks{1 + mz} \over z}\,{\dd z \over z} \\[1cm] = &\ -\ic\,\ln\pars{m}\int{\dd z \over z} - \ic\int{\ln\pars{1 - \bracks{-z/m}} \over -z/m}\,\dd\pars{-\,{z \over m}} - \ic\int{\ln\pars{1 - \bracks{-mz}} \over -mz}\,\dd\pars{-mz} \\[5mm] + &\ \ic\int{\ln\pars{z} \over z}\,\dd z \\[1cm] = &\ -\ic\ln\pars{m}\ln\pars{z} + \ic\int\Li{2}\, '\pars{-\,{z \over m}}\,\dd\pars{-\,{z \over m}} + \ic\int\Li{2}\, '\pars{-mz}\,\dd\pars{-mz} + \half\,\ic\ln^{2}\pars{z} \\[5mm] = &\ \ln\pars{m}x + \ic\,\Li{2}\pars{-\,{z \over m}} + \ic\,\Li{2}\pars{-mz} - \half\,x^{2}\,\ic \\[5mm] = &\ \color{#f00}{\ln\pars{m}x + \ic\,\Li{2}\pars{-\,{\expo{\ic x} \over m}} + \ic\,\Li{2}\pars{-m\expo{\ic x}} - \half\,x^{2}\,\ic} + \mbox{a constant} \end{align}

• first of all thank you for your effort, Since this answer contain complex variables and special functions, which is ltl complicated. is it possible to get answer in some real valued elementary functions? if you know please let me know Sep 14, 2016 at 13:21

Wikipedia's page on Chebyshev polynomials includes the following generating function: $$\sum_{n=1}^\infty T_n(x)\frac{t^n}{n} = \ln\frac{1}{\sqrt{1-2xt+t^2}}.$$ Replacing $x\to \cos x$ and $t\to -m$, the above can be rearranged to $$\ln (1+2m\cos x+m^2) = -2 \sum_{n=1}^\infty T_n(\cos x)\frac{(-m)^n}{n}=-2 \sum_{n=1}^\infty \cos(n x)\frac{(-m)^n}{n}.$$ Integrated term-by-term gives $$\int \ln (1+2m\cos x+m^2)\,dx=-2 \sum_{n=1}^\infty \sin(n x)\frac{(-m)^n}{n^2}+C$$ i.e. the Fourier series for this integral.

I can give you the answer Mathematica gave me:

$$\int \ln{(1+m^{2} +2m\cos{x})}\,\mathrm{d}x = \\\frac{1}{2} \, x \left(\mathrm{i}\,x-2\,\ln\left(\frac{\mathrm{e}^{\mathrm{i}\,x}+m}{m}\right)- 2\, \ln\left(1+\mathrm{e}^{\mathrm{i}\,x}\,m\right)+2\,\ln{(1+m^{2} +2m\cos{x})}\right)\\+\mathrm{i}\,\mathrm{Li}_2\left(-\frac{\mathrm{e}^{\mathrm{i}\,x}}{m}\right)+\mathrm{i}\,\mathrm{Li}_2\left(-\mathrm{e}^{\mathrm{i}\,x}\,m\right)$$

with $\mathrm{Li}_n()$ the polylogarithm function.

• I don't entirely trust this answer (though I can certainly corroborate that this is what Mathematica yields). For instance, note that the integrand is $2\pi$-periodic, and so the integral should be as well. But this isn't true for the antiderivative given above. Sep 13, 2016 at 4:27
• @Semiclassical "note that the integrand is 2π-periodic, and so the integral should be as well" - That's not always the case. Consider the $2\pi$-periodic integrand $1+\cos{x}$. It's integral $x+\sin{x}$ is clearly not periodic. In order to guarantee a periodic integral, you need the extra condition that the integral over one full period be zero. Sep 17, 2016 at 20:24