5

How to evaluate

$$ I = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{e^{-x^2}}{\cos(x)} \left(1 + \cos(4x)\right)\right)\right]^2 \, dx $$

My attempt

We can rewrite the integral as, $$ I = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(e^{-x^2}\right) + \ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right)\right]^2 \, dx $$ $$ = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(e^{-x^2}\right)\right]^2 \, dx + 2 \int_{0}^{\frac{\pi}{2}} \ln\left(e^{-x^2}\right) \ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right) \, dx + \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right)\right]^2 \, dx $$

Let us now evaluate each integral. To evaluate $I_1$,

$$ I_1 = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(e^{-x^2}\right)\right]^2 \, dx = \int_{0}^{\frac{\pi}{2}} \left(-x^2\right)^2 \, dx = \int_{0}^{\frac{\pi}{2}} x^4 \, dx = \frac{\pi^5}{160} $$

The remaining integrals are $$I_2 = \int_{0}^{\frac{\pi}{2}} \ln\left(e^{-x^2}\right) \ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right) \, dx$$ $$I_3 = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right)\right]^2 \, dx $$

I don't know how to evaluate $I_2$ and $I_3$. Are there any better methods to evaluate $I$?

  • $$-\left(\int_{0}^{\frac{\pi}{2}} x^2\ln\left({1+\cos(4x)}\right)-x^2\log(\cos x),dx\right)$$ $$\int_{0}^{\frac{π}{2}}x^2\log(\cos x),dx=-\frac{π^3}{24}\log2-\fracπ2\zeta(3)$$ $$=-\left(\int_{0}^{\frac{\pi}{2}} x^2\ln\left({1 + \cos(4x)}\right) , dx+\frac{π^3}{24}\log2+\fracπ2\zeta(3)\right)$$ $$2\left(\int_{0}^{\frac{\pi}{2}} x^2\ln\left({2\cos(2x)}\right) , dx\right)=2\int_{0}^{\frac{\pi}{2}} x^2\ln\left({2}\right) , dx+2\int_{0}^{\frac{\pi}{2}} x^2\ln\left({\cos(2x)}\right),dx$$ $$\int_{0}^{\frac{\pi}{2}} x^2\ln\left({\cos(2x)}\right),dx=?$$ stuck with that second integral... – Amrut Ayan Aug 31 '24 at 08:26
  • @whatamidoing Yeah, after posting the question, I tried further but got stuck where you are stuck., Maybe the substitution $u = 2x$ could help. – Martin.s Aug 31 '24 at 08:30
  • @whatamidoing There should be absolute value bars around the cosine in your last integral. Otherwise, the log will take negative values on part of the integration interval. – David H Aug 31 '24 at 08:32
  • Wait, there is a singularity at $x = \pi/4$. Therefore, the integral can be rewritten as:

    $$I_{21} = -2 \int_0^{\pi/4} x^2 \ln(1 + \cos(4x)) , dx - 2 \int_{\pi/4}^{\pi/2} x^2 \ln(1 + \cos(4x)) , dx.$$ $$ I_{211} = -\frac{1}{4} \int_0^{\pi/2} u^2 \ln(1 + \cos(2u)) , du = -\frac{1}{4} \int_0^{\pi/2} u^2 \ln(2\cos^2 u) , du $$

    $$ = -\frac{1}{4} \int_0^{\pi/2} u^2 \left[\ln(2) + \ln(\cos^2 u)\right] , du $$

    $$ = -\frac{\ln(2)}{4} \int_0^{\pi/2} u^2 , du - \frac{1}{4} \int_0^{\pi/2} u^2 \ln(\cos^2 u) , du $$

    – Martin.s Aug 31 '24 at 08:37
  • @whatamidoing. I may be dumb but where did go the square ot the logarithm ? – Claude Leibovici Aug 31 '24 at 09:38
  • @ClaudeLeibovici I was trying the $I_2$ and not $I_3$, hence no square, thank you sir and if you are wondering about $1+cos(4x)$, i did $cos(4x) = 2cos^2(2x)-1$ and $1+cos(4x)$ becomes $2cos^2(2x)$ from which i did, $\int_0^{\frac{\pi}{2}} \ln(1+cos(4x)),dx = \int_0^{\frac{\pi}{2}} \ln(2cos^2(2x)),dx\implies \int_0^{\frac{\pi}{2}} \ln(2) , dx + \int_0^{\frac{\pi}{2}} \ln(cos^2(2x)),dx \implies \int_0^{\frac{\pi}{2}} \ln(2) , dx + 2\int_0^{\frac{\pi}{2}} \ln(cos(2x)),dx$ and so on – Amrut Ayan Aug 31 '24 at 10:48
  • @whatamidoing. Sorry then and I am effectively dumb ! Cheers :-) – Claude Leibovici Aug 31 '24 at 10:51
  • @ClaudeLeibovici i missed out an $x^2$ factor in each integral here, i cannot edit the comment to add it back :( as it is beyond 5 minutes – Amrut Ayan Aug 31 '24 at 10:55
  • @whatamidoing. Your solution is easier – Claude Leibovici Aug 31 '24 at 11:21
  • The integral looks pretty complicated. Where is it from? – Тyma Gaidash Aug 31 '24 at 18:51
  • @TymaGaidash There’s an Indian guy named Aryan who made a Facebook group called "Advanced Integrals and Series." I was in that group, but it no longer exists (I’m not sure—I just can’t find it). However, I have the entire problem collection, but no solutions. – Martin.s Aug 31 '24 at 19:26

4 Answers4

4

First, simplify $\dfrac{1+\cos(4x)}{\cos x}=2\cos^2(2x)$, then expand the integrand to

$$\log^22 - 2(\log2) x^2 + x^4 + 2\log 2\left[\log\left(\cos^2(2x)\right) - \log(\cos x)\right] \\ + 2x^2 \left[\log(\cos x) - \log\left(\cos^2(2x)\right)\right] \\ + \log^2(\cos x) - 2\log(\cos x)\log\left(\cos^2(2x)\right) + \log^2\left(\cos^2(2x)\right)$$

and integrate term-by-term. The first three are trivial. The next two follow from a well-known result,

$$\begin{align*} \int_0^\tfrac\pi2 \log(\cos x) \, dx &= \int_0^\tfrac\pi2 \log(\sin x) \, dx = - \frac\pi2 \log2 \\ \int_0^\tfrac\pi2 \log\left(\cos^2(2x)\right) \, dx &= 2 \int_0^\tfrac\pi4 \log\left(\sin^2(2x)\right) \, dx \\ &= 2 \int_0^\tfrac\pi2 \log(\sin x) \, dx = -\pi\log2 \end{align*}$$

The rest can be evaluated with heavy use of the Fourier series,

$$\log(\cos x) = -\log2 - \sum_{k\ge1} \frac{(-1)^k}k \cos(2kx)$$

To wit,

$$\begin{align*} \int_0^\tfrac\pi2 \log^2(\cos x) \, dx &= \frac{\pi^3}{24} + \frac\pi2 \log^2 2 \\ \int_0^\tfrac\pi2 \log^2\left(\cos^2(2x)\right) &= \frac{\pi^3}6 + 2\pi \log^22 \\ \int_0^\tfrac\pi2 \log(\cos x) \log\left(\cos^2(2x)\right) \, dx &= - \frac{\pi^3}{48}+\pi \log^22 \\ \int_0^\tfrac\pi2 x^2 \log(\cos x) \, dx &= -\frac{\pi^3}{24} \log 2 - \frac\pi4 \zeta(3) \\ \int_0^\tfrac\pi2 x^2 \log\left(\cos^2(2x)\right) \, dx &= -\frac{\pi^3}{12} \log 2 + \frac{3\pi}{32} \zeta(3) \end{align*}$$

and these results all come together to end up with

$$\boxed{I = \frac{\pi^5}{160} + \frac{\pi^3}4 - \frac{11\pi}{16} \zeta(3)}$$

user170231
  • 25,320
3

Partial answer $$J_2 = \int\log\left(e^{-x^2}\right) \log\left(\frac{1 + \cos(4x)}{\cos(x)}\right) \, dx= - \int x^2 \log\left(\frac{1 + \cos(4x)}{\cos(x)}\right) \, dx$$ can be computed using a couple of integration by parts and Euler representation of the cosine (have a look here for this antiderivative). So, for its real part, $$I_2 = \int_0^{\frac \pi 2}\log\left(e^{-x^2}\right) \log\left(\frac{1 + \cos(4x)}{\cos(x)}\right) \, dx=-\frac{11 }{32}\,\pi\, \zeta (3)$$ which can be checked using numerical integration.

For $I_3$, I am stuck.

3

(NOTE: Too long for comment)

(NOTE: I have utilized "Possible Closed forms" from WA in $J_1,J_3$)


$$ I = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{e^{-x^2}}{\cos(x)} \left(1 + \cos(4x)\right)\right)\right]^2 \, dx $$

