4

I know that

$$\mathcal I = \int\limits_0^{\pi/2}\ln(\cos(x))\,dx = -\frac\pi2 \ln(2)$$

and I am aware of a few different clever ways to demonstrate this result (e.g. MSE 4065767 and MSE 1992462). I would like to know if there's any way to wrap up the method I outline below.

Substituting $t=\tan\left(\frac x2\right)$ yields

$$\mathcal I= 2\int_0^1 \frac{\ln\left(\frac{1-t^2}{1+t^2}\right)}{1+t^2} \, dt = 2 \left(\underbrace{\int_0^1\frac{\ln(1-t^2)}{1+t^2}\,dt}_{\mathcal J^-} - \underbrace{\int_0^1\frac{\ln(1+t^2)}{1+t^2} \, dt}_{\mathcal J^+} \right)$$

Exploiting the series expansion for $\frac1{1+t^2}$, we have

$$\mathcal J^- = \int_0^1 \ln(1-t^2) \sum_{n=0}^\infty (-t^2)^n = \sum_{n=0}^\infty (-1)^n \underbrace{\int_0^1 t^{2n} \ln(1-t^2) \, dt}_{{J_n}^-}$$

and similarly,

$$\mathcal J^+ = \sum_{n=0}^\infty \underbrace{\int_0^1 t^{2n} \ln(1+t^2) \, dt}_{{J_n}^+}$$

I derive the following recurrences for ${J_n}^{\pm}$:

$$\begin{cases}{J_0}^- = 2\ln(2) - 2 \\ {J_n}^- = \frac{2n-1}{(2n+1)^2} - \frac1{2n+1} + \frac{2n-1}{2n+1} {J_{n-1}}^- & \text{for }n\ge1\end{cases}$$

$$\begin{cases}{J_0}^+ = \ln(2) - 2 + \frac\pi2 \\ {J_n}^+ = \frac{2n-1}{(2n+1)^2} - \frac{2\ln(2)-1}{2n+1} - \frac{2n-1}{2n+1}{J_{n-1}}^+ & \text{for }n\ge1\end{cases}$$

where ${J_0}^\pm$ are found by exploiting the series for $\ln(1\pm t)$ and several others derived from the expansion of $\frac1{1-t}$. I managed to solve these for ${J_n}^{\pm}$, so that

$$\mathcal J^- = \frac{(\ln(2)-1)\pi}2 + \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \left(\sum_{i=0}^{n-1} \frac{2i+1}{2i+3} - n\right)$$

$$\mathcal J^+ = \frac{\pi^2-3\pi}8 + \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \sum_{i=0}^{n-1} (-1)^i \frac{2i+1}{2i+3}$$

Barring any mistakes, the remaining sum seems to be

$$2 \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \left(\sum_{i=0}^{n-1} (1-(-1)^i) \frac{2i+1}{2i+3} - n\right) = \frac{3\pi}2\ln(2) - \frac{\pi^2}4 - \frac\pi4$$

but I have no idea where to go with this.

Is there anything I can do to further refine $\mathcal J^- - \mathcal J^+$? I do see a bit of cancellation of terms when $i$ is even, which lets me simplify the inner sum to

$$2\sum_{i=0}^{\left\lfloor\frac{n-1}2\right\rfloor} \frac{4i+1}{4i+3} - n$$

but that doesn't seem helpful.

We do have, with $H_n$ the $n$-th harmonic number,

$$\sum_{i=0}^{n-1} \frac{2i+1}{2i+3} = \sum_{i=0}^{n-1}\left(1 - \frac2{2i+3}\right) = n - 2\left(H_{2n+1} - \frac12 H_n - 1\right)$$

though I'm not so sure I can write its alternating counterpart in $\mathcal J^+$ in a similar way. Then

$$\mathcal J^- = \frac12\ln(2) - \pi - 2 \sum_{n=0}^\infty \frac{(-1)^n H_{2n+1}}{2n+1} + \sum_{n=0}^\infty \frac{(-1)^n H_n}{2n+1} = \frac{2\ln(2)-\pi}4 - G$$

user170231
  • 19,334
  • I want to use Catalan’s constant in my answer, are you fine with this? – phi-rate Mar 24 '22 at 01:59
  • I have simple solution to the integral but its a different method than yours .Would it be helpful if I post that as an answer? EDIT :While looking through related questions I found the exact method I was thinking about here:https://math.stackexchange.com/questions/2675389/find-integral-of-composition-of-functions?noredirect=1 –  Mar 24 '22 at 03:14
  • @ϕ-rate If it's a continuation of my process, by all means! If not, I'd still be interested to take a look. – user170231 Mar 24 '22 at 17:22

3 Answers3

2

If you want a tedious path

Rewriting $$2 \frac{\log\left(\frac{1-t^2}{1+t^2}\right)}{1+t^2}=i \left(\frac{1}{t+i}-\frac{1}{t-i}\right)\Big[\log(1-t)+\log(1+t)-\log(t+i)-\log(t-i) \Big]$$ we face a bunch of integrals looking like $$\int \frac {\log (t+a)}{t+b}\,dt=\text{Li}_2\left(\frac{a+t}{a-b}\right)+\log (a+t) \log \left(\frac{b+t}{b-a}\right)$$ but I am not sure that you would see $C$ anywhere.

1

