# Prove $\int_{0}^{\pi/2} \ln \left(x^{2} + (\ln\cos x)^2 \right) \, dx=\pi\ln\ln2$

How to prove $$\int_{0}^{\pi/2}\ln\left(\,x^{2} + \ln^{2}\left(\,\cos\left(\,x\,\right)\,\right) \,\right)\,{\rm d}x\ =\ \pi\ln\left(\,\ln\left(\, 2\,\right)\,\right)$$

I don't know how to answer it.

When I asked this integral to my brother, after less than half hours he said it has a nice closed-form involving $\pi$ and $\ln\left(2\right)$ but, as always, he didn't tell me the closed-form and how to obtain it ( I didn't believe him and I think he tried to mess around with me ).

I have also searched the similar question here but it looks like nothing is similar or related.

Could anyone here please help me to obtain the closed form of the integral preferably with elementary ways ( high school methods )?. Any help would be greatly appreciated. Thank you.

Edit:

He is being a little bit nice to me today, he said the closed form is $\pi\ln\ln2$ and it's numerically correct.

This is not a duplicate problem, I am looking for a proof without using complex analysis.

• I have no idea, but perhaps you can use the identity $\Re(\ln(x+iy))=\dfrac12\ln(x^2+y^2)$ where $x,y\in\mathbb R$. Commented Aug 31, 2014 at 19:51
• The indefinite integral can be written as $$x\log\left(x^2+\log^2\cos x\right) - \int\dfrac{2x\left(x-\tan (x)\log\cos x\right)}{x^2+\log^2\cos x}\,dx$$ Note that if $f(x)$ is the denominator then the numerator is $xf'(x)$ Commented Aug 31, 2014 at 20:10
• This looks simpler $$\int_{0}^{\pi/2} \ln \left(x^{2} + \ln^{2}\cos x \right) \, dx=2 \Re \left[\int_{0}^{\pi/2} \ln \ln \left( \frac{1 + e^{2ix}}{2} \right) \, dx\right]$$ Commented Aug 31, 2014 at 20:16
• @imranfat I got stuck trying to solve for $x$ in $t=x^2+\log^2\cos x$ Commented Aug 31, 2014 at 20:19
• @zibadawatimmy While I don't want to dispute that generally, I have come across integrals that were doable with normal integration but the computersystems couldn't do it. If (and only IF) Darksonn's approach works, that should be the way...That would also explain the double ln in the answer. Commented Aug 31, 2014 at 20:28

Here is a real-analytic method.

We have

$$\int_{0}^{\Large \frac{\pi}{2}} \ln \left(x^{2} + \ln^2\cos x\right) \, {\rm d}x=\pi\ln(\ln2) \tag1$$

Proof. Let $$s$$ be a real number such that $$-1. One may use the following theorem (proved here) $$\int_{0}^{\Large \frac{\pi}{2}} \frac{\cos \left( s \arctan \left(\frac{x}{-\ln \cos x}\right)\right)}{(x^2+\ln^2\! \cos x)^{s/2}} \mathrm{d}x = \frac{\pi}{2}\frac{1}{\ln^{s}\!2}. \tag2$$

We are then allowed to differentiate both sides of $$(2)$$ \begin{align} \partial_s \left. \left( \frac{\cos \left( s \arctan \left(\frac{x}{-\ln \cos x}\right)\right)}{(x^2+\ln^2\! \cos x)^{s/2}}\right) \right|_{s=0} &=-\frac 12 \ln \left(x^{2} + \ln^2\cos x\right) \\\\ \partial_s \left. \left( \frac{\pi}{2}\frac{1}{\ln^{s}\!2}\right) \right|_{s=0} &=-\frac{\pi}{2}\ln(\ln2) \end{align} which gives the result $$(1)$$.

• Wow! Very brilliant! +1 Commented Sep 24, 2014 at 9:17
• This is brilliant. Can you please look at my solution and let me know if it is incorrect? Many thanks! Commented Sep 24, 2014 at 15:03

As noted in the comments, 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$

• Very nice Pranav! This is brilliant answer!! d(ˆ▽ˆ)b Commented Sep 3, 2014 at 10:48
• Summon @VladimirReshetnikov! （‐＾▽＾‐） Commented Sep 3, 2014 at 10:49
• Wait!? I'm missing something here. You said $f(x)=\ln(\ln(1+e^{\large2ix})-\ln2)$, right? But, then $f(0)\to-\infty$. Commented Sep 3, 2014 at 11:41
• Nope, look at f(x) again. Commented Sep 3, 2014 at 11:42
• Indeed, I agree with Mr. @FelixMarin. I think the correct form for Taylor expansion should be $$f(x)=f(x)\bigg|_{x=0}+f'(x)\bigg|_{x=0}x+ f''(x)\bigg|_{x=0} \frac{x^2}{2!} + \cdots$$ Hence $$f(e^{2ix})=f(e^{2ix})\bigg|_{x=0}+f'(e^{2ix})\bigg|_{x=0}(e^{2ix}) + f''(e^{2ix})\bigg|_{x=0} \frac{(e^{2ix})^2}{2!} + \cdots$$ Commented Sep 4, 2014 at 12:59

A solution using complex analysis is given here by sos440.

• Thanks for the link, but I'm looking for real analysis method. +1 anyway (>‿◠)✌ Commented Sep 1, 2014 at 15:59