Closed form of $\int_0^\pi \ln\left(1+\sin^2(t)\right) dt$?
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}.$$
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}$$
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). $$