With $x\to (1-x)/(1+x)$, $$\int_0^1 \frac{\ln\left(\frac{1-x^2}{1+x^2}\right)}{1+x^2} dx=\int_0^1 \frac{\ln\left(\frac{2x}{1+x^2}\right)}{1+x^2}dx$$

$$=\int_0^1\frac{\ln(2)}{1+x^2}dx+\int_0^1\frac{\ln(x)}{1+x^2}dx-\int_0^1\frac{\ln(1+x^2)}{1+x^2}dx$$ $$=\frac{\pi}{4}\ln(2)-G+\sum_{n=0}^\infty\frac{(-1)^nH_n}{2n+1}.\tag{1}$$

To get this sum, multiply both sides of

$$\int_0^1\frac{x^{2n}}{1+x}dx=\ln(2)+\frac1{2n+1}+H_n-H_{2n+1},$$

by $\frac{(-1)^n}{2n+1}$ then consider the summation over $n\ge 0$,

$$\underbrace{\sum_{n=0}^\infty\frac{\ln(2)(-1)^n}{2n+1}}_{\frac{\pi}{4}\ln(2)}+\underbrace{\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^2}}_{G}+\sum_{n=0}^\infty\frac{(-1)^nH_n}{2n+1}-\sum_{n=0}^\infty\frac{(-1)^nH_{2n+1}}{2n+1}$$ $$=\int_0^1\frac{1}{1+x}\sum_{n=0}^\infty \frac{(-x^2)^n}{2n+1}dx=\int_0^1\frac{\arctan x}{x(1+x)}dx$$ Since

$$\sum_{n=0}^\infty\frac{(-1)^nH_{2n+1}}{2n+1}=-\int_0^\infty (-1)^n \int_0^1 x^{2n}\ln(1-x)dx$$ $$=- \int_0^1 \ln(1-x)\sum_{n=0}^\infty (-x^2)^n dx=-\int_0^1\frac{\ln(1-x)}{1+x^2}dx=\int_0^1\frac{\arctan x}{x(1+x)}dx,$$

where the last equality was proved by @Sangchul Lee here, we have

$$\sum_{n=0}^\infty\frac{(-1)^n H_n}{2n+1}=-\frac{\pi}{4}\ln(2)-G+2\int_0^1\frac{\arctan x}{x(1+x)}dx$$

$$=-\frac{\pi}{4}\ln(2)-G+2\underbrace{\int_0^1\frac{\arctan x}{x}dx}_{G}-2\int_0^1\frac{\arctan x}{1+x}dx$$

$$=-\frac{\pi}{4}\ln(2)+G-2\int_0^1\frac{\arctan x}{1+x}dx$$

where

$$\int_0^1\frac{\arctan x}{1+x}dx\overset{x\to (1-x)/(1+x)}{=}\int_0^1\frac{\pi/4-\arctan x}{1+x}dx$$ $$\Longrightarrow\int_0^1\frac{\arctan x}{1+x}dx=\frac{\pi}{8}\ln(2).$$

Therefore

$$\sum_{n=0}^\infty \frac{(-1)^n H_n}{2n+1}=G-\frac{\pi}{2}\ln(2).$$

Plug this result in $(1)$, we have $$\int_0^1 \frac{\ln\left(\frac{1-x^2}{1+x^2}\right)}{1+x^2} dx=-\frac{\pi}{4}\ln(2)\Longrightarrow \int\limits_0^{\pi/2}\ln(\cos(x))dx = -\frac\pi2 \ln(2).$$

Ali Shadhar
  • 25,498
0

I think that above methods are quite complicated so I can give you an easy perspective..

$$I = \int\limits_0^{\pi/2}\ln(\cos(x))\,dx = -\frac\pi2 \ln(2)$$

Proof: Given $I = \int\limits_0^{\pi/2}\ln(\cos(x))\,dx$

or, $I = \int\limits_0^{\pi/2}\ln(\sin(x))\,dx$ *[King's Property]

or, $2I = \int\limits_0^{\pi/2}\ln(\sin(x)cos(x))\,dx$

or, $2I = \int\limits_0^{\pi/2}\ln(\sin(2x))\,dx-\int\limits_0^{\pi/2}\ln(2)\,dx$... (1)

Take $P=\int\limits_0^{\pi/2}\ln(\sin(2x))\,dx$

• Let $2x=p$ ,then $2dx=dp $

Then $P=\int\limits_0^{\pi}{(\ln(\sin(p)})/2)\,dp$

$P=2\int\limits_0^{\pi/2}{(\ln(\sin(p)})/2)\,dp$ [As $\sin(π-p)=sin(p) $]

Thus we can conclude, $P=I$.

Then Equation (1) reduces to --->

$2I = P-\int\limits_0^{\pi/2}\ln(2)\,dx$

or, $2I = I-\int\limits_0^{\pi/2}\ln(2)\,dx$

or, $I= -\frac\pi2 \ln(2)$

  • Well,actually I had planned to write this very answer but this was already answered in a link I provided in the comments. –  Mar 24 '22 at 17:40
  • 1
    @user331155: The equation $2I=I-\int_0^{\pi/2}\ln(2),\mathrm dx$ is also satisfied for $I=\pm\infty$. How do you know that the integral under consideration is convergent? – Marian G. Mar 24 '22 at 18:55