5

After finding that $\displaystyle \int_{0}^{\frac{\pi}{2}} \ln (\tan x) d x =0$ in my post, I was curious about the value of the integral with different upper limit $\dfrac{\pi}{4} $.
The answer is surprisingly simple and elegant i.e.

$$ \int_{0}^{\frac{\pi}{4}} \ln (\tan x) d x=-G \text {, } $$

where $G$ is the Catalan’s constant.

We first let $y=\tan x$, then $d y=\sec ^{2} x d x=\left(1+y^{2}\right) d x$ and $I$ is converted to $$ I=\int_{0}^{1} \frac{\ln y}{1+y^{2}} d y. $$

Applying a power series yields $$ \begin{aligned} I &=\sum_{n=0}^{\infty}(-1)^{n} \int_{0}^{1} y^{2 n} \ln y d y \\ &=\sum_{n=0}^{\infty} \frac{(-1)^{n}}{2 n+1} \int_{0}^{1} \ln y d\left(y^{2 n+1}\right) \\ &\left.=\sum_{n=0}^{\infty} \frac{(-1)^{n}}{2 n+1}\left(\left[y^{2 n+1} \ln y\right]_{0}^{1}-\int_{0}^{1} y^{2 n+1} \cdot \frac{1}{y} d y\right)\right) \\ &=\sum_{n=0}^{\infty} \frac{(-1)^{n}}{2 n+1}\left(-\int_{0}^{1} y^{2 n} d y\right) \\ &=-\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2 n+1)^{2}} \\ &=-G. \end{aligned} $$ where $G$ is the Catalan’s constant.

For the second integral in the question, we use the identity $$ \ln (\sin x)=\ln (\tan x)+\ln (\cos x), $$

we have $$\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x=\int_{0}^{\frac{\pi}{4}} \ln (\tan x) d x+ +\int_{0}^{\frac{\pi}{4}} \ln (\cos x) d x$$

By my post in Quora, $$\int_{0}^{\frac{\pi}{4}} \ln (\cos x) d x=\frac{G}{2}-\frac{\pi}{4} \ln 2.$$

Now we conclude that $$ \int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x=-G+\left(\frac{G}{2}-\frac{\pi}{4} \ln 2\right)=-\frac{G}{2}-\frac{\pi}{4} \ln 2 $$

:|D Wish you enjoy the solution!

Is there any other simpler method to deal with the integral?

Gary
  • 37,398
Lai
  • 33,510

4 Answers4

4

My solution is without using Fourier series

Let, $$A=\underbrace{\int_0^{\frac{\pi}{2}}\ln(\sin(x))\,dx}_{x \to \frac{\pi}{2}-x}=\int_0^{\frac{\pi}{2}}\ln(\cos(x))\,dx$$ Adding both representations of the same integral, we get: $$2A=\int_0^{\frac{\pi}{2}}\ln(\sin(x))\,dx+\int_0^{\frac{\pi}{2}}\ln(\cos(x))\,dx$$ $$\Rightarrow 2A=\int_0^{\frac{\pi}{2}}\ln(\sin(x))+\ln(cos(x))\,dx$$ $$\Rightarrow 2A=\int_0^{\frac{\pi}{2}}\ln(2\sin(x)\cos(x))-\ln(2)\,dx$$ $$\Rightarrow 2A=\underbrace{\int_0^{\frac{\pi}{2}}\ln(\sin(2x))\,dx}_{2x \to x}-\frac{\pi}{2}\ln(2)$$ $$\Rightarrow 2A=\frac{1}{2}\int_0^{\pi}\ln(\sin(x))\,dx-\frac{\pi}{2}\ln(2)$$ Using symmetry $$\Rightarrow 2A=\underbrace{\int_0^{\frac{\pi}{2}}\ln(\sin(x))\,dx}_A-\frac{\pi}{2}\ln(2)$$ $$\Rightarrow 2A=A-\frac{\pi}{2}\ln(2)$$ $$\Rightarrow A=-\frac{\pi}{2}\ln(2)$$ $$\boxed{\int_0^{\frac{\pi}{2}}\ln(\sin(x))\,dx=-\frac{\pi}{2}\ln(2)}$$ Now, in this integral let $x \to 2x$ $$2\int_0^{\frac{\pi}{4}}\ln(\sin(2x))\,dx=-\frac{\pi}{2}\ln(2)$$ Or $$\int_0^{\frac{\pi}{4}}\ln(\sin(2x))\,dx=-\frac{\pi}{4}\ln(2)$$ $$\int_0^{\frac{\pi}{4}}\ln(2)\,dx+\int_0^{\frac{\pi}{4}}\ln(\sin(x))\,dx+\int_0^{\frac{\pi}{4}}\ln(\cos(x))\,dx=-\frac{\pi}{4}\ln(2)$$ $$\frac{\pi}{4}\ln(2)+\int_0^{\frac{\pi}{4}}\ln(\sin(x))\,dx+\int_0^{\frac{\pi}{4}}\ln(\cos(x))\,dx=-\frac{\pi}{4}\ln(2)$$ $$\boxed{\int_0^{\frac{\pi}{4}}\ln(\sin(x))\,dx+\int_0^{\frac{\pi}{4}}\ln(\cos(x))\,dx=-\frac{\pi}{2}\ln(2)}\quad (1)$$

