1. another challenging integral

Most of us know that $\int^{\pi/2}_{0} \ln (\sin x) \ dx = \int^{\pi/2}_{0} \ln (\cos x) \ dx = - \frac{\pi}{2} \ln 2$

But what about $\int^{\pi/2}_{0} \ln (\sin x) \ln (\cos x) \ dx$?

The worked solution I've seen is quite confusing.

2. by parts integration

Originally Posted by Random Variable
Most of us know that $\int^{\pi/2}_{0} \ln (\sin x) \ dx = \int^{\pi/2}_{0} \ln (\cos x) \ dx = - \frac{\pi}{2} \ln 2$

But what about $\int^{\pi/2}_{0} \ln (\sin x) \ln (\cos x) \ dx$?

The worked solution I've seen is quite confusing.
we gonna integrate the given expression by parts once taking u=ln(sinx),v=ln(cosx) and once u=ln(cosx),v=ln(sinx). for both times we will get "a undefined part" which we will eleminate from the 2 obtained equations and get a defined answer!Easy!!

3. Originally Posted by Pulock2009
we gonna integrate the given expression by parts once taking u=ln(sinx),v=ln(cosx) and once u=ln(cosx),v=ln(sinx). for both times we will get "a undefined part" which we will eleminate from the 2 obtained equations and get a defined answer!Easy!!
Do you mean $u = \ln(\cos x)$ and $dv= \ln( \sin x) dx$? But how can you even do that when $v$ doesn't have an elementary antiderivative?

4. Opinion

I convert this integral to another (unknown) one , not sure if it is useful .

I consider the integral

$\int_0^{\frac{\pi}{2}} \ln(\sin(x))^2~dx$

$= \int_0^{\frac{\pi}{2}} \ln(\sin(2x))^2 ~dx$

$= \int_0^{\frac{\pi}{2}} [ \ln2 + \ln(\sin(x)) + \ln(\cos(x)) ]^2 ~dx$

Since $\int_0^{\frac{\pi}{2}}\ln(\sin(x))^2~dx = \int_0^{\frac{\pi}{2}}\ln(\cos(x))^2~dx$ and

$\int_0^{\frac{\pi}{2}}\ln(\sin(x))~dx = \int_0^{\frac{\pi}{2}}\ln(\cos(x))~dx$

I find that $\int_0^{\frac{\pi}{2}}\ln(\sin(x))\ln(\cos(x))~dx = \frac{3\pi}{4}\ln^2(2) - \frac{1}{2} \int_0^{\frac{\pi}{2}} \ln(\sin(x))^2~dx$

It is still an unknown integral but I can represent it by infinite series .

I am curious if this integral can be expressed by $\pi , \ln 2$ somthing ...

5. You end up finding the value of both integrals.

Let $I = \int^{\pi/2}_{0} \Big(\ln (\sin x)\Big)^{2} \ dx$

and $J = \int^{\pi/2}_{0} \ln (\sin x) \ln (\cos x) \ dx$

You should find that $2I+2J = I + \frac{3 \pi}{2} (\ln 2)^{2}$

