# Closed form of $\int_0^\pi \ln\left(1+\sin^2(t)\right) dt$?

I attempted to evaluate this integral but seem to be getting nowhere$$I=\int_0^\pi \ln\left(1+\sin^2(t)\right) dt$$

Wolfram returns the value $$I\approx 1.18266$$ but was not able to provide a closed form for me. I suspect that one could exist but I'm not sure how to proceed. Any help will be appreciated.

• Wolfram is able to get a closed form, but it's nasty. Unless you have a good reason to need a closed form (of which there are few), you'd be better off sticking with the numerics. – parsiad Feb 23 '19 at 0:43
• @parsiad I suspect that maybe it could be simplified by plugging in the bounds and applying dilogarithm identities. I was interested in the integral because it was related to a binomial sum I was messing with. – aleden Feb 23 '19 at 0:59
• Hint: use $$I(a)=\int_0^\pi \ln\left(1+a\sin^2t\right) dt.$$ – xpaul Feb 23 '19 at 0:59

Here is a different way to set up that a parameter in order to apply Feynman's trick.$$I=2\int_0^\frac{\pi}{2} \ln\left(1+\sin^2t\right) dt\overset{t=\operatorname{arccot} x}=2\int_0^\infty \frac{\ln(2+x^2)-\ln(1+x^2)}{1+x^2}dx$$ Now let us consider $$I(a)=\int_0^\infty \frac{\ln(a+x^2)-\ln(1+x^2)}{1+x^2}dx\Rightarrow I'(a)=\int_0^\infty \frac{1}{(1+x^2)(a+x^2)}dx$$ $$=\frac{1}{a-1}\left(\int_0^\infty \frac{1}{x^2+1}dx-\int_0^\infty \frac{1}{x^2+a}dx\right)=\frac{1}{a-1}\left(\frac{\pi}{2}-\frac{1}{\sqrt a}\cdot \frac{\pi}{2}\right)=\frac{\pi}{2}\frac{1}{\sqrt a(1+\sqrt a)}$$ We are looking to find $$I=2I(2)$$, but since $$I(1)=0$$ we have: $$I=2\left(I(2)-I(1)\right)=2\int_1^2 I'(a)da=\pi \int_1^2 \frac{1}{\sqrt a(1+\sqrt a)}da$$ $$\overset {\large a=x^2}=2\pi\int_1^\sqrt 2 \frac{1}{1+x}dx=2\pi \ln(1+x)\bigg|_1^\sqrt 2=2\pi \ln\frac{1+\sqrt 2}{2}$$

• Nice way to use Feynman's, I didn't think to use that sub at the beginning either. Really makes it alot easier, thank you. – aleden Feb 23 '19 at 5:20
• I'm happy that I could help! – Zacky Feb 23 '19 at 10:32

Let $$I(a)=\int_0^\pi \ln\left(1+a\sin^2t\right) dt$$ and $$\begin{eqnarray*} I'(a)&=&\int_0^\pi \frac{\sin^2t}{1+a\sin^2t} dt=\int_0^\pi\frac{1-\cos2t}{2+a(1-\cos2t)}dt\\ &=&\frac{1}{2}\int_0^{2\pi}\frac{1-\cos2t}{2+a(1-\cos2t)}dt=\frac{1}{2}\int_{|z|=1}\frac{1-\frac12(z+\frac1z)}{2+\frac{a}2(z+\frac1z)}\frac{dz}{iz}\\ &=&\frac{1}{2i}\int_{|z|=1}\frac{2z-(z^2+1)}{[4z+a(z^2+1)]z}dz\\ &=&\frac{1}{2i}2\pi i(\text{Res}(f(z),z=0)+\text{Res}(f(z),z=z_1)\\ &=&\pi\bigg(i\frac1a-\frac1{a\sqrt{1+a}}\bigg)=\frac{\pi}{\sqrt{1+a}(\sqrt{1+a}+1)}. \end{eqnarray*}$$ Here $$z_1=\frac{2+a-2\sqrt{1+a}}{a}.$$ So $$I(a)=\int_0^1\frac{\pi}{\sqrt{1+a}(\sqrt{1+a}+1)}da=2\pi\ln\frac{1+\sqrt2}{2}.$$

• Good work!! I think you forgot a differential at the last integral. – manooooh Feb 23 '19 at 2:28