$$I=I_1+2I_2+I_3$$

We have $I_1, I_2$ ready one from OP's work and one from @Claude's work,

$$\boxed{I_1=\frac{\pi^5}{160}}$$ $$\boxed{I_2=\frac{-11}{32}\pi\zeta(3)}$$

We have,

$$I_3 = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right)\right]^2 \, dx = \int_{0}^{\frac{\pi}{2}} \left[\ln\left({1 + \cos(4x)}\right)-\ln(\cos x)\right]^2 \, dx $$

$$\int_{0}^{\frac{\pi}{2}} \ln^2\left({1 + \cos(4x)}\right)\,dx + \int_{0}^{\frac{\pi}{2}} \ln^2\left({ \cos(x)}\right)\,dx- 2 \int_{0}^{\frac{\pi}{2}}\ln(1+\cos(4x))\ln(\cos(x))\,dx $$

Using $1+\cos(4x)=2\cos^2(2x)$

$$\int_{0}^{\frac{\pi}{2}} \ln^2\left(2\cos^2(2x)\right)\,dx + \int_{0}^{\frac{\pi}{2}} \ln^2\left({ \cos(x)}\right)\,dx- 2\int_{0}^{\frac{\pi}{2}}\ln(2\cos^2(2x))\ln(\cos(x))\,dx $$

