6

Prove that $$\int_{0}^{\frac{\pi}4} \ln(\sin{x}+\cos{x}+\sqrt{\sin{2x}})dx =\frac{\pi}{4} \ln2$$

I tried to use King's rule and to scale by $2$ and then to add the integrals, to get product of terms and use the result $$\int_{0}^{\frac{\pi}2} \ln(\sin{x})dx=\int_{0}^{\frac{\pi}2} \ln(\cos{x})dx=-\frac{\pi}2\ln2$$ but it didnt work. Any help?

Zacky
  • 27,674
Grentouce
  • 301
  • 1
  • 9

2 Answers2

14

$$I=\int_{0}^{\frac{\pi}4} \ln(\sin{x}+\cos{x}+\sqrt{\sin(2x)})dx =\frac12 \int_0^\frac{\pi}{2} x'\ln(\sin x+\cos x+\sqrt{\sin (2x)})dx$$ $$\overset{IBP}=\frac12 \int_0^\frac{\pi}{2}x\,\frac{\sin x-\cos x}{\sqrt{\sin(2x)}}dx\overset{x=\arctan t}=\frac{1}{2\sqrt 2}\int_0^\infty \frac{\arctan t}{1+t^2}\frac{t-1}{\sqrt t}dt$$


$$I(a)=\int_0^\infty \frac{\arctan(at)}{1+t^2}\frac{t-1}{\sqrt t}dt\Rightarrow I'(a)=\int_0^\infty \frac{(t-1)\sqrt t}{(1+a^2 t^2)(1+t^2)}dt$$ $$\overset{t=x^2}=\frac{2}{1-a^2}\int_0^\infty \frac{1+a^2 x^2}{1+a^2 x^4}dx-\frac{2}{1-a^2}\int_0^\infty \frac{1+x^2}{1+x^4}dx=\frac{\pi}{\sqrt 2}\frac{1-\sqrt a}{\sqrt a (1+a)(1+\sqrt a)}$$


$$\Rightarrow I=\frac{\pi}{4}\int_0^1 \frac{1-\sqrt a}{\sqrt a (1+a)(1+\sqrt a)}da\overset{\sqrt a=x}=\frac{\pi}{2}\int_0^1 \frac{1-x}{(1+x^2)(1+x)}dx=\frac{\pi}{4}\ln 2 $$

Zacky
  • 27,674
  • 1
    Thanks a lot!!! – Grentouce Jul 25 '19 at 12:07
  • 1
    Yeah its clear! – Grentouce Jul 25 '19 at 12:08
  • A question. Why did the bounds of integration change in the first step? How is the coefficient 1/2 justified? – TheCoolDrop Jul 25 '19 at 12:41
  • 1
    @TheCoolDrop if we consider $f(x)=\ln(\sin x+\cos x+\sqrt{\sin(2x)})$ then notice that: $$\int_0^\frac{\pi}{2} f(x)dx=\int_0^\frac{\pi}{4} f(x) dx +\int_\frac{\pi}{4}^\frac{\pi}{2} f(x) dx$$ Now let $\frac{\pi}{2}-x =t$ and notice that $f(\pi/2-t)=f(t)$ to get: $$\int_\frac{\pi}{4}^\frac{\pi}{2} f(x) dx =\int_0^\frac{\pi}{4} f(t) dt\Rightarrow \int_0^\frac{\pi}{2} f(x)dx=2\int_0^\frac{\pi}{4} f(x) dx $$ – Zacky Jul 25 '19 at 12:50
  • 1
    Very elegant solution, for sure. – Claude Leibovici Jul 25 '19 at 12:59
  • @Zacky in the comment above, why does $f(\frac{\pi}{2}-t)=f(t)$? – Axion004 Jul 25 '19 at 13:49
  • 1
    @Axion004 Plug in $f(t)=\ln(\sin t+\cos t+\sqrt{\sin(2t)})$ the followings: $\sin(\pi/2-t)=\cos t$, $\cos (\pi/2-t)=\sin t$ and $\sin(\pi-2t)=\sin(2t)$. – Zacky Jul 25 '19 at 13:51
  • 1
    Ah, I see. This makes

    $$\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}f(x)dx =\int_{\frac{\pi}{4}}^{\frac{\pi}{2}}f(\frac{\pi}{2}-t)dt = \int_{0}^{\frac{\pi}{4}}f(t)dt$$

    – Axion004 Jul 25 '19 at 13:55
  • But, then again as $\frac{\pi}{2} - x = t ~\Rightarrow ~ x = \frac{\pi}{2} - t$, shouldn't the upper bound be switched to $x = \frac{\pi}{2} - t = \frac{\pi}{2}$ or $t=0$ and the lower bound is switched to $\frac{\pi}{4}$? – Axion004 Jul 25 '19 at 14:06
  • 2
    With the substitution $\frac{\pi}{2}-x=t\Rightarrow dx=-dt$ we get: $$\int_\frac{\pi}{4}^\frac{\pi}{2}f(x)dx=\int_\frac{\pi}{4}^0 f\left(\frac{\pi}{2}-t\right)(-dt)=\int_0^\frac{\pi}{4} f\left(\frac{\pi}{2}-t\right)dt$$ – Zacky Jul 25 '19 at 14:09
  • 1
    I see, sorry I haven't done this in a while and am extremely rusty. – Axion004 Jul 25 '19 at 14:11