Let $$a=3+2\sqrt{2}=(1+\sqrt2)^2$$ so that $$a^2-6a+1=0$$. If we consider $$\log(a-e^{i2t})=\log|a-e^{i2t}|+i\text{arg}(a-e^{i2t}),$$ then, \begin{align*}\log|a-e^{i2t}|=\frac12\log|a-e^{i2t}|^2&=\frac12\log(a^2+1-2a\cos (2t))=\frac12\log((a-1)^2+4a\sin^2 t)\\&=\frac12\log 4a+\frac12\log(1+\sin^2 t).\end{align*} Thus the real part of the integral $$I=\int_0^\pi \log(a-e^{i2t})\mathrm dt=\frac12\int_0^{2\pi}\log(a-e^{it})\mathrm dt$$ is equal to $$\frac{\pi}2\log(4a)+\frac12\int_0^\pi\log(1+\sin^2 t)\mathrm dt$$. This gives $$\int_0^\pi \log(1+\sin^2 t)\mathrm dt =-\pi\log(4a)+2\Re(I).$$ Now, by mean value theorem for analytic (harmonic) functions, we have $$I=\pi \log(a-z)|_{z=0}=\pi\log a$$ and it follows $$\int_0^\pi \log(1+\sin^2 t)\mathrm dt = \pi\log\left(\frac{a}4\right)=2\pi\log\left(\frac{1+\sqrt{2}}{2}\right).$$

Using the series $$(1-x)^{-1/2}=\sum_{k=0}^\infty\binom{2k}{k}\frac{x^k}{4^k}\tag1$$ subtracting $$1$$, dividing by $$x$$, and integrating, we get $$\sum_{k=1}^\infty\binom{2k}{k}\frac{x^k}{k4^k}=2\log(2)-2\log\left(1+(1-x)^{1/2}\right)\tag2$$ Therefore \begin{align} \int_0^\pi\log\left(1+\sin^2(t)\right)\mathrm{d}t &=\int_0^\pi\sum_{k=1}^\infty(-1)^{k-1}\frac{\sin^{2k}(t)}k\,\mathrm{d}t\tag3\\ &=\sum_{k=1}^\infty\frac{(-1)^{k-1}}k\frac12\int_0^{2\pi}\left(\frac{e^{it}-e^{-it}}{2i}\right)^{2k}\,\mathrm{d}t\tag4\\ &=\sum_{k=1}^\infty\frac{(-1)^{k-1}}k\pi\frac{\binom{2k}{k}}{4^k}\tag5\\[3pt] &=2\pi\log\left(\frac{1+\sqrt2}2\right)\tag6 \end{align} Explanation:
$$(3)$$: use power series for $$\log(1+x)$$
$$(4)$$: $$\sin^2(x)=\left(\frac{e^{ix}-e^{-ix}}{2i}\right)^2$$ is even
$$(5)$$: the constant term, $$\binom{2k}{k}4^{-k}$$, is the only one that does not vanish in the integral
$$(6)$$: apply $$(2)$$

An alternative derivation by integration by parts and very few extras:

$$I = \int_{0}^{\pi}\log(1+\sin^2\theta)\,d\theta = 2\int_{0}^{\pi/2}1\cdot\log(1+\sin^2\theta)\,d\theta = \pi\log 2-2\int_{0}^{\pi/2}\frac{2\theta\sin\theta\cos\theta}{1+\sin^2\theta}\,d\theta$$ The last integral would be fairly straightforward to compute if $$\theta$$ was $$\sin\theta$$. On the other hand we may exploit the Fourier sine series of the identity function over the interval $$\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$$: $$\theta = \sum_{k\geq 1}\frac{(-1)^{k+1}}{k}\,\sin(2k\theta) \tag{F}$$ then compute $$\int_{0}^{\pi/2}\frac{\sin(2k\theta)\sin\theta\cos\theta}{1+\sin^2\theta}\,d\theta =\frac{\pi}{2}(\sqrt{2}-1)^{2k}\tag{R}$$ through a recurrence relation. By $$(\text{F})$$ and $$(\text{R})$$ it follows that $$I = \pi\log 2-2\pi\sum_{k\geq 1}\frac{(-1)^{k+1}}{k}(\sqrt{2}-1)^{2k}=\pi\log 2-2\pi\log(4-2\sqrt{2})$$ $$I=\pi\log\left(\frac{3}{4}+\frac{1}{\sqrt{2}}\right)=\color{blue}{2\pi\log\left(\frac{1+\sqrt{2}}{2}\right)}=1.18266139149\ldots$$ and dilogarithms have been carefully avoided.