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?
Complex logarithms when computing real-valued integral
149 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
$\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}
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:
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.