Now, $$\underbrace{\int_0^{\frac{\pi}{4}}\ln(\tan(x))\,dx}_{\tan(x) \to x}$$ $$=\int_0^{1}\frac{\ln(x)}{1+x^2}\,dx$$ $$=\int_{0}^{1}\ln(x)\left(\sum_{n=0}^{\infty}x^{2n}\right)\,dx$$ $$=\sum_{n=0}^{\infty}\left(\int_{0}^{1}x^{2n}\ln(x)\,dx\right)$$ Applying Integration by Parts 2 times in the inner integral, we have - $$=-\sum_{n=0}^{\infty}\frac{1}{(2n+1)^2}=-G$$ $$\int_0^{\frac{\pi}{4}}\ln(\tan(x))\,dx=-G$$

$$\boxed{\int_0^{\frac{\pi}{4}}\ln(\sin(x))\,dx-\int_0^{\frac{\pi}{4}}\ln(\cos(x))\,dx=-G}\quad (2)$$

By equations (1) and (2), we have the values - $$\boxed{\int_0^{\frac{\pi}{4}}\ln(\sin(x))\,dx-=-\frac{\pi}{4}\ln(2)-\frac{G}{2}}$$ And, $$\boxed{\int_0^{\frac{\pi}{4}}\ln(\cos(x))\,dx-=-\frac{\pi}{4}\ln(2)+\frac{G}{2}}$$

3

We can also find the integrals using the Fourier series of $\ln (\sin x)$ on $(0, \pi)$, $$ \ln (\sin x)=-\ln 2-\sum_{n=1}^{\infty} \frac{1}{n} \cos (2 n x) \quad \forall x \in(0, \pi). $$

Integrating both sides from $0$ to $\dfrac{\pi}{4} $ yields

$$ \begin{aligned} \int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x &=-\int_{0}^{\frac{\pi}{4}} \ln 2 d x-\sum_{x=1}^{\infty} \frac{1}{n} \int_{0}^{\frac{\pi}{4}} \cos (2 n x) d x \\ &=-\frac{\pi}{4} \ln 2-\sum_{n=1}^{\infty} \frac{1}{n}\left[\frac{\sin 2 n x}{2 n}\right]_{0}^{\frac{\pi}{4}} \\ &=-\frac{\pi}{4} \ln 2-\frac{1}{2} \sum_{n=1}^{\infty} \frac{1}{n^{2}} \sin \left(\frac{n \pi}{2}\right) \\ &=-\frac{\pi}{4} \ln 2-\frac{1}{2} \sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2 n+1)^{2}} \\ &=-\frac{\pi}{4} \ln 2-\frac{1}{2} G \end{aligned} $$

Similarly, using the result in my post in Quora, $$ \begin{aligned} \int_{0}^{\frac{\pi}{4}} \ln (\tan x) d x &=\int_{0}^{\frac{\pi}{4}} \ln (\sin x) d x-\int_{0}^{\frac{\pi}{4}} \ln (\cos x) d x \\ &=\left(-\frac{\pi}{4} \ln 2-\frac{1}{2} G\right)-\left(\frac{G}{2}-\frac{\pi}{4} \ln 2\right) \\ &=-G \end{aligned} $$

ACB
  • 3,968
Lai
  • 33,510
1

$$ \begin{aligned} \text {Let } \quad y=&\ln (\tan x) \text {, then }\quad e^{y}=\tan x \\ \quad e^{y} d y=&\sec ^{2} x d x=\left(1+e^{2 y}\right) d x \\ I=&\int_{-\infty}^{0} \frac{ye^y}{1+e^{2y}} d y \\ =&\int_{-\infty}^{0} y e^{y} \sum_{n=0}^{\infty}(-1)^{n} e^{2 n y} d y \textrm{ via power series}\\ =&\sum_{n=0}^{\infty}(-1)^{n} \int_{-\infty}^{0} y e^{(2 n+1) y} d y \\ =&\sum_{n=0}^{\infty}(-1)^{n} \int_{-\infty}^{0} y d\left(\frac{e^{(2 n+1) y}}{2 n+1}\right) \\ =&\sum_{n=0}^{\infty}(-1)^{n}\left[\left[\frac{y e^{(2 n+1) y}}{2 n+1}\right]_{-\infty}^{0}-\int_{-\infty}^{0} \frac{e^{(2 n+1) y}}{2 n+1} d y\right. \\ =&-\sum_{n=0}^{\infty}(-1)^{n}\left[\frac{e^{(2 n+1) y}}{(2 n+1)^{2}}\right]_{-\infty}^{0} \\ =&-\sum_{n=0}^{\infty} \frac{(-1)^{n}}{(2 n+1)^{2}} \\ =&-G \end{aligned} $$

Lai
  • 33,510
0

$$\int_0^{\frac\pi4}\ln\sin\theta d\theta\\= \int_0^{\frac\pi4}\ln\left(\frac{e^{i\theta}-e^{-i\theta}}{2i}\right) d\theta\\ =\int_0^{\frac\pi4}(\ln(1-e^{2i\theta})-i\theta-\ln2-\ln(-i)) d\theta \\ =\frac i2\int_1^i\frac{\ln(1-u)}udu-\frac\pi4\ln2+\frac{3\pi^2}{32}i\\ =\frac i2(\operatorname{Li}_2(i)-\operatorname{Li}_2(1))-\frac\pi4\ln2+\frac{3\pi^2}{32}i $$ in terms of the $\operatorname{Li}$ values $\operatorname{Li}_2(1)=\frac{\pi^2}6$ and $\operatorname{Li}_2(i)=-\frac{\pi^2}{48}+iG$.

Bob Dobbs
  • 16,473