# How to evaluate the following integral $\int_0^{\pi/2}\sin{x}\cos{x}\ln{(\sin{x})}\ln{(\cos{x})}\,dx$?

How to evaluate the following integral $$\int_0^{\pi/2}\sin{x}\cos{x}\ln{(\sin{x})}\ln{(\cos{x})}\,dx$$ It seems that it evaluates to$$\frac{1}{4}-\frac{\pi^2}{48}$$ Is this true? How would I prove it?

• @Integrator I seriously doubt that Mathematica result considering that the integrand is real over the entire interval. The Number Empire definite integrator gave something numerically very close to the expected answer (numberempire.com/…. – Deepak Nov 29 '14 at 9:46
• The result is true but how to prove it, that is the question ! – Claude Leibovici Nov 29 '14 at 9:51
• @Integrator. I suppose that there is a bug if this is the result (as Deepak commented). Using a CAS, I got the result given in the post. – Claude Leibovici Nov 29 '14 at 9:53

### Find this

$$I=\int_{0}^{\frac{\pi}{2}}\sin{x}\cos{x}\ln{(\cos{x})}\ln{(\sin{x})}dx$$

### Solution

Since $$\sin(2x) = 2\sin(x)\cos(x)$$

then $$I=\dfrac{1}{8}\int_{0}^{\frac{\pi}{2}}\ln{(\sin^2{x})} \ln{(\cos^2{x})}\sin{(2x)}dx$$

Let $\cos{(2x)}=y$, and since $$\cos(2x) = 2\cos^2x - 1 = 1 - 2\sin^2x$$ we get $$I=\dfrac{1}{16}\int_{-1}^{1}\ln{\left(\dfrac{1-y}{2}\right)} \ln{\left(\dfrac{1+y}{2}\right)}dy$$

Let $\dfrac{1-y}{2}=z$, then we have \begin{align*}I&=\dfrac{1}{8}\int_{0}^{1}\ln{z}\ln{(1-z)}dz=\dfrac{-1}{8}\sum_{n=1}^{\infty}\dfrac{1}{n} \int_{0}^{1}z^n\ln{z}dz\\ &=\dfrac{1}{8}\sum_{n=1}^{\infty} \dfrac{1}{n(n+1)^2}=\dfrac{1}{8}\sum_{n=1}^{\infty} \left(\dfrac{1}{n}-\dfrac{1}{n+1}\right)-\dfrac{1}{8}\sum_{n=1}^{\infty} \dfrac{1}{(n+1)^2}\\ &=\dfrac{1}{4}-\dfrac{\pi^2}{48} \end{align*}

• Beautiful solution! – Ron Gordon Nov 29 '14 at 11:52
• You get straight to the final form of the integral by setting $z=\sin^2x$. – Yves Daoust Dec 1 '14 at 8:56
• It would be easier to substitute $y = \sin^2 x$ – Dylan Dec 2 '14 at 0:11

Alternatively, using the general trigonometric form of beta function from equation $(14)$ Wolfram MathWorld - Beta Function we have $$\int_0^{\pi/2}\sin^nx\cos^mx\,dx=\frac{1}{2}\text{B}\left(\frac{n+1}{2},\frac{m+1}{2}\right)$$ Differentiating with respect to $m$ and $n$ once, then putting $m=1$ and $n=1$ we directly obtain the desired result \begin{align}\int_0^{\pi/2}\sin{x}\cos{x}\ln{(\sin{x})}\ln{(\cos{x})}\,dx&=\frac{\text{B}\left(1,1\right)}{8}\bigg[\left(\psi_0(1)-\psi_0(2)\right)^2-\psi_1(2)\bigg]\\&=\frac{1}{4}-\frac{\pi^2}{48}\end{align} Here I use equation $(26)$ from Wolfram MathWorld - Beta Function and also equation $(8)$ & equation $(15)$ from Wolfram MathWorld - Polygamma Function.

• Very nice and fast! – Raymond Manzoni Nov 29 '14 at 12:06
• @RaymondManzoni Thanks! I learn from here: math.stackexchange.com/a/1040041/146687 – Venus Nov 29 '14 at 12:09
• in both cases the difficulty was to think at using the Beta function (I didn't...)! Cheers, – Raymond Manzoni Nov 29 '14 at 12:12
• + 1 Very elegant. – nbubis Nov 29 '14 at 16:14
• @nbubis Thank you. I am still learning to do my best around here – Venus Nov 29 '14 at 16:35

Hint:-

$\ln \cos x=z \implies \tan x\ dx=-dz$

$\therefore\displaystyle\int\sin{x}\cos{x}\ln{(\cos{x})}\ln{(\sin{x})}dx\\=\dfrac{1}{2}\displaystyle\int\sin{2x}\ln{(\cos{x})}\ln{(\sin{x})}dx\\=\displaystyle\int\left(\dfrac{\tan x}{\sec^2 x}\right)\ln{(\cos{x})}\ln{(\sin{x})}dx\\=-\displaystyle\int\left(\dfrac{z\ln{(\sqrt{1-e^{2z}})}}{e^{2z}}\right)dz$

$e^{-2z}=t \implies e^{-2z}dz=-\dfrac{1}{2}dt, e^{-2z}=t\implies{z}=-\dfrac{1}{2}\ln t$

$\therefore \dfrac{1}{4}\displaystyle\int{\ln t\ln{\left(e^z\sqrt{t-1}\right)}}dt\\=\dfrac{1}{8}\displaystyle\int{\ln t\ln{(t-1)}}dt+\dfrac{1}{4}\displaystyle\int{(\ln t)^2}dt$

$\displaystyle\int{\ln t\ln{(t-1)}}dt=\ln (t-1)\displaystyle\int\ln t\ dt-\color{green}{\displaystyle\int\left(\dfrac{t\ln t-t}{t-1}\right)\ dt}$

$\color{green}{\therefore\displaystyle\int\left(\dfrac{t\ln t-t}{t-1}\right)\ dt=\displaystyle\int\left(\dfrac{t\ln t-\ln t+\ln t-t}{t-1}\right)\ dt=\displaystyle\int \ln t \ dt+\color{red}{\displaystyle\int\dfrac{\ln t}{t-1}dt}-\displaystyle\int\dfrac{t}{t-1}dt}$

$\color{red}{t-1=y \implies dt = dy\implies\displaystyle\int\dfrac{\ln t}{t-1}dt=\displaystyle\int\dfrac{\ln (y+1)}{y}dy=-\operatorname{Li}_2(-y)+C}$

${\color{blue}{\displaystyle\int{(\ln t)^2}dt=t\left((\ln t)^2 -2\ln t+2\right)+C'}}$

• $\operatorname{Li}_2(x)$ is the polyalgorithm function. – user 170039 Dec 1 '14 at 6:45
• @Integrator: I have incorporated your suggestion in the answer. I haven't used Wolfram Alpha. Thanks for your comment. – user 170039 Dec 1 '14 at 12:03