4

Here is a different solution using complex method. We can notice that

\begin{align*} I = &\int_0^{\frac \pi 4} \ln\left(1+\tan x + \sqrt{2\tan x} \right) dx + \int_0^{\frac\pi 4} \ln(\cos x) dx \\ = &I_1 + I_2. \end{align*} Evaluation of $I_1$ : Let $\displaystyle\omega = e^{\frac {\pi i} 4} =\frac{1+i}{\sqrt 2}$ and make substitution $\tan x= y^2 $ to find that \begin{align*} I_1 =& \int_0^1 \log\left((1+\omega y)(1+\bar \omega y)\right)\frac{2y }{1+y^4}dy \\ =& 4 \Re \int_0^1 \frac{y \log\left(\frac{1+\omega y}2 \right)}{1+y^4} dy +\frac {\pi\ln 2}2. \end{align*} Let $\omega y = z$. Then using $\omega^2 = i, \omega^4 = -1$, \begin{align*} \Re \int_0^1 \frac{y \log\left(\frac{1+\omega y}2 \right)}{1+y^4} dy =& \Re \int_0^\omega \frac{ \frac{z}{\omega} \log\left(\frac{1+z}{2}\right)}{1+ (\frac z \omega)^4} \frac{dz}\omega \\ =& \Im \int_0^\omega \frac{z \log\left(\frac{1+z}{2}\right)}{1-z^4} dz \\ =& \frac 1 2 \Im \int_{-\omega}^\omega \frac{z \log\left(\frac{1+z}{2}\right)}{1-z^4} dz. \end{align*} Note that $\displaystyle f(z) = \frac{z \log\left(\frac{1+z}{2}\right)}{1-z^4} $ is analytic in $|z|<1$, and continuous in $|z|\le 1$ except at points $\displaystyle -1, \pm i$. So by choosing a contour $z = e^{i\theta}, -\frac \pi 4\le \theta \le \frac \pi 4$ and using $\log(1+e^{i\theta}) = \log\left(2\cos\left(\frac \theta 2\right)\right) + \frac {i\theta}{2}$, etc, we get \begin{align*} \Im \int_{-\omega}^\omega \frac{z \log\left(\frac{1+z}{2}\right)}{1-z^4} dz =&\Im \int_{-\frac \pi 4}^{\frac \pi 4} \frac{ie^{i2\theta}\left(\log(\cos (\theta/2)) + i\theta/2\right)}{1-e^{i4\theta}} d\theta\\ =&-\Im \int_{-\frac \pi 4}^{\frac \pi 4} \frac{\log(\cos (\theta/2)) + i\theta/2}{2\sin(2\theta)} d\theta\\ =& -\frac 1 4\int_{-\frac \pi 4}^{\frac \pi 4} \frac{\theta}{\sin(2\theta)} d\theta\\ =& -\frac 1 4 \int_{0}^{\frac \pi 4} \frac{\theta}{\sin\theta \cos \theta} d\theta\\ =:& -\frac 1 4 J \end{align*} (In fact $J = G$, the Catalan's number.) This gives $$ I_1 = -\frac 1 2 J +\frac {\pi \ln 2}2. $$

Evaluation of $I_2$ : By integrating by parts, we have \begin{align*} I_2 =& x\ln(\cos x)|^{\frac \pi 4}_0 +\int_0^{\frac \pi 4} \frac {x \sin x}{\cos x} dx \\ =&-\frac{\pi \ln 2}{8} +K. \end{align*} We observe that \begin{align*} K-J = & -\int_0^{\frac \pi 4} \frac{x\cos x}{\sin x} dx\\ =& -x\log(\sin x)|^{\frac \pi 4}_0 + \int_0^{\frac \pi 4} \log(\sin x) dx\\ =& \frac{\pi \ln 2}{8} + \int_{\frac \pi 4}^{\frac\pi 2} \log(\cos x) dx \tag{$\frac \pi 2 - x\mapsto x$}\\ =&-\frac{3\pi \ln 2}{8} -I_2 \end{align*} thus $\displaystyle K = -\frac{3\pi \ln 2}{8} -I_2 +J$ and $$ I_2 = -\frac{\pi \ln 2}{2} -I_2 +J \Longrightarrow I_2 = \frac 1 2 J -\frac{\pi \ln 2}{4}. $$ Therefore, we have $$ I = I_1 + I_2 = \left(-\frac 1 2 J +\frac{\pi\ln 2}2\right)+\left(\frac 1 2 J -\frac{\pi \ln 2}{4}\right) = \frac {\pi \ln 2}4. $$

Myunghyun Song
  • 21,723
  • 2
  • 24
  • 60