43

Here is an interesting, albeit tough, integral I ran across. It has an interesting solution which leads me to think it is doable. But, what would be a good strategy?.

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

This looks rough. What would be a good start?. I tried various subs in order to get it into some sort of shape to use series, LaPlace, something, but made no real progress.

I even tried writing a geometric series. But that didn't really result in anything encouraging.

$$\int_{0}^{\frac{\pi}{2}}\sum_{n=0}^{\infty}(-1)^{k}\left(\frac{\ln(2\cos(x))}{x}\right)^{2k}$$

Thanks all.

Joe
  • 4,757
  • 5
  • 35
  • 55
Cody
  • 14,054
  • 2
    That geometric series does not converge over the whole of the range of integration, so it is not surprising that it didn't produce encouragement. $$ \lim_{x\to\pi/2}\left(\frac{\log(2\cos(x))}{x}\right)^2=+\infty $$ – robjohn Aug 04 '12 at 14:19
  • Yes, robjohn, that is obvious now. I was just grabbing at straws. Perhpas digamma can be implemented in some fashion. That $\ln(2\pi)$ and $\gamma$ may suggest so. Just a thought. – Cody Aug 04 '12 at 14:21
  • 3
    I strongly suspect that this is closely related to the identity $$ \binom{\alpha}{\omega} := \frac{\Gamma(1+\alpha)}{\Gamma(1+\alpha-\omega)\Gamma(1+\omega)} = \frac{1}{2\pi}\int_{-\pi}^{\pi}(1+e^{i\theta})^{\alpha}e^{-i\omega \theta};d\theta,$$ which holds for all $\alpha \geq 0$ and $\omega \in \mathbb{R}$, though I still cannot figure how it is related. – Sangchul Lee Aug 04 '12 at 16:56
  • 1
    Apparently you're onto something, SOS. This is mentioned in one of the papers Raymond posted links to. – Cody Aug 04 '12 at 17:29
  • $$I=\frac{\pi}{4} \left ( 1+ \int_{0}^{\infty} \frac{\ln(1+x)-\ln x}{(x+1)(\pi^2+\ln^2x)}\text{d}x \right )$$Another:$$\int_{0}^{\pi/2} \frac{x^2\ln(2\cos x)} {\left ( x^2+\ln^2\left ( 2\cos x \right ) \right )^2 } \text{d}x =\frac{7\pi}{192} -\frac{\pi}{96}\gamma+\frac{\pi}{8}\ln A$$ – Setness Ramesory Aug 19 '21 at 07:53

3 Answers3

27

In addition to the nice set of references by Raymond Manzoni, here is my proof of the identity. Frankly, I have not seen these references yet, thus I am not sure if this already appears in one of them.

Here I refer to the following identity

$$ \binom{\alpha}{\omega} = \frac{1}{2\pi} \int_{-\pi}^{\pi} \left(1 + e^{i\theta}\right)^{\alpha} e^{-i\omega \theta} \; d\theta, \ \cdots \ (1) $$

whose proof can be found in my blog post.

Now let $x$ be a real number such that $|x| < \frac{\pi}{2}$. Then simple calculation shows that

$$ \log\left(1+e^{2ix}\right) = \log(2\cos x) + ix \quad \Longleftrightarrow \quad \Im \left( \frac{-x}{\log\left(1+e^{2ix}\right)} \right) = \frac{x^2}{x^2 + \log^2(2\cos x)},$$

hence we have

$$ \begin{align*}I &:= \int_{0}^{\frac{\pi}{2}} \frac{x^2}{x^2 + \log^2(2\cos x)} \; dx = -\int_{0}^{\frac{\pi}{2}} \Im \left( \frac{x}{\log\left(1+e^{2ix}\right)} \right) \; dx \\ &= -\frac{1}{8}\int_{-\pi}^{\pi} \Im \left( \frac{\theta}{\log\left(1+e^{i\theta}\right)} \right) \; d\theta = \frac{1}{8}\Re \left( \int_{-\pi}^{\pi} \frac{i\theta}{\log\left(1+e^{i\theta}\right)} \; d\theta \right). \end{align*}$$

Differentiating both sides of $(1)$ with respect to $\omega$ and plugging $\omega = 1$, we have

$$ \frac{1}{2\pi} \int_{-\pi}^{\pi} (-i\theta) \left(1 + e^{i\theta}\right)^{\alpha} e^{-i\theta} \; d\theta = \alpha \left(\psi_0(\alpha) - \psi_0(2)\right). $$

Now integrating both sides with respect to $\alpha$ on $[0, 1]$,