$$I_3=J_1+J_2-2J_3$$

$$\boxed{J_2=\frac{\pi^3}{24}+\frac{\pi}{2}\ln^2(2)}$$

$$J_1=\int_{0}^{\frac{\pi}{2}} \ln^2\left(2\cos^2(2x)\right)\,dx = \int_{0}^{\frac{\pi}{2}}\ln^2(2)+4\ln^2(\cos(2x))+4\ln(2) \ln(\cos(2x))\,dx$$

$$J_1=\frac{\pi}{2}\ln^2(2)+4\int_0^{\frac{\pi}{2}}\ln^2(\cos(2x))\,dx+4\ln(2)\int_0^{\frac{\pi}{2}}\ln(\cos(2x))\,dx$$

$$J_1=\frac{\pi}{2}\ln^2(2)+2\int_0^{\pi}\ln^2(\cos(x))\,dx++2\ln(2)\int_0^{\pi}\ln(\cos(x))\,dx$$

$$J_1=\frac{\pi}{2}\ln^2(2)+2J_2+2\int_{\frac{\pi}{2}}^{\pi}\ln^2(\cos(x))\,dx+2\ln(2)\int_0^{\frac{\pi}{2}}\ln(\cos(x))\,dx+2\ln(2)\int_{\frac{\pi}{2}}^{\pi}\ln(\cos(x))\,dx$$

$$\boxed{J_1 \approx \frac{\pi}{2}\ln^2(2)+2\left(\frac{\pi^3}{24}+\frac{\pi}{2}\ln^2(2)\right)+2\left(\frac14(-2\zeta(3)-2\zeta(5)-5\pi^2)+i(6h_4+13)\right)+2\ln(2)\left(-\frac{\pi}{2}\ln(2)\right)+2\ln(2)\left(\frac{i\pi}{2}(\pi+i\ln(2))\right)}$$

Where, $h_4$ is the fourth Hundred Dollar Challenge Constant

$$J_3 =\int_{0}^{\frac{\pi}{2}}\ln(2\cos^2(2x))\ln(\cos(x))\,dx$$

$$J_3 =\ln(2)\int_{0}^{\frac{\pi}{2}}\ln(\cos(x))\,dx+2\int_{0}^{\frac{\pi}{2}}\ln(\cos(x))\ln(\cos(2x))\,dx$$

$$J_3 =\ln(2)\left(-\frac{\pi}{2}\ln(2)\right)+2\int_{0}^{\frac{\pi}{2}}\ln(\cos(x))\ln(\cos(2x))\,dx$$

$$\boxed{J_3 \approx \ln(2)\left(-\frac{\pi}{2}\ln(2)\right)+\left(\frac{49}{2\pi^4}\right)+2\left(-\frac{e^{1+3e-2\pi}}{\pi^{1+e}}\tan(e\pi)+i\left(43C_{KL}-80\right)\right)}$$

Where, $C_{KL}$ is Komornik-Loreti Constant

So to summarize,

$$I \approx \frac{\pi^5}{160}-\frac{11}{16}\pi\zeta(3)+( big\,\, mess)$$

Amrut Ayan
  • 8,887
1

Using ONLY Mathematica:

$$ I = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{e^{-x^2}}{\cos(x)} \left(1 + \cos(4x)\right)\right)\right]^2 \, dx=-\frac{11 \pi \zeta (3)}{16}+\frac{\pi ^3}{4}+\frac{\pi ^5}{160} $$

$$I_3 = \int_{0}^{\frac{\pi}{2}} \left[\ln\left(\frac{1 + \cos(4x)}{\cos(x)}\right)\right]^2 \, dx=\frac{\pi ^3}{4} $$

$$\int_0^{\frac{\pi }{2}} \ln (\cos (x)) \ln (\cos (2 x)) \, dx=-\frac{1}{2} i C \pi -\frac{\pi ^3}{96}-\frac{1}{8} i \pi ^2 \ln (4)+\frac{1}{8} \pi \ln ^2(4)$$

$$\int_{\frac{\pi }{2}}^{\pi } \ln ^2(\cos (x)) \, dx=\int_0^1 \frac{\ln ^2(-x)}{\sqrt{1-x^2}} \, dx=-\frac{1}{24} \left(11 \pi ^3\right)-\frac{1}{2} i \pi ^2 \ln (4)+\frac{1}{8} \pi \ln ^2(4)$$

where: $ C$ is Catalan constant.