Evaluate $\int\limits_0^1\frac{\log(1-x+x^2)\log(1+x-x^2)}{x}dx$

First of all, it was probably a good call not trying this yourself...

enter image description here

I would say that you can't evaluate it "exactly", because if you go digging through Wolfram Alpha's gigantic monstrosity of antidifferentiation, you will find a lot of logarithmic integrals in there, which are not elementary functions.

It makes sense, too, that this is so ugly, because it will end up going into complex numbers. Your definite integral can be evaluated with less difficulty because $1+x-x^2$ is positive over that interval, but it is negative for all $x$ above the golden ratio and below its conjugate, meaning that $\ln(1+x-x^2)$ does not even exist in the reals over that interval. So calculating the antiderivative is out of the question.

If you still want to go after it, here's a trick that might lead somewhere (but probably not): let $$s(a,b)=\int_0^1 \frac{\ln(1-x+x^2)\ln(1+x-x^2)a^{\ln(1+x-x^2)-1}b^{\ln(1-x+x^2)-1}}{x}dx$$ Then integrate both sides to get $$\int s(a,b)da=\int_0^1 \frac{\ln(1-x+x^2)a^{\ln(1+x-x^2)}b^{\ln(1-x+x^2)-1}}{x}dx+C$$ $$\int s(a,b)da=\int_0^1 \frac{\ln(1-x+x^2)(1+x-x^2)^{\ln a}b^{\ln(1-x+x^2)-1}}{x}dx+C$$ Then integrate with respect to the other variable to get $$\int\int s(a,b)dadb=\int_0^1 \frac{(1+x-x^2)^{\ln a}b^{\ln(1-x+x^2)}}{x}dx+C$$ $$\int\int s(a,b)dadb=\int_0^1 \frac{(1+x-x^2)^{\ln a}(1-x+x^2)^{\ln b}}{x}dx+C$$

Your integral is equal to $S(1,1)$, so if you find a closed-form of $$\int_0^1 \frac{(1+x-x^2)^{\ln a}(1-x+x^2)^{\ln b}}{x}dx+C$$ and then use that to find $s(a,b)$, you might be able to do it... but I highly doubt that you will want to do this.

My advice to you is this: just evaluate it numerically and maybe use an inverse symbolic calculator (or abandon this evil integral altogether).


It's

$$\int_0^1\frac{\log(1-x+x^2)\log(1+x-x^2)}{x}dx= -2\sum\limits_{k=1}^\infty \frac{(2k-1)!^2}{(4k)!}\sum\limits_{v=0}^{k-1}\frac{1}{k+v}$$

which is $\enspace\approx -0.0848704554500727311… $ .

Already $\enspace\displaystyle -2\sum\limits_{k=1}^{10} \frac{(2k-1)!^2}{(4k)!}\sum\limits_{v=0}^{k-1}\frac{1}{k+v}\enspace$ gives a good approach.

Note: A closed form for such or comparable series is not known to me.

Proof:

$\displaystyle \int_0^1\frac{\log(1-x+x^2)\log(1+x-x^2)}{x}dx=$

$\displaystyle =\int_0^1\lim\limits_{h\to 0}\frac{((1-x+x^2)^h-1)((1+x-x^2)^h-1)}{h^2x}dx$

$\displaystyle =\lim\limits_{h\to 0}\frac{1}{h^2}\int_0^1\frac{((1-x+x^2)^h-1)((1+x-x^2)^h-1)}{x}dx$

$\displaystyle =\lim\limits_{h\to 0}\frac{1}{h^2}\left(\int_0^1\left(\frac{(1-(x-x^2)^2)^h-1}{x}-\frac{(1-x+x^2)^h-1}{x}-\frac{(1-x+x^2)^h-1}{x}\right)dx\right) $

$\displaystyle =\lim\limits_{h\to 0}\frac{1}{h^2}\int_0^1\left(\sum\limits_{k=1}^\infty \binom h k \left(x^{k-1}(-x(1-x)^2)^k -x^{k-1}(-1+x)^k -x^{k-1}(1-x)^k\right) \right) $

