TITLE: Is there a known closed form solution to $\int_0^1\frac{\ln(1+x^{2n})}{1+x^2} \,dx$?
QUESTION [13 upvotes]: $\require{begingroup} \begingroup$
$\def\e{\mathrm{e}}\def\W{\operatorname{W}}\def\Wp{\operatorname{W_0}}\def\Wm{\operatorname{W_{-1}}}\def\Catalan{\mathsf{Catalan}}$
Related question
Is there a known closed form solution to
\begin{align}
I_n&=
\int_0^1\frac{\ln(1+x^{2n})}{1+x^2} \,dx
=?
\tag{0}\label{0}
\end{align}
It checks out numerically, for $n=1,\dots,7$ that
\begin{align}
I_1=
\int_0^1\frac{\ln(1+x^2)}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln2-\Catalan
\tag{1}\label{1}
,\\
I_2=
\int_0^1\frac{\ln(1+x^{2\cdot2})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln(2+\sqrt2)-2\Catalan
\tag{2}\label{2}
,\\
I_3=
\int_0^1\frac{\ln(1+x^{2\cdot3})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln6-3\Catalan
\tag{3}\label{3}
,\\
I_4=
\int_0^1\frac{\ln(1+x^{2\cdot4})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln(4+\sqrt2+2\sqrt{4+2\sqrt2})-4\Catalan
\tag{4}\label{4}
,\\
I_5=
\int_0^1\frac{\ln(1+x^{2\cdot5})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln(10+4\sqrt5)-5\Catalan
=
\tfrac\pi2\,\ln(10\cot^2\tfrac\pi5)-5\Catalan
\tag{5}\label{5}
,\\
I_6=
\int_0^1\frac{\ln(1+x^{2\cdot6})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln((5\sqrt2+2\sqrt{12})(1+\sqrt2))-6\Catalan
\tag{6}\label{6}
,\\
I_7=
\int_0^1\frac{\ln(1+x^{2\cdot7})}{1+x^2} \,dx
&=
\tfrac\pi2\,\ln(14\cot^2\tfrac\pi7)-7\Catalan
\tag{7}\label{7}
,
\end{align}
so \eqref{0} seems to follow the pattern
\begin{align}
I_n&=
\tfrac\pi2\,\ln(f(n))-n\Catalan
\tag{8}\label{8}
\end{align}
for some function $f$.
Items \eqref{5} and \eqref{7} look promising
as they agree to $f(n)=2n\cot^2(\tfrac\pi{n})$,
but the other fail on that.

Edit:
Also, it looks like
\begin{align}
\int_1^\infty\frac{\ln(1+x^{2n})}{1+x^2} \,dx
&=\tfrac\pi2\,\ln(f(n))+n\Catalan
\tag{9}\label{9}
\end{align}
and
\begin{align}
\int_0^\infty\frac{\ln(1+x^{2n})}{1+x^2} \,dx
&=\pi\,\ln(f(n))
\tag{10}\label{10}
\end{align}
with the same $f$.

Edit
Thanks to the great answer by @Quanto,
the function $f$ can be defined as
\begin{align}
f(n)&=
2^n\!\!\!\!\!\!\!\!\!\!
\prod_{k = 1}^{\tfrac{2n-1+(-1)^n}4}
\!\!\!\!\!\!\!\!\!
\cos^2\frac{(n+1-2k)\pi}{4n}
\tag{11}\label{11}
.
\end{align}
$\endgroup$

REPLY [2 votes]: Just to put in more closed form what @Varu Vejalla has evaluated
$I=\int_0^1\frac{\ln(1+x^{2n})}{1+x^2} dx$
$\int_0^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx=\frac{1}{2}\int_{-\infty}^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx=\int_0^1\frac{\ln(1+x^{2n})}{1+x^2} dx+\int_1^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx=I+\int_1^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx$
$\int_1^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx [t=\frac{1}{x}]=\int_0^1\frac{\ln(1+t^{2n})}{1+t^2} dt-\int_0^1\frac{\ln(t^{2n})}{1+t^2} dx=I+2nG$
$$I=\frac{1}{4}\int_{-\infty}^\infty\frac{\ln(1+x^{2n})}{1+x^2} dx-nG$$
Branch points of $\log$ (roots of $1+x^{2n}$) are $e^{\frac{i\pi}{2n}},e^{-\frac{i\pi}{2n}}, e^{\frac{3i\pi}{2n}}, e^{\frac{-3i\pi}{2n}},... e^{\frac{(2n-1)i\pi}{2n}}, e^{-\frac{(2n-1)i\pi}{2n}} $
Next we integrate in the complex plane, closing the contour in the upper half-plane for the roots $e^{-\frac{(2k-1)i\pi}{2n}}$ and in the lower half-plane for the roots $e^{+\frac{(2k-1)i\pi}{2n}}$ - to integrate the single-valued function.
Finally we get
$$I=\frac{2\pi{i}}{4*2i}\log\Bigl((-i-e^{\frac{i\pi}{2n}})(i-e^{-\frac{i\pi}{2n}})...(-i-e^{\frac{(2n-1)i\pi}{2n}})((-i-e^{-\frac{(2n-1)i\pi}{2n}})\Bigr)-nG=$$
$$=\frac{\pi}{4}\log\Bigl((2+2\sin\frac{\pi}{2n})...(2+2\sin\frac{(2n-1)\pi}{2n})\Bigr)-nG$$
$$I=\frac{\pi}{4}\log\Bigl((1+\sin\frac{\pi}{2n})...(1+\sin\frac{(2n-1)\pi}{2n})\Bigr)+\frac{\pi{n}}{4}\log2-nG$$