$$ \begin{align*} -\frac{1}{2\pi} \int_{-\pi}^{\pi} \frac{i\theta}{\log \left(1 + e^{i\theta}\right)} \; d\theta &= \int_{0}^{1} \alpha \left(\psi_0(\alpha) - \psi_0(2)\right) \; d\alpha \\ &= \left[ \alpha \log \Gamma (\alpha) \right]_{0}^{1} - \int_{0}^{1} \log \Gamma (\alpha) \; d\alpha - \frac{1}{2}\psi_0(2) \\ &= -\frac{1}{2}\left( 1 - \gamma + \log (2\pi) \right), \end{align*}$$

where we have used the fact that

$$ \psi_0 (1+n) = -\gamma + H_n, \quad n \in \mathbb{N}$$

and

$$ \begin{align*} \int_{0}^{1} \log \Gamma (\alpha) \; d\alpha & = \frac{1}{2} \int_{0}^{1} \log \left[ \Gamma (\alpha) \Gamma (1-\alpha) \right] \; d\alpha \\ &= \frac{1}{2} \int_{0}^{1} \log \left( \frac{\pi}{\sin \pi \alpha} \right) \; d\alpha \\ &= \frac{1}{2} \left( \log \pi - \int_{0}^{1} \log \sin \pi \alpha \; d\alpha \right) \\ &= \frac{1}{2} \log (2\pi). \end{align*} $$

Therefore we have the desired result.

Sangchul Lee
  • 167,468
  • Man, SOS, you're amazing!!!. :):) – Cody Aug 04 '12 at 22:44
  • SOS, may I ask, what are the 'simple calculations' that show the first line after the identity at (1)?. I can't believe it, but I can actually follow the rest of it, I think. :) Also when you differentiate, I assume it is w.r.t $\omega$?. – Cody Aug 04 '12 at 23:08
  • @Cody, the easiest way I think to prove this is to use the Euler's identity. Then $$ 1 + e^{2ix} = 2 \left( \frac{e^{ix} + e^{-ix}}{2} \right) e^{ix} = 2 \cos x e^{ix}.$$ Or maybe you can prove it geometrically by considering the unit circle centered at $1$. Also, yes, the differentiation is taken w.r.t. $\omega$. – Sangchul Lee Aug 04 '12 at 23:29
  • Thanks a lot. wonderful and ingenious proof – Cody Aug 04 '12 at 23:40
  • @Cody, Thanks for your praise! And I also found a critical typo and just fixed it right now. – Sangchul Lee Aug 04 '12 at 23:44
  • Hi SOS. I noticed that yesterday, but I did not want to bother you anymore. That's why I asked about the differentiation. – Cody Aug 05 '12 at 13:23
  • May I ask one more small thing, SOS, then I will leave you be. I just like to follow everything that is going on. How do we get from here $log(2\cos(x))+ix$ to here $I\left(\frac{-x}{log(1+e^{2ix})}\right)$. This is what I meant when I asked about it before. Thanks for all of your input. It's been great. – Cody Aug 05 '12 at 13:32
  • @Cody, let $\log(1 + e^{2ix}) = \sigma + i\xi$. Then $$ \Im \left(\frac{-\xi}{\sigma+i\xi}\right)=\Im\left(\frac{(-\xi)(\sigma - i\xi)}{(\sigma + i\xi)(\sigma - i \xi)}\right)=\Im\left(\frac{(-\xi)(\sigma-i\xi)}{\sigma^2+\xi^2}\right) = \frac{\xi^2}{\sigma^2+\xi^2}.$$This procedure is quite standard. – Sangchul Lee Aug 05 '12 at 16:54
  • Thanks, SOS. This is why I like posting problems on this site. I always learn something new. Especially when those like you, robjohn, etc. have forgotten more than I'll ever know :) Take care and thanks. – Cody Aug 05 '12 at 16:59
  • @sos440 sorry for me, what is the definition of the function $\psi_0$? – vesszabo Aug 08 '12 at 13:26
17

To learn more about this very interesting integral I'll just provide the interesting links (the story itself is interesting since it was an experimental discovery first from Glasser and Oloa) :

Raymond Manzoni
  • 43,021
  • 5
  • 86
  • 140
  • Wow, I see now why I did not even know where to begin :) Thanks for all of the articles, Raymond. – Cody Aug 04 '12 at 17:28
  • @Cody: Glad you found them interesting too! I discovered this 'mine' while searching 'log-sine' (log-cosine here) integrals. – Raymond Manzoni Aug 04 '12 at 18:47
  • @RaymondManzoni the paper Coffey 2012 has nothing to do with the integral in the title. – Martin Nicholson Oct 12 '17 at 14:14
  • @Nemo: I don't remember the exact reason of this inclusion but $(1.10)$ for example contains $\int_0^1 \ln\Gamma(x), dx$ that matters in Sangchul Lee's answer. I notice too generalizations of $\int_0^1 t\psi(t) dt$ that could be of interest. – Raymond Manzoni Oct 12 '17 at 22:53
1

