# How to compute the integral $I\left(c\right)=\int_{0}^{1}{\frac{\ln(1-cx)}{1+x}dx}$

I am currently working on this question and the following integral came up: $$I\left(c\right)=\int_{0}^{1}{\frac{\ln(1-cx)}{1+x}dx}$$ for a suitable c. I would like to compute it in terms of $\operatorname{Li}_2$. I tried to expand the logarithm, but things got a bit tedious. So any help is highly appreciated.

We have: $$I'(c) = \int_{0}^{1}\frac{x\,dx}{(1+x)(c x-1)}=\frac{\log 2}{1+c}+\frac{\log(1-c)}{c+c^2}$$ and since $I(0)=0$, it follows that: $$I(c) = \log(2) \log(1+c)+\int_{0}^{c}\frac{\log(1-x)}{x}\,dx-\int_{0}^{c}\frac{\log(1-x)}{1+x}\,dx$$ so:

$$I(c) = \text{Li}_2\left(\frac{1+c}{2}\right)-\text{Li}_2(c)+\text{Li}_{2}\left(\frac{1}{2}\right)$$ where $\text{Li}_2\left(\frac{1}{2}\right)=\frac{\pi^2}{12}-\frac{1}{2}\log^2 2$.

That is straightforward to check through differentiation, too.

• Of course, differentiation under the integral sign! I should have seen it, thanks! But shouldnt it be $\int_0^c \frac{\ln(1-x)}{1+x} dx$? – Redundant Aunt Jun 24 '15 at 11:22
• @user109899: right, now fixed. – Jack D'Aurizio Jun 24 '15 at 11:33
• I think something went still wrong; I applied the same techniques and I got $I(c)=Li_2\left(\frac{1+c}{2}\right)-Li_2(c)-Li_2(0.5)$ which seems to be numerically right. – Redundant Aunt Jun 24 '15 at 12:05
• @user109899: yes you are right, I used the dilogarithm functional identities to simplify my previous expression, and it turns out to be equivalent to your form, that clearly holds by differentiation. – Jack D'Aurizio Jun 24 '15 at 12:24

I would like to offer a generalization to this problem, which turns out to be a useful lemma in more difficult logarithmic integral problems.

For $-1<a\land-1\le b$, we define the two-variable function $D:(-1,\infty)\times[-1,\infty)\to\mathbb{R}$ via the integral representation

$$D{\left(a,b\right)}:=\int_{0}^{1}\frac{\ln{\left(1+bx\right)}}{1+ax}\,\mathrm{d}x.$$

Note that this is the largest possible domain for which the function $D{\left(a,b\right)}$ may be considered a real function of real variables. We have the following result:

Result: For $-1<a\land-1\le b$, $D{\left(a,b\right)}$ may be expressed in terms of dilogarithms as follows: $$a\,D{\left(a,b\right)}=\operatorname{Li}_{2}{\left(\frac{a-b}{1+a}\right)}-\operatorname{Li}_{2}{\left(\frac{a}{1+a}\right)}-\operatorname{Li}_{2}{\left(-b\right)}.$$

Proof:

First we work out a few special cases.

Setting $b=0$, we simply have

\begin{align} D{\left(a,0\right)} &=\int_{0}^{1}\frac{\ln{\left(1\right)}}{1+ax}\,\mathrm{d}x\\ &=0.\\ \end{align}

Setting $a=0\land b=-1$,

\begin{align} D{\left(0,-1\right)} &=\int_{0}^{1}\ln{\left(1-x\right)}\,\mathrm{d}x\\ &=\int_{0}^{1}\ln{\left(y\right)}\,\mathrm{d}y;~~~\small{\left[1-x=y\right]}\\ &=-\int_{0}^{1}\mathrm{d}y\\ &=-1.\\ \end{align}

Assuming $a=0\land-1<b\neq0$,

