My question arise when I try to calculate real-valued integral, specifically, I want to evaluate the integral \begin{equation} \int_0^1 \frac{\ln \left(\frac{x^2}{2}-x+1\right)}{x} dx \end{equation} Which from by-part integration \begin{equation}\int_0^1 \frac{\ln \left(\frac{x^2}{2}-x+1\right)}{x} dx=-2\int_0^1\ln x \cdot\frac{x-1}{x^2-2x+2} dx \end{equation} then by partial fraction \begin{equation} -2\int_0^1\ln x \cdot\frac{x-1}{x^2-2x+2} dx=-\int_0^1\frac{\ln x}{x-1-i} dx-\int_0^1\frac{\ln x}{x-1+i} dx \end{equation} Using dilogarithm, the integrals are \begin{equation}-\int_0^1\frac{\ln x}{x-1-i} dx-\int_0^1\frac{\ln x}{x-1+i} dx=-\text{Li}_2\left(\frac{1+i}{2}\right)-\text{Li}_2\left(\frac{1-i}{2}\right) \end{equation} Then there is a problem when I tried to use Euler's reflection formula \begin{equation} -\text{Li}_2\left(\frac{1+i}{2}\right)-\text{Li}_2\left(\frac{1-i}{2}\right)=-\frac{\pi^2}{6}+\ln\left(\frac{1+i}{2}\right)\ln\left(\frac{1-i}{2}\right) \end{equation} Which is a problem since logarithm over complex number do not have unique value (Example:$\ln(4i)=\ln(4)+\frac{\pi i}{2}+2\pi ni $ for $n\in\mathbb{Z}$) but the integral must have a unique solution.
So how do we correctly evaluate those logarithms to get the correct value of the integral?

  • $\begingroup$ I would assume by using $\ln (r \mathrm{e}^{\mathrm{i} \theta}) = \ln(r) + \mathrm{i}\theta$, where $\theta$ is the principle argument. W|A says that $$\displaystyle \ln\left(\frac{1+i}{2}\right)\ln\left(\frac{1-i}{2}\right) = \frac{\pi^2}{16}+\frac{\ln^2(2)}{4}.$$ I would think this is assumed in the representation of those integrals by dilogarithms? $\endgroup$ May 26, 2016 at 3:09

2 Answers 2


Using integration by parts, the original integral turns into: $$ \int_{0}^{1}\frac{x-1}{1-x+\frac{x^2}{2}}\,\log(x)\,dx \tag{1}$$ We may compute the Taylor series of $\frac{x-1}{1-x+\frac{x^2}{2}}$ in a neighbourhood of the origin through partial fraction decomposition, then exploit $$ \int_{0}^{1} x^k\log(x)\,dx = -\frac{1}{(k+1)^2}.\tag{2} $$ That procedure maps $(1)$ into a combination of dilogarithms, but since the sum of the roots of $1-x+\frac{x^2}{2}$ is $2$ by Viète's theorem, by applying the dilogarithm reflection formulas the final outcome is just:

$$ \color{red}{\frac{\log^2(2)}{4}-\frac{5\pi^2}{48}}.\tag{3}$$

The logarithm involved in Euler's reflection formula is the one deriving from the principal argument, but if you have some doubts about the determinations, you may still consider that $(1)$ has to be real, so the uncertainty is limited to the integer constant that multiplies $\frac{\pi^2}{48}$ in $(3)$-like formula. By estimating $(1)$ numerically you may find that such a constant has to be $-5$ as above.

  • $\begingroup$ That would explain why answer seems to be the principal argument, thank you very much. $\endgroup$
    – Kavinkul
    May 26, 2016 at 3:34
  • $\begingroup$ Wikipedia is really a mesh in dealing with the branch-cuts of the $\color{#f00}{\large \ln}$ functions in its PolyLogarithm article ( en.wikipedia.org/wiki/Polylogarithm ). For that reason, I decided to stop my answer with the ${\large\mathrm{Li}_{2}}$ expression. $\endgroup$ May 26, 2016 at 5:45
  • $\begingroup$ I mean 'mess' instead of 'mesh'. The english !!!... $\endgroup$ May 26, 2016 at 16:09

$\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{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{\mathrm{i}} \newcommand{\iff}{\Leftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\, #2 \,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$

Integrating by parts: \begin{align} &\color{#f00}{\int_{0}^{1}{\ln\pars{x^{2}/2 - x + 1} \over x}\,\dd x} = -\int_{0}^{1}\ln\pars{x}\,{x - 1 \over \pars{x^{2} - 2x + 2}/2}\,\dd x \\[3mm] &\ = -2\int_{0}^{1}\ln\pars{x}\,{x - 1 \over \pars{x - r}\pars{x - r^{*}}}\,\dd x \end{align}

where $r \equiv 1 + \ic$.

\begin{align} &\color{#f00}{\int_{0}^{1}{\ln\pars{x^{2}/2 - x + 1} \over x}\,\dd x} = -2\int_{0}^{1}\ln\pars{x}\, \pars{{x - 1 \over x - r} - {x - 1 \over x - r^{*}}}\,{1 \over r - r^{*}}\,\dd x \\[3mm] = &\ -2\,\Im\int_{0}^{1}\ln\pars{x}\,{x - 1 \over x - r}\,\dd x = 2\,\Im\bracks{\pars{r - 1}\int_{0}^{1}{\ln\pars{x} \over r - x}\,\dd x} = 2\,\Re\int_{0}^{1}{\ln\pars{r\bracks{x/r}} \over 1 - x/r} \,{\dd x \over r} \\[3mm] = &\ 2\,\Re\int_{0}^{1/r}{\ln\pars{rx} \over 1 - x}\,\dd x \end{align}

Integrating by parts: \begin{align} &\color{#f00}{\int_{0}^{1}{\ln\pars{x^{2}/2 - x + 1} \over x}\,\dd x} = 2\,\Re\int_{0}^{1/r}{\ln\pars{1 - x} \over x}\,\dd x = -2\,\Re\int_{0}^{1/r}{\mathrm{Li}_{1}\pars{x} \over x}\,\dd x \\[3mm] = &\ -2\,\Re\int_{0}^{1/r}\mathrm{Li}_{2}'\pars{x}\,\dd x = \color{#f00}{-2\,\Re\bracks{\mathrm{Li}_{2}\pars{\half - \half\,\ic}}} \approx -0.9080 \end{align}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .