# How can I deal with this singularity

I would like to compute numerically the definite integral below using the Simpson rule:

$$\int\limits_0^1 \ln (x) \ln (1-x)\ dx$$

But I have difficulty trying to remove the singularity in this integral.

New contributor
Nweke Kizito is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

If you have a singularity with natural log, then your solution is imaginary. The indefinite integral of $$\ln(x)\ln(x-1)$$ is $$x((\ln(x-1)-1)\ln(x)-\ln(x-1)+2)+\ln(x-1)+ Li_2 (1-x)+C$$Using integral-calculator.com . Li_2 is $$\displaystyle\sum^{\infty}_{k=1} \frac{x^k}{k^2}$$ Now note that the natural log of -1 is $$\pi i$$, so our final answer is $$\pi i -2+\frac{\pi^2}{6}$$ Hope this helps :)