We start by observing the following: \begin{aligned} \int_{-\pi/2}^{\pi/2} \left(e^{ix}+e^{-ix}\right)^s e^{iwx}\,dx&= \frac{1}{i} \oint \limits_{\gamma} \left(z+z^{-1}\right)^s z^{(w-1)}\,dz\\ &= \frac{1}{i} \oint \limits_{\gamma} \left(z+z^{-1}\right)^s z^{(w-1)}\,dz\\ &= \frac{1}{i} \oint\limits_{\gamma} \left(1+z^{2}\right)^s z^{(w-s-1)}\,dz \end{aligned} where $\gamma$ a semicircle with in the upper positive halfplane with $\displaystyle{\substack{|z| = 1\\ -\pi/2 <\arg(z) < \pi/2}}$ recesses at the points $z = \pm i$. We complete the semicircle with a straight section that joins the points $z=-i$ and $z=i$ apart from the recesses $z=-i$,$0$, i. Then: \begin{aligned}\oint\limits_{\gamma} \left(1+z^{2}\right)^s z^{(w-s-1)}\,dz &= e^{i\frac{\pi}{2}(w-s)}\int_{0}^{1} (1-x^2)^sx^{w-s-1}\,dx+e^{i\frac{\pi}{2}(w-s)}\int_0^{-1} (1-x^2)^sx^{w-s-1}\,dx\\ &= e^{i\frac{\pi}{2}(w-s)}\int_{0}^{1} (1-x^2)^sx^{w-s-1}\,dx-e^{-i\frac{\pi}{2}(w-s)}\int_0^{1} (1-x^2)^sx^{w-s-1}\,dx\\ &= 2i\sin \left(\frac{\pi (w-s)}{2}\right)\int_0^1 x^{w-s-1}(1-x^2)^s\,dx\\ &= i\sin \left(\frac{\pi (w-s)}{2}\right)B\left(\frac{w-s}{2},s+1\right)\end{aligned} Consequently $$\displaystyle{\int_{-\pi/2}^{\pi/2} \left(e^{ix}+e^{-ix}\right)^s e^{iwx}\,dx = \sin \left(\frac{\pi (w-s)}{2}\right)B\left(\frac{w-s}{2},s+1\right)}$$ Producing as to w we have \begin{aligned}&\int_{-\pi/2}^{\pi/2} x\left(e^{ix}+e^{-ix}\right)^s e^{iwx}\,dx\\ &=-i\frac{d}{dw} \sin \left(\frac{\pi (w-s)}{2}\right)B\left(\frac{w-s}{2},s+1\right) \\&= -iB\left(\frac{w-s}{2},s+1\right)\left(\frac{1}{2}\sin \left(\frac{\pi (w-s)}{2}\right)\left(\psi\left(\frac{w-s}{2}\right) - \psi\left(\frac{w+s}{2}+1\right)\right) + \frac{\pi}{2}\cos \left(\frac{\pi (w-s)}{2}\right)\right)\end{aligned} So for the original integral we have: \begin{aligned}I&=\int_{0}^{\pi/2}\frac{x^2}{x^2+\log^2 (2\cos x)}\,dx \\&= \frac{1}{2}\int_{-\pi/2}^{\pi/2}\frac{x^2}{x^2+\log^2 (2\cos x)}\,dx\\ &= \frac{1}{2}\mathfrak{I}\int_{-\pi/2}^{\pi/2}\frac{x}{\log (2\cos x) - ix}\,dx\\ &= \frac{1}{2}\mathfrak{I}\int_{-\pi/2}^{\pi/2}\frac{x}{\log \left(1+e^{-2ix}\right)}\,dx\\ &= \frac{1}{2}\mathfrak{I}\int_{-\pi/2}^{\pi/2}\int_0^1 \frac{x(1+e^{-2ix})^s}{(1+e^{-2ix}) - 1}\,ds\,dx\\ &= \frac{1}{2}\mathfrak{I}\int_0^1\int_{-\pi/2}^{\pi/2} x(e^{ix}+e^{-ix})^se^{i(2-s)x}\,dx\,ds \end{aligned} Setting w=2-s and using formulas $\displaystyle{B(1-s,1+s) = \frac{\pi s}{\sin \pi s}}$ and $\displaystyle{\psi(1-s) - \psi (s) = \pi\cot \pi s}$ the result is simplified in \begin{aligned}I &= -\frac{\pi}{4}\int_0^1 s(\psi (1-s) - \psi (2) - \pi \cot \pi s)\,ds \\ &= -\frac{\pi}{4}\int_0^1 s(\psi (s) - \psi (2))\,ds\\ &= -\frac{\pi}{4}\left(-\frac{1}{2}+\frac{\gamma}{2} - \int_0^1 \log \Gamma(s)\,ds\right)\\ &= \frac{\pi}{8}\left(1-\gamma + \log (2\pi)\right) \end{aligned}

Martin.s
  • 1
  • 1
  • 22