28

I encountered a strange integral with a strange result.

$$\int_0^{\frac{\pi}{2}}\log \left( x^2+\log^2(\cos x)\right)dx = \pi \log \left(\log (2) \right)$$

Believe it or not, the result agrees numerically.

How can we prove this result?

Please help me. I feel very curious to know how this can proved.

4 Answers4

9

Performine the change of variables: $z = e^{ix}$, then , $x =\frac{1}{i}\log(z)$. The integral takes the form:

$ I = \Re \int_{|z|=1 \arg(z)=0}^{|z|=1 \arg(z)=\frac{\pi}{2}} \log \big(-(\log(z))^2 +(\log(\frac{z^2+1}{2z}))^2\big ) \frac{dz}{iz} $

The real part is added, since the logarithm of the cosine is singular at $x = \frac{\pi}{2}$ and can pick up an imaginary part. Expressing the difference of squares as a product we obtain:

$ = \Re\int_{|z|=1 \arg(z)=0}^{|z|=1\arg(z)=\frac{\pi}{2}}\big ( (\log(\log(\frac{z^2+1}{2})) + (\log(\log(\frac{z^{-2}+1}{2})) \frac{dz}{iz}$.

The second part of the integral can be brought to the form of the first part by the transformation $z\rightarrow z^{-1}$ , thus

$ I = \Re\int_{|z|=1 \arg(z)=0}^{|z|=1\arg(z)=\pi}\big ( (\log(\log(\frac{z^2+1}{2})) \frac{dz}{iz}$.

The integrand is invariant under the transformation $z\rightarrow -z$, thus: $ I = \Re\frac{1}{2}\oint_{|z|=1 } \big ( (\log(\log(\frac{z^2+1}{2})) \frac{dz}{iz}$.

The numerator has no poles in the unit disc, thus using the residue theorem:

$I = \Re \frac{2\pi i}{2 i}\log(\log(-2)) = \pi \log(\log(2))$.

3

Since the other thread was marked duplicate, I will post my solution here as well.

The integral is: $$2\Re\int_0^{\pi/2} \ln\ln\left(\frac{1+e^{2ix}}{2}\right)\,dx=2\Re\int_0^{\pi/2} \ln\left(\ln\left(1+e^{2ix}\right)-\ln 2\right)\,dx$$ Consider $$f(x)=\ln(\ln(1+x)-\ln2)$$ Around $x=0$, the taylor expansion can be written as: $$f(x)=f(0)+f'(0)x+f''(0)\frac{x^2}{2!}+f'''(0)\frac{x^3}{3!}+....$$ Replace $x$ with $e^{2ix}$. Notice that integrating the powers of $e^{2ix}$ would result in either zero or a purely imaginary number and since the derivatives of $f(x)$ at $0$ are real, we need to consider only the constant term i.e $f(0)$. Since $f(0)=\ln(-\ln 2)=\ln\ln 2+i\pi$, hence, $$2\Re\int_0^{\pi/2} \ln\left(\ln\left(1+e^{2ix}\right)-\ln 2\right)\,dx=2\int_0^{\pi/2} \ln\ln 2\,dx=\boxed{\pi\ln\ln 2}$$

$\blacksquare$

Pranav Arora
  • 11,405
1

This is another answer from antas kaushik to solve this problem. Amazing method using the Feynman trick

0

Feynman’s trick

Using the fact that $$ \int_0^{\frac{\pi}{2}} \ln \left(x^2+\ln ^2(\cos x)\right) d x=I(1) $$ where $$I(a)=\int_0^{\frac{\pi}{2}} \ln \left(x^2+\ln ^2(a\cos x)\right) d x $$ for $0<a<2$, whose derivative w.r.t. $a$ is $$ I^{\prime}(a)=\int_0^{\frac{\pi}{2}} \frac{2 \ln (a \cos x)}{a\left(x^2+\ln ^2(a \cos x)\right)} d x . $$ Replacing $t$ by $-\ln(a\cos x)$ in $$ \int_0^{\infty} e^{-t y} \cos (x y) d y=\frac{t}{x^2+t^2}, $$ we can express the integral $I^{\prime}(a) $ as $$ \begin{aligned}I^{\prime}(a) & =-\frac{2}{a} \int_0^{\frac{\pi}{2}} \int_0^{\infty} e^{y \ln (a \cos x)} \cos (x y) d y d x \\ & =-\frac{2}{a} \int_0^{\infty} \int_0^{\frac{\pi}{2}}(a \cos x)^y \cos (x y) d x d y \\ & =-\frac{2}{a} \int_0^{\infty} a^y \int_0^{\frac{\pi}{2}} \cos ^y x \cos (x y) d x d y \end{aligned} $$ By the post,

$$\int_0^{\frac{\pi}{2}} \cos ^y x \cos (x y) dx=\frac{\pi}{2^{y+1}} $$

we have $$ I^{\prime}(a)=-\frac{2}{a} \int_0^{\infty} \frac{a^y \pi}{2^{y+1}} d y=-\frac{\pi}{a} \int_0^{\infty}\left(\frac{a}{2}\right)^y d y=-\frac{\pi}{a \ln\left(\frac{a}{2}\right)} $$

Integrating back w.r.t $a$ yields $$ \int_0^{\frac{\pi}{2}} \ln \left(x^2+\ln ^2(a\cos x)\right) d x =\pi \ln (\ln 2-\ln a)=\pi \ln \ln \left(\frac{2}{a}\right)+C $$

Now we are going to find the value of the constant $C$ by adding $-\int_0^{\frac{\pi}{2}} \ln \left(\ln ^2 a\right) d x=-\frac{\pi}{2} \ln \left(\ln ^2a \right) $ on both sides.

$$ \int_0^{\frac{\pi}{2}}\ln \left(\frac{x^2+\ln ^2(a \cos x)}{\ln ^2 a}\right) d x=\frac{\pi}{2} \ln \left(\ln^2 \frac{2}{a}\right)-\frac{\pi}{2} \ln \left(\ln ^2 a\right)+C $$

By L’Hospital Rule, we can show that $$ \lim _{a \rightarrow 0} \frac{x^2+\ln ^2(a \cos x)}{\ln ^2 a}=\lim _{a \rightarrow 0}\left(\frac{\ln \frac{2}{a}}{\ln a}\right)^2=1 \Rightarrow C=0 $$

Hence we can conclude that in general, $$\boxed{ \int_0^{\frac{\pi}{2}} \ln \left(x^2+\ln ^2(a\cos x)\right) d x=\pi \ln (\ln \frac 2a)} $$

In particular, $$\boxed{ \int_0^{\frac{\pi}{2}} \ln \left(x^2+\ln ^2(\cos x)\right) d x=I(1)=\pi \ln (\ln 2)} $$

Lai
  • 33,510