$\displaystyle =\lim\limits_{h\to 0}\frac{1}{h^2}\sum\limits_{k=1}^\infty \binom h k \int_0^1\left(x^{k-1}(-x(1-x)^2)^k -x^{k-1}(-1+x)^k -x^{k-1}(1-x)^k\right)dx $

$\displaystyle =\lim\limits_{h\to 0}\frac{1}{h^2}\sum\limits_{k=1}^\infty \binom h k \left((-1)^k\frac{(2k-1)!(2k)!}{(4k)!} -(1+(-1)^k)\frac{(k-1)!k!}{(2k)!}\right) $

$\displaystyle =-\lim\limits_{h\to 0}\frac{1}{h^2}\sum\limits_{k=1}^\infty \left((-1)^{k-1}\binom h k + 2\binom h {2k}\right) \frac{(2k-1)!(2k)!}{(4k)!}$

$\displaystyle =-\sum\limits_{k=1}^\infty \frac{(2k-1)!(2k)!}{(4k)!}\lim\limits_{h\to 0}\frac{1}{h^2}\left((-1)^{k-1}\binom h k + 2\binom h {2k}\right)$

$\displaystyle =-\sum\limits_{k=1}^\infty \frac{(2k-1)!(2k)!}{(4k)!}\frac{H_{2k-1}-H_{k-1}}{k}= -2\sum\limits_{k=1}^\infty \frac{(2k-1)!^2}{(4k)!}\sum\limits_{v=0}^{k-1}\frac{1}{k+v}$


Additional comment:

$$\int_0^1\frac{\log(1-z(x-x^2))\log(1+z(x-x^2))}{x}dx= -2\sum\limits_{k=1}^\infty z^{2k}\frac{(2k-1)!^2}{(4k)!}\sum\limits_{v=0}^{k-1}\frac{1}{k+v}$$

for $\,z\in\mathbb{C}\,$ and $\,|z|\leq 1\,$ .


Here's how a physicist is dealing with such a problem.

First of all, note the following relation:

$$1-x+x^2=\frac{1+x^3}{1+x}$$ It allows to split the original integral into two integrals:

$$I_1=\int_0^1\frac{\ln(1+x^3)\ln(1+x-x^2)}{x}dx;(1)$$

$$I_2=-\int_0^1\frac{\ln(1+x)\ln(1+x-x^2)}{x}dx;(2)$$

Even these integrals seem not to have easy manageable closed form solutions.

So we get out of the mainstream.

First step is to note that $y=\ln(1+x)$ satisfies the following differential equation: $$(1+x)\frac{d^2y}{dx^2}+\frac{dy}{dx}=0;(3)$$

On the other hand, if we consider the following functional:

$$J[y(x)]=\int_0^1(1+x)\left ({\frac{dy}{dx}} \right )^2dx;(4)$$

then $(3)$ is so called Euler-Lagrange Differential Equation for $(4)$

(See Wikipedia for ex.)

It means that we can use $(4)$ to find an approximate expression for $y=\ln(1+x)$ such that $(1)$ and $(2)$ can be evaluated in closed forms.

As a first approximation we choose a simplest expression:

$$y_1=x\ln(2)+cx(x-1);(5)$$

Next put $(5)$ into $(4)$ to get

$$J(c)=\frac{c^2}{2}+\frac{c\ln(2)}{3}+\frac{3\ln^2(2)}{2};(6)$$

An extremum point of $(6)$ is $c=-\frac{\ln(2)}{3}$

Put this into $(5)$ to get

$$y_1=\frac{\ln(2)}{3}(4-x)x;(7)$$

That's what we have been looking for, an approximation of $y=\ln(1+x)$ in the range $(0,1).$

For $y=\ln(1+x^3)$ we get from $(7)$:

$$y_1=\frac{\ln(2)}{3}(4-x^3)x^3;(8)$$

Now we are able to evaluate $(1)$ and $(2)$ in closed forms, replacing

$y=\ln(1+x^3)$ and $y=\ln(1+x)$ in $(1)$ and $(2)$ with $(8)$ and $(7)$ respectively.

I skip routine calculations and write down only the end result:

$$I=I_1+I_2=-\frac{13\ln(3)}{1080}(60\sqrt{5}\ln\frac{3+\sqrt{5}}{2}-119)=-0.0844...$$

Absolute error from exact value is less than $0.00042$.

Not bad.