# Logarithmic Integral on Stack Exchange - author unknown

#### DreamWeaver

##### Well-known member
Consider the generalized parametric case where $$\displaystyle 0 < z \le 1$$:

$$\displaystyle \mathcal{I}(z)=\int_0^z\frac{\log(1+x)\log(1-x)}{(1+x)}\,dx$$

Substitute $$\displaystyle y=1+x$$ to obtain:

$$\displaystyle \int_1^{1+z}\frac{\log y\log[1-(y-1)]}{y}\,dy=\int_1^{1+z}\frac{\log y\log(2-y)}{y}\,dy=$$

$$\displaystyle \int_1^{1+z}\frac{\log y\log\left[2 \left(1-\frac{y}{2} \right) \right]}{y}\,dy=$$

$$\displaystyle \log 2\, \int_1^{1+z}\frac{\log y}{y}\,dy+\int_1^{1+z}\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy$$

Performing an integration by parts on that first integral gives:

$$\displaystyle \frac{1}{2}\log 2\, (\log y)^2\, \Bigg|_1^{1+z}=\frac{1}{2}\log 2\log^2(1+z)$$

So

$$\displaystyle \mathcal{I}(z)=\frac{1}{2}\log 2\log^2(1+z)+\int_1^{1+z}\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy$$

Next, we split that last integral into two:

$$\displaystyle \int_1^{1+z}\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy= \int_0^{1+z}\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy-\int_0^1\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy$$

For $$\displaystyle 0 < z \le 1$$, Polylogarithms of order $$\displaystyle m \ge 1$$ have the integral representation:

$$\displaystyle \text{Li}_m(z)=\frac{(-1)^{m-1}}{(m-2)!}\int_0^1\frac{(\log x)^{m-2}\log(1-zx)}{x}\,dx$$

Hence

$$\displaystyle \int_0^1\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy=\text{Li}_3\left( \tfrac{1}{2}\right)$$

So

$$\displaystyle \mathcal{I}(z)=\frac{1}{2}\log 2\log^2(1+z)-\text{Li}_3\left( \tfrac{1}{2}\right) +\int_0^{1+z}\frac{\log y\log\left( 1- \frac{y}{2} \right)}{y}\,dy$$

For that final integral, apply the substitution $$\displaystyle y=(1+z)\, x$$ to change it into:

$$\displaystyle \int_0^1\frac{\log[(1+z)\, x]\, \log\left(1-\frac{(1+z)}{2}\, x \right)}{x}\,dx=$$

$$\displaystyle \log(1+z)\, \int_0^1\frac{\log\left(1-\frac{(1+z)}{2}\, x \right)}{x}\,dx+\int_0^1\frac{\log x\, \log\left(1-\frac{(1+z)}{2}\, x \right)}{x}\,dx$$

By the integral representation for arbitrary (non-zero) order Polylogs given above, this equates to:

$$\displaystyle -\log(1+z) \, \text{Li}_2\left(\frac{1+z}{2}\right)+ \text{Li}_3 \left(\frac{1+z}{2}\right)$$

------------------------------

General parametric solution:

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

$$\displaystyle \frac{1}{2}\log 2\log^2(1+z)-\text{Li}_3\left( \tfrac{1}{2}\right) - \log(1+z) \, \text{Li}_2\left(\frac{1+z}{2}\right)+ \text{Li}_3 \left(\frac{1+z}{2}\right)$$

For $$\displaystyle \, \, 0 < z \le 1$$

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
Nice solution . I always consider differentiating the hypergeometric function to be an alternative solution even though not easy .

#### DreamWeaver

##### Well-known member
Nice solution . I always consider differentiating the hypergeometric function to be an alternative solution even though not easy .

Thanks Zaid! It can get a bit - erm - 'hairy' when your dealing with higher order integrals of the type above, but all integrals of the form

$$\displaystyle \int_0^z\frac{\log^m(1+x)\log(1-x)}{(1+x)},dx$$

and

$$\displaystyle \int_0^z\frac{\log^m(1-x)\log(1+x)}{(1-x)},dx$$

can be done in the same way. The closed form involves some pretty annoying (finite!) double sums (possibly a triple sum too)... I'll add this onto the Logarithmic Integrals thread at some point (soon). It's been "in the post" for a while... Last edited:

#### ZaidAlyafey

##### Well-known member
MHB Math Helper
That seems interesting , I'll be waiting to see that .

#### anemone

##### MHB POTW Director
Staff member
Thanks Zaid! It can get a bit - erm - 'hairy' when your dealing with higher order integrals of the type above, but all integrals of the form

$$\displaystyle \int_0^z\frac{\log^m(1+x)\log(1-x)}{(1+x)},dx$$

and

$$\displaystyle \int_0^z\frac{\log^m(1-x)\log(1+x)}{(1-x)},dx$$

can be done in the same way. The closed form involves some pretty annoying (finite!) double sums (possibly a triple sum too)... I'll add this onto the Logarithmic Integrals thread at some point (soon). It's been "in the post" for a while... That seems interesting , I'll be waiting to see that .
Hi DreamWeaver,

I see it now that you have got a fan, congrats! And I envy you! 