\begin{align} D{\left(0,b\right)} &=\int_{0}^{1}\ln{\left(1+bx\right)}\,\mathrm{d}x\\ &=\ln{\left(1+b\right)}-\int_{0}^{1}\frac{bx}{1+bx}\,\mathrm{d}x\\ &=\ln{\left(1+b\right)}-\int_{0}^{1}\left[1-\frac{1}{1+bx}\right]\,\mathrm{d}x\\ &=\ln{\left(1+b\right)}-\int_{0}^{1}\mathrm{d}x+\int_{0}^{1}\frac{\mathrm{d}x}{1+bx}\\ &=\ln{\left(1+b\right)}-1+\frac{1}{b}\int_{0}^{1}\frac{b\,\mathrm{d}x}{1+bx}\\ &=\ln{\left(1+b\right)}-1+\frac{\ln{\left(1+b\right)}}{b}\\ &=\frac{1+b}{b}\ln{\left(1+b\right)}-1.\\ \end{align}

Now for the main case. Assuming $-1<a\neq0\land-1\le b\neq0$,

\begin{align} D{\left(a,b\right)} &=\int_{0}^{1}\frac{\ln{\left(1+bx\right)}}{1+ax}\,\mathrm{d}x\\ &=\int_{0}^{1}\mathrm{d}x\,\frac{1}{1+ax}\int_{0}^{1}\mathrm{d}y\,\frac{bx}{1+bxy}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{1}\mathrm{d}x\,\frac{bx}{\left(1+ax\right)\left(1+byx\right)}\\ &=\int_{0}^{1}\mathrm{d}y\int_{0}^{1}\mathrm{d}x\,\frac{b}{a-by}\left(\frac{1}{1+byx}-\frac{1}{1+ax}\right)\\ &=\small{\int_{0}^{1}\mathrm{d}y\,\frac{b}{a-by}\left(\frac{1}{by}\int_{0}^{1}\mathrm{d}x\,\frac{by}{1+byx}-\frac{1}{a}\int_{0}^{1}\mathrm{d}x\,\frac{a}{1+ax}\right)}\\ &=\int_{0}^{1}\mathrm{d}y\,\frac{b}{a-by}\left(\frac{\ln{\left(1+by\right)}}{by}-\frac{\ln{\left(1+a\right)}}{a}\right)\\ &=\int_{0}^{1}\mathrm{d}y\,\left[\frac{\ln{\left(1+by\right)}}{y\left(a-by\right)}-\frac{b\ln{\left(1+a\right)}}{a\left(a-by\right)}\right]\\ &=\small{\int_{0}^{1}\mathrm{d}y\,\left[\frac{\ln{\left(1+by\right)}}{ay}+\frac{b\ln{\left(1+by\right)}}{a\left(a-by\right)}-\frac{b\ln{\left(1+a\right)}}{a\left(a-by\right)}\right]}\\ &=\small{\frac{1}{a}\int_{0}^{1}\frac{\ln{\left(1+by\right)}}{y}\,\mathrm{d}y+\frac{b}{a}\int_{0}^{1}\frac{\ln{\left(1+by\right)}-\ln{\left(1+a\right)}}{a-by}\,\mathrm{d}y}\\ &=-\frac{\operatorname{Li}_{2}{\left(-b\right)}}{a}+\frac{b}{a}\int_{0}^{1}\frac{\ln{\left(\frac{1+by}{1+a}\right)}}{a-by}\,\mathrm{d}y\\ &=-\frac{\operatorname{Li}_{2}{\left(-b\right)}}{a}+\frac{1}{a}\int_{\frac{1}{1+a}}^{\frac{1+b}{1+a}}\frac{\ln{\left(z\right)}}{1-z}\,\mathrm{d}z;~~~\small{\left[\frac{1+by}{1+a}=z\right]}\\ &=-\frac{\operatorname{Li}_{2}{\left(-b\right)}}{a}+\frac{1}{a}\int_{\frac{a}{1+a}}^{\frac{a-b}{1+a}}\frac{(-1)\ln{\left(1-t\right)}}{t}\,\mathrm{d}t;~~~\small{\left[1-z=t\right]}\\ &=-\frac{\operatorname{Li}_{2}{\left(-b\right)}}{a}+\frac{\operatorname{Li}_{2}{\left(\frac{a-b}{1+a}\right)}-\operatorname{Li}_{2}{\left(\frac{a}{1+a}\right)}}{a}\\ &=\frac{\operatorname{Li}_{2}{\left(\frac{a-b}{1+a}\right)}-\operatorname{Li}_{2}{\left(\frac{a}{1+a}\right)}-\operatorname{Li}_{2}{\left(-b\right)}}{a}.\blacksquare\\ \end{align}