and $2I-2J = \frac{\pi^{3}}{8}$ (I'm a bit confused by this part.)

and then just solve simultaneously for $I$ and $J$

6. I got it !

I first introduce two lemmas :

$\sum_{k=0}^{\infty} \frac{(-1)^k}{(2k+1)^3} = \frac{\pi^3}{32}$

$\int_0^1 x^{r}(\ln x)^n ~dx = \frac{ (-1)^n n! }{ (r+1)^{n+1} }$

The proofs are left to you , they should be easy . Note that the first one might be proved using Fourier Analysis, I think .

$J = \int^{\pi/2}_{0} \ln (\sin x) \ln (\cos x) \ dx$

Use $4xy = (x+y)^2 - (x-y)^2$

$J = \frac{1}{4} \int^{\pi/2}_{0}[ \ln(\sin x \cos x)^2 - \ln(\tan x)^2 ]~dx$

$= \frac{1}{4} \int^{\pi/2}_{0}[ ( \ln(\sin 2x) - \ln 2 )^2 - \ln(\tan x)^2 ]~dx$

For single-valued function $f(x)$ , we have $\int_0^{\pi/2} f(\sin 2x)~dx = \int_0^{\pi/2} f(\sin x)~dx$

So we have ,

$J = \frac{1}{4} \int^{\pi/2}_{0}[ ( \ln(\sin x) - \ln2 )^2 - \ln(\tan x)^2 ]~dx$

$4J = \int^{\pi/2}_{0}( \ln(\sin x) - \ln2 )^2 ~dx - \int^{\pi/2}_{0} \ln(\tan x)^2 ~dx$

Sub $\tan x = t$ for the second integral ,

$4J = I + \frac{3\pi (\ln2)^2}{8} - \int_0^{\infty}\frac{(\ln x)^2}{ 1 + x^2}~dx$

Consider the integral $\int_0^{\infty}\frac{(\ln x)^2}{ 1 + x^2}~dx$

$= \left( \int_0^1 + \int_1^{\infty} \right) \frac{(\ln x)^2}{ 1 + x^2}~dx$

Sub. $x = 1/t$ in the second one , we can see that the integral equals to :

$2\int_0^1 \frac{(\ln x)^2}{ 1 + x^2}~dx$

$= 2 \sum_{k=0}^{\infty} \int_0^1 (-1)^k x^{2k} (\ln x)^2~dx$

$= 2 \sum_{k=0}^{\infty} \frac{ (-1)^k 2}{ (2k+1)^3} = \frac{\pi^3}{8}$

Also from my previous post , we obtain ( use your symbols )

$2J + I = \frac{3\pi (\ln2)^2}{2}$

$4J = I +\frac{3\pi (\ln2)^2}{2} - \frac{\pi^3}{8}$

Summation gives

$6J = 3\pi(\ln2)^2 - \frac{\pi^3}{8}$

$J = \frac{\pi(\ln2)^2}{2} - \frac{\pi^3}{48}$

We also obtain a by-product $I = \frac{\pi(\ln 2)^2}{2} + \frac{\pi^3}{24}$

Just after the last line , I thought can we generalize the integral , power up to n ? I really want to go through it but i won't have much time since i am busy on my school examination .

7. Thanks. They just stated that $2 \int_0^{1}\frac{(\ln x)^2}{ 1 + x^2}~dx = \frac{\pi^{3}}{8}$ without any explanation. The overall proof that they give is slightly different than yours, but not different enough to state it here.

Anyways, you can prove
$\int_0^1 x^{r}(\ln x)^n ~dx = \frac{ (-1)^n n! }{ (r+1)^{n+1} }$ by doing the following:

$\int_{0}^{1} x^{r} (\ln x)^{n} \ dx = -\int_{\infty}^{0} e^{-tr}(-t)^{n}e^{-t} \ dt$ (let $t = -\ln(x)$ )

$= (-1)^{n} \int_{0}^{\infty} e^{-t(r+1)}t^{n} \ dt =(-1)^{n} \frac{1}{r+1} \frac{1}{(r+1)^{n}}\int_{0}^{\infty} e^{-u} u^{n} \ du =$ ( let $u = t(r+1)$ )

$= \frac{(-1)^{n}}{(r+1)^{n+1}} \Gamma(n+1) = \frac{(-1)^{n}n!}{(r+1)^{n+1}}$

8. I can't think of the the appropriate Fourier series for the first lemma.

9. I found a proof, but it's a bit convoluted.

The Fourier series of $|x|$ on $(-\pi, \pi]$ is $|x| = \frac{\pi}{2} - \frac{4}{\pi} \sum_{n=0}^{\infty} \frac{\cos (2n+1)x}{(2n+1)^{2}}$

now integrate both sides from 0 to x

$\frac{x^{2}}{2} = \frac{\pi}{2} x - \frac{4}{\pi} \sum_{n=0}^{\infty} \frac{\sin (2n+1)x}{(2n+1)^{3}}$

so $\sum_{n=0}^{\infty} \frac{\sin (2n+1)x}{(2n+1)^{3}} = \frac{\pi x}{8}(\pi-x)$

now let $x = \frac{\pi}{2}$

then $\sum_{n=0}^{\infty} \frac{\sin (2n+1) \frac{\pi}{2} }{(2n+1)^{3}} = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^{3}} = \frac{\pi^{3}}{32}$

10. Originally Posted by Random Variable
I found a proof, but it's a bit convoluted.

The Fourier series of $|x|$ on $(-\pi, \pi]$ is $|x| = \frac{\pi}{2} - \frac{4}{\pi} \sum_{n=0}^{\infty} \frac{\cos (2n+1)x}{(2n+1)^{2}}$

now integrate both sides from 0 to x

$\frac{x^{2}}{2} = \frac{\pi}{2} x - \frac{4}{\pi} \sum_{n=0}^{\infty} \frac{\sin (2n+1)x}{(2n+1)^{3}}$

so $\sum_{n=0}^{\infty} \frac{\sin (2n+1)x}{(2n+1)^{3}} = \frac{\pi x}{8}(\pi-x)$

now let $x = \frac{\pi}{2}$

then $\sum_{n=0}^{\infty} \frac{\sin (2n+1) \frac{\pi}{2} }{(2n+1)^{3}} = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2n+1)^{3}} = \frac{\pi^{3}}{32}$

The proof by expanding Fourier series I think is too general and a bit boring , also hard to memorize . I know Euler gave a general but not boring method to solve this kind of series but i forgot it ( it is hard to memorize too ) . Once i find out the method , i post it here immediately , i think we may find it inspiring .

11. If you're still looking for $\int^{\pi/2}_{0} \Big(\ln (\sin x)\Big)^{n} \ dx$ , Maple gives the following results:

$I(3) = \int^{\pi/2}_{0} \Big(\ln (\sin x)\Big)^{3} \ dx = - \frac{3 \pi}{4} \zeta (3) - \frac{\pi^{3}}{8} \ln 2 - \frac{\pi}{2} (\ln 2)^{3}$

$I(4) = \int^{\pi/2}_{0} \Big(\ln (\sin x)\Big)^{4} \ dx = 3 \pi \ln 2 \zeta (3) + \frac{\pi}{2} (\ln 2)^{4} + \frac{\pi^{3}}{4} (\ln 2)^{2} + \frac{19 \pi^{5}}{480}$