# How far can we go with $\int_{0}^{\infty} \frac{\ln \left(1+x^n\right)}{1+x^{2}} dx \textrm{ where }n\in N ?$

Latest Edit

Great thanks to @Quanto for giving us the complete solution to ALL even powers using two wonderful factorizations \begin{align} &1+x^{4m}= \prod_{k=1}^m \left(1+2x^2\cos\frac{(2k-1)\pi}{2m}+x^4 \right)\\ & 1+x^{4m+2}= (1+x^2)\prod_{k=1}^m \left(1+2x^2\cos\frac{2k\pi}{2m+1}+x^4\right) \end{align} and made use of the post that

$$\int_0^\infty \frac{\ln(1+2x^2\cos \theta +x^4)}{1+x^2}dx =2\pi \ln\left(2\cos\frac{\theta}4\right)$$

to build up two decent formula for ALL even powers as below:

\begin{align} &\int_0^\infty \frac{\ln(1+x^{4m})}{1+x^2}dx =2\pi \ln \bigg( 2^m \prod_{k=1}^m \cos\frac{(2k-1)\pi}{8m}\bigg)\ \\ &\int_0^\infty \frac{\ln(1+x^{4m+2})}{1+x^2}dx = \pi\ln2 + 2\pi \ln \bigg( 2^m \prod_{k=1}^m \cos\frac{k\pi}{2(2m+1)}\bigg) \end{align}

which can be merged into a single formula below:

$$\boxed{\int_0^\infty \frac{\ln(1+x^{2n})}{1+x^2}dx =\frac{1-(-1)^n}{2} \pi \ln 2+2 \pi \ln \left[2^{\left[\frac{n}{2}\right]} \prod_{k=1}^{\left[\frac{n}{2}\right]}\left(\cos \frac{(n-2 k+1) \pi}{4 n}\right)\right]}$$ where $$n>1.$$

Though the nut for odd powers is much harder, @J.G had cracked the nut partially by giving it a closed form with double sum.

$$\boxed{\int_0^\infty\frac{\ln(1+x^n)}{1+x^2}dx=\frac{\pi}{4}\ln2+G+\sum_{k=0}^{(n-3)/2}\left(\pi\ln\left|2\sin\frac{\pi(2k+1)}{2n}\right|+\frac{\pi(n-4k-2)}{2n}\ln\left|\tan\frac{\pi(2k+1)}{2n}\right|+2\sum_{j\ge0}\frac{(-1)^{j+1}\cos\frac{\pi(2j+1)(2k+1)}{n}}{(2j+1)^2}\right)}$$

Would you like to try to simplify the sum over $$j,\,k$$?

Backgound

Couple months ago, I met the integrals $$\int_{0}^{\infty} \frac{\ln \left(x\right)}{1+x^{2}} dx \stackrel{x\mapsto\frac{1}{x}}{=} -\int_{0}^{\infty} \frac{\ln \left(x\right)}{1+x^{2}} d x \Rightarrow \int_{0}^{\infty} \frac{\ln \left(x\right)}{1+x^{2}} dx =0 \tag*{}$$

$$\textrm{ and}$$

$$I(0)=\int_{0}^{\infty} \frac{\ln 2}{1+x^{2}} d x=\frac{\pi}{2} \ln 2$$

Then I started to investigate, in my post 1, $$I(1)= \int_{0}^{\infty} \frac{\ln (1+x)}{1+x^{2}}dx= \frac{\pi}{4} \ln 2+G$$

Next integral $$I(2)=\int_{0}^{\infty} \frac{\ln \left(1+x^2\right)}{1+x^{2}} dx \stackrel{x\mapsto\tan {\theta}}{=} -2 \int_{0}^{\frac{\pi}{2}} \ln (\cos \theta) d \theta=\pi \ln 2$$

The third one is split into two integrals, first of which refer to my post 2, \begin{aligned} I(3)&=\int_{0}^{\infty} \frac{\ln \left(1+x^{3}\right)}{1+x^{2}} d x\\&= \underbrace{\frac{\ln \left(1-x+x^{2}\right)}{1+x^{2}}}_{\frac{2 \pi}{3} \ln (2+\sqrt{3})-\frac{4}{3} G} d x+\underbrace{\int_{0}^{\infty} \frac{\ln (1+x)}{1+x^{2}}}_{\frac{\pi}{4} \ln 2+G} d x\\ &\boxed{\int_{0}^{\infty} \frac{\ln \left(1+x^{3}\right)}{1+x^{2}} d x =-\frac{G}{3}+\frac{\pi}{4} \ln 2 +\frac{2 \pi}{3}\ln(2+\sqrt{3})}\end{aligned}

The fourth one comes immediately after the my post 3 which states that $$J(a)=\int_{0}^{\infty} \frac{\ln \left(1+2 x \sin a+x^{2}\right)}{1+x^{2}} d x =\pi\ln \left|2 \cos \frac{a}{2}\right|+|a| \ln \left|\tan \frac{a}{2}\right|-2 \operatorname{sgn} (a) \int_{0}^{\frac{|a|}{2}} \ln (\tan x) d x$$

\begin{aligned} I(4)&=\int_{0}^{\infty} \frac{\ln \left(1+x^{4}\right)}{1+x^{2}} d x\\&=\int_{0}^{\infty} \frac{\ln \left[\left(x^{2}+\sqrt{2} x+1\right)\left(x^{2}-\sqrt{2} x+1\right)\right]}{1+x^{2}} \\ &=J\left(\frac{\pi}{4}\right)+J\left(-\frac{\pi}{4}\right)\\& =2 \pi \ln \left(2 \cos \frac{\pi}{8}\right)\\& \boxed{\int_{0}^{\infty} \frac{\ln \left(1+x^{4}\right)}{1+x^{2}} d x =\pi \ln (2+\sqrt{2})} \end{aligned}

The harder one comes from the post 4 by @Quanto. \begin{aligned}I(5)&=\int_0^1\frac{\ln(1+x^5)}{1+x^2}dx\\ &\boxed{= \frac15G -\frac{19\pi }{20}\ln 2+\frac{3\pi }{5}\ln 5+\frac{4\pi}5 \ln \left(1+\sqrt{1+\frac{2}{\sqrt{5}}}\right)+\frac{8\pi}5\ln \left(1+\sqrt{1-\frac{2}{\sqrt{5}}}\right)}\end{aligned}

When the power of $$x$$ is raised to the power $$6$$, I first split the integral into 2.

$$\int_0^1\frac{\ln(1+x^6)}{1+x^2}dx= \underbrace{\int_{0}^{\infty} \frac{\ln \left(x^{2}+1\right)}{1+x^{2}} d x}_{=\pi \ln 2}+ \underbrace{\int_{0}^{\infty} \frac{\ln \left(x^{4}-x^{2}+1\right)}{1+x^{2}} d x }_{K}$$

For integral $$K$$, we use the formula founded in my post 3 stating that $$J(a)=\int_{0}^{\infty} \frac{\ln \left(1+2 x \sin a+x^{2}\right)}{1+x^{2}} d x =\pi\ln \left|2 \cos \frac{a}{2}\right|+|a| \ln \left|\tan \frac{a}{2}\right|-2 \operatorname{sgn} (a) \int_{0}^{\frac{|a|}{2}} \ln (\tan x) d x$$ Then \begin{aligned} K &=\int_{0}^{\infty} \frac{\ln \left(x^{4}-x^{2}+1\right)}{1+x^{2}} d x \\ &=\int_{0}^{\infty} \frac{\ln \left(x^{2}+\sqrt{3} x+1\right)}{1+x^{2}} d x+\int_{0}^{\infty} \frac{\ln \left(x^{2}-\sqrt{3} x+1 \right) }{1+x^{2}} dx\\ &=J\left(\frac{\pi}{3}\right)+J\left(-\frac{\pi}{3}\right) \\ &=2 \pi \ln \left(2 \cos \frac{\pi}{6}\right) \\ &=\pi \ln 3 \end{aligned}

$$\boxed{ \int_{0}^{\infty} \frac{\ln \left(1+x^{6}\right)}{1+x^{2}} d x=\pi \ln 2+\pi \ln 3=\pi \ln 6 }$$

From my recent post, $$\boxed{\int_{0}^{\infty} \frac{\ln \left(x^{4}+b x^{2}+1\right)}{1+x^{2}} d x = 2 \pi \ln \left[2 \cos \left(\frac{1}{4} \cos ^{-1}\left(\frac{b}{2}\right)\right)\right]}$$

\begin{aligned} \int_{0}^{\infty} \frac{\ln \left(x^{8}+1\right)}{1+x^{2}}=& \int_{0}^{\infty} \frac{\ln \left(x^{4}+\sqrt{2} x+1\right)}{1+x^{2}} d x +\int_{0}^{\infty} \frac{\ln \left(x^{4}-\sqrt{2} x+1\right)}{1+x^{2}} d x \\ =& 2 \pi \ln \left[2 \cos \frac{1}{4} \cos ^{-1}\left(\frac{\sqrt{2}}{2}\right)\right] +2 \pi \ln \left[2 \cos \frac{1}{4} \cos ^{-1}\left(-\frac{\sqrt{2}}{2}\right)\right] \\ =& 2 \pi \ln \left(2 \cos \frac{\pi}{16}\right)+2 \pi \ln \left(2 \cos \frac{3 \pi}{16}\right)\\ =& 2 \pi \ln \left(2^2 \cos \frac{\pi}{16} \cos \frac{3 \pi}{16}\right)\\=& 2 \pi \ln (\sqrt{2}+\sqrt{2+\sqrt{2}}) \end{aligned}

Through the investigation, I found that it is very interesting to find their exact values as most of them are unexpectedly simple and decent except $$I(5)$$. We can foresee the difficulty of the evaluation will be increased.

My question is whether we can go further for $$n=7$$ and $$n\geq 9.$$ Your help and contributions will be highly appreciated.

• It's also worth mentioning $I(0)=\frac{\pi}{2}\ln2$.
– J.G.
Commented Aug 19, 2022 at 16:27
• Good suggestion.
– Lai
Commented Aug 19, 2022 at 16:39

For even $$n$$’s, utilize the factorizations \begin{align} &1+x^{4m}= \prod_{k=1}^m \left(1+2x^2\cos\frac{(2k-1)\pi}{2m}+x^4 \right)\\ & 1+x^{4m+2}= (1+x^2)\prod_{k=1}^m \left(1+2x^2\cos\frac{2k\pi}{2m+1}+x^4\right) \end{align} and the result $$\int_0^\infty \frac{\ln(1+2x^2\cos \theta +x^4)}{1+x^2}dx =2\pi \ln\left(2\cos\frac{\theta}4\right)$$ to obtain \begin{align} &\int_0^\infty \frac{\ln(1+x^{4m})}{1+x^2}dx =2\pi \ln \bigg( 2^m \prod_{k=1}^m \cos\frac{(2k-1)\pi}{8m}\bigg)\ \\ &\int_0^\infty \frac{\ln(1+x^{4m+2})}{1+x^2}dx = \pi\ln2 + 2\pi \ln \bigg( 2^m \prod_{k=1}^m \cos\frac{k\pi}{2(2m+1)}\bigg) \end{align} In particular \begin{align} \int_0^\infty \frac{\ln(1+x^{4})}{1+x^2}dx =& \ \pi\ln(2+\sqrt2)\\ \int_0^\infty \frac{\ln(1+x^{6})}{1+x^2}dx =& \ \pi\ln6\\ \int_0^\infty \frac{\ln(1+x^{8})}{1+x^2}dx =& \ 2\pi\ln\left(\sqrt2+\sqrt{2+\sqrt2}\right)\\ \int_0^\infty \frac{\ln(1+x^{10})}{1+x^2}dx =&\ \pi\ln(10+4\sqrt5)\\ \int_0^\infty \frac{\ln(1+x^{12})}{1+x^2}dx =& \ \pi\ln(2+\sqrt2)+2\pi \ln(\sqrt3+\sqrt2)\\ \int_0^\infty \frac{\ln(1+x^{14})}{1+x^2}dx =&\ \pi\ln(14) + 2\pi \ln\cot\frac\pi{7}\\ \int_0^\infty \frac{\ln(1+x^{16})}{1+x^2}dx =&\ 2\pi\ln\bigg( 2+ \sqrt2 +\sqrt{2+\sqrt2}\\ &\hspace{10mm} + \sqrt{2(2+\sqrt2)\left(2+ \sqrt{2+\sqrt2}\right)}\bigg)\\ \int_0^\infty \frac{\ln(1+x^{18})}{1+x^2}dx =&\ \pi\ln 6+2\pi\ln\cot\frac\pi{18}\\ \int_0^\infty \frac{\ln(1+x^{20})}{1+x^2}dx =&\ 2\pi\bigg( \ln\sqrt{2+\sqrt2} + \ln\bigg(1 +\frac{\sqrt5+1}{2\sqrt2}\bigg)\\ &\hspace{10mm} + \ln\left(2 +\sqrt{5+\sqrt5}\right) \bigg)\\ \end{align}

• We could do similar things playing with the roots of unity Commented Aug 20, 2022 at 3:51
• Thank you for both good ideas! Let’s try it!
– Lai
Commented Aug 20, 2022 at 4:41
• The odd one is difficult, isn’t it?
– Lai
Commented Aug 20, 2022 at 4:56
• @Quanto, wonderful and beautiful solution for the even power! I know the first factorisation but not the second one, can you tell me how to get this.
– Lai
Commented Aug 21, 2022 at 8:43
• \begin{aligned} y^{2 m+1} &=-1 \\ &=e^{(2 k+1) \pi i} \\ y_k &=e^{\frac{(2 k+1) \pi i}{2 m+1} } \\ 1+y^{2 m+1} &=(1+y)\prod _{k=0} ^{m-1}\left(y-y_{k}\right)\left(y-\bar{y}_{k}\right) \\ 1+y^{2 m+1} &=(1+y) \prod_{k=0}^{m-1}\left(y^{2}-2 y \cos \frac{(2 k+1) \pi}{2 m+1}+1\right) \end{aligned} Where is my mistake?
– Lai
Commented Aug 21, 2022 at 13:50

## Even $$n$$

For $$a\in(0,\,1)$$, a semicircular contour gives\begin{align}\int_0^\infty\frac{x^ndx}{(1+x^2)(1+a^nx^n)}&=\frac12\int_{-\infty}^\infty\frac{x^ndx}{(1+x^2)(1+a^nx^n)}\\&=i\pi\left(\frac{1}{2i}\frac{1}{i^{-n}+a^n}+\frac{a^{1-n}}{n}\sum_{k=0}^{n/2-1}\frac{e^{i\pi(2k+1)/n}}{a^2+e^{2i\pi(2k+1)/n}}\right),\end{align}so\begin{align}I(n)&=\int_0^1\left(na^{n-1}\int_0^\infty\frac{x^ndx}{(1+x^2)(1+a^nx^n)}\right)da\\&=\pi\int_0^1\left(\frac12\frac{na^{n-1}}{i^{-n}+a^n}+i\sum_{k=0}^{n/2-1}\frac{e^{i\pi\left(2k+1\right)/n}}{a^2+e^{2i\pi(2k+1)/n}}\right)da\\&=\frac{\pi}{2}\lim_{a\to1^-}\Re\left[\ln(i^{-n}+a^n)+\sum_{k=0}^{n/2-1}\ln\frac{a-ie^{i\pi(2k+1)/n}}{a+ie^{i\pi(2k+1)/n}}\right]\end{align}(unless I've not been careful enough with the complex logarithms). In fact, if $$4|n$$ we can just set $$a=1$$ rather than using a limit. You can verify this matches the results so far. For example,$$I\left(6\right) =\frac{\pi}{2}\lim_{a\to1^{-}}\left[\ln\frac{\left(a^{6}-1\right)\left(a+1\right)}{\left(a-1\right)}+2\Re\ln\frac{1-e^{-2i\pi/3}}{1+e^{2i\pi/3}}\right]=\pi\ln6.$$As an example of the $$4|n$$ case, repeated use of $$\frac{1+e^{ix}}{1-e^{ix}}=i\cot\frac{x}{2}$$ gives$$I(4)=\frac{\pi}{2}\ln\frac{2\tan\frac{3\pi}{8}}{\tan\frac{\pi}{8}}=\pi\ln(2+\sqrt{2}).$$

## Odd $$n$$

It's known that$$\int_0^\infty\frac{\ln(x^2+2x\sin a+1)dx}{1+x^2}=\pi\ln\left|2\cos\frac{a}{2}\right|+a\ln\left|\tan\frac{a}{2}\right|+2\sum_{j\ge0}\frac{\sin(2j+1)a}{(2j+1)^2},$$so taking $$a=\theta-\pi/2$$ gives$$\int_0^\infty\frac{\ln(x^2-2x\cos\theta+1)dx}{1+x^2}=\pi\ln\left|2\sin\frac{\theta}{2}\right|+(\pi/2-\theta)\ln\left|\tan\frac{\theta}{2}\right|+2\sum_{j\ge0}\frac{(-1)^{j+1}\cos((2j+1)\theta)}{(2j+1)^2}.$$For odd $$n$$,$$\ln\frac{1+x^n}{1+x}=\sum_{k=0}^{(n-3)/2}\ln\left(x^2-2x\cos\frac{\pi(2k+1)}{n}+1\right),$$so$$\int_0^\infty\frac{\ln(1+x^n)}{1+x^2}dx=\frac{\pi}{4}\ln2+G+\sum_{k=0}^{(n-3)/2}\left(\pi\ln\left|2\sin\frac{\pi(2k+1)}{2n}\right|+\frac{\pi(n-4k-2)}{2n}\ln\left|\tan\frac{\pi(2k+1)}{2n}\right|+2\sum_{j\ge0}\frac{(-1)^{j+1}\cos\frac{\pi(2j+1)(2k+1)}{n}}{(2j+1)^2}\right).$$This is only a partial answer, as I'm not sure how to simplify the sum over $$j,\,k$$.

• Thank you for your Interesting solution by Contour integration
– Lai
Commented Aug 20, 2022 at 5:24
• @Lai I've updated my answer with a partial treatment of the odd-$n$ case.
– J.G.
Commented Aug 20, 2022 at 7:01
• It’s really wonderful!
– Lai
Commented Aug 21, 2022 at 21:38
• Thank you very much for your hard solution to the odd power, I had just put at the top as the latest edit for later reference. Wish you like it.
– Lai
Commented Aug 24, 2022 at 10:19
• The $G$ term must be wrong, because it should be of the form $G/n$. Commented Feb 11, 2023 at 10:34

Let $$I(s)=\int_0^T \frac{\log\left(1+s^nt^n\right)}{1+t^2} \, {\rm d}t$$ $$I'(s)=\frac ns \int_0^T \frac{s^n t^n}{\left( 1+s^nt^n \right)(1+t^2)} \, {\rm d}t \tag{1}$$ in the limit $$T\rightarrow \infty$$. Now $$\frac{t^n}{\left( t^n + s^{-n} \right)(1+t^2)}=\sum_{k=0}^{n-1} \frac{A_k}{t-s^{-1} \zeta^{k+1/2}} + \frac{B_1}{t-i} + \frac{B_2}{t+i}$$ where $$\zeta=e^{2\pi i/n}$$ and $$A_k=\frac 1n \frac{t}{1+t^2}\Bigg|_{t=s^{-1}\zeta^{k+1/2}} = \frac sn \frac{\zeta^{k+1/2}}{s^2+\zeta^{2k+1}} \\ B_1=\frac{1}{2i} \frac{1}{1+(is)^{-n}}\\ B_2=-\frac{1}{2i} \frac{1}{1+(-is)^{-n}} \, .$$ Integrating with respect to $$t$$, (1) becomes $$I'(s)=\frac ns \left(\sum_{k=0}^{n-1} A_k \log \left(1-sT \zeta^{-k-1/2}\right) + B_1 \log\left(1+iT\right) + B_2\log\left(1-iT\right) \right)\\ =\frac ns \left(\sum_{k=0}^{n-1} A_k \log \left(1/T-s \zeta^{-k-1/2}\right) + B_1 \log\left(1/T+i\right) + B_2\log\left(1/T-i\right) \right) \\ + \frac ns \, \log(T) \left( \sum_{k=1}^{n-1} A_k + B_1 + B_2 \right)$$ The second term vanishes, since the sum over all the residues is zero. The first term is finite in the limit $$T\rightarrow \infty$$. In this limit it follows $$I'(s)=\frac ns \left(\sum_{k=0}^{n-1} A_k \log \left(-s \zeta^{-k-1/2}\right) + B_1 \log\left(i\right) + B_2\log\left(-i\right) \right) \\ =\frac ns \frac{\pi}{4} \left( \frac{1}{1+(is)^{-n}} + \frac{1}{1+(-is)^{-n}} \right) + \sum_{k=0}^{n-1} \frac{\zeta^{k+1/2}}{s^2+\zeta^{2k+1}} \, \log\left(-s\zeta^{-k-1/2}\right)$$ and because $$I(0)=0$$, $$I(1)=\int_0^1 I'(s) \, {\rm d}s = \frac{\pi}{4} \, \log\left(4\cos^2\left(\pi n/4\right)\right) + \frac{i\pi}{n}\sum_{k=0}^{n-1} (n-2k-1) \arctan\left(\zeta^{-k-1/2}\right) \\ + \frac{1}{2i}\sum_{k=0}^{n-1} \left( {\rm Li}_2 \left(-i\zeta^{-k-1/2}\right) - {\rm Li}_2\left(i\zeta^{-k-1/2}\right) \right) \, .$$ Changing the summation over the second polylog from $$k\rightarrow n-1-k$$, this sum can also be written as $$\sum\limits_{k=0}^{n-1} \Im\left\{ {\rm Li}_2\left( -i\zeta^{-k-1/2} \right)\right\}=-\Im\left\{ \sum_{k=0}^{n-1} {\rm Li}_2\left(i\zeta^{1/2} \zeta^{k}\right) \right\} \\ =-\Im\left\{ \frac1n {\rm Li}_2\left(-i^n\right) \right\} =\begin{cases} 0 \quad \text{for even } n \\ (-1)^{\frac{n-1}{2}}\frac{G}{n} \quad \text{for odd } n\end{cases}$$ where use of the multiplication theorem for the polylogarithm was made.

Furthermore, by changing the summation over the arcus-tangens from $$k\rightarrow n-1-k$$, this sum can be reduced to

$$\frac{\pi}{2n} \sum\limits_{k=0}^{n-1} (n-2k-1)\log\left(\left|\frac{\cos(\pi k/n+\pi/2n)+\sin(\pi k/n+\pi/2n)}{\cos(\pi k/n+\pi/2n)-\sin(\pi k/n+\pi/2n)}\right|\right) \\ =\frac{\pi}{2n} \sum\limits_{k=0}^{n-1} (n-2k-1)\log\left(\left|\tan(\pi k/n+\pi/2n+\pi/4)\right|\right)$$

finally giving the result

$$I(1)=\frac\pi2 \, \log\left(\left|2\cos(\pi n/4)\right|\right) + \frac{\pi}{2n} \sum_{k=0}^{n-1} (n-2k-1) \log\left(\left|\tan(\pi k/n+\pi/2n+\pi/4)\right|\right) \\ + \begin{cases} 0 \quad \text{for even } n \\ (-1)^{\frac{n-1}{2}}\frac{G}{n} \quad \text{for odd } n\end{cases} \, .$$

Since the complexity of the results increases as $$n$$ increases, it makes sense to try to find the asymptotic behavior of the integral.

Denote

$$I_n= \int_{0}^{\infty} \frac{\ln \left(1+x^n\right)}{1+x^{2}} dx$$

Split the integral as follows

$$I_n= \int_{0}^{1}+\int_{1}^{\infty}$$

Here in the last integral let's do a variable exchange $$x=\frac{1}{y}$$

$$\int_{1}^{\infty} \frac{\ln \left(1+x^n\right)}{1+x^{2}} dx=\int_{0}^{1} \frac{\ln \left(1+y^n\right)}{1+y^{2}} dy-n\int_{0}^{1} \frac{\ln y}{1+y^{2}}$$

In this result the last integral is a classic one $$\int_{0}^{1} \frac{\ln y}{1+y^{2}}=-G$$

where $$G$$ is Catalan's constant

Taking into account above results we may write

$$I_n= nG + 2\int_{0}^{1} \frac{\ln \left(1+x^n\right)}{1+x^{2}}dx$$

From the last result it is clear without any calculations that the asymptotic behavior of the original integral is

$$I_n \rightarrow nG$$

since the last integral is bounded.

We can refine the resulting estimate, taking into account the asymptotic behavior of the last integral

$$\int_{0}^{1} \frac{\ln \left(1+x^n\right)}{1+x^{2}}dx\rightarrow \frac{\ln^{2}2}{n-2\ln 2}$$

(Its derivation is too long to present here)

The final expression could be the following

$$\frac{I_n}{nG}\rightarrow 1+\frac{2\ln^{2}2}{G}\frac{1}{n(n-2\ln 2)}$$

Since we didn't make any assumptions about whether $$n$$ is an integer or not, then $$n$$ can be any positive number.

Improvements

Taking into account Diger's comment we can present the last two formulas in a more precise form

$$\int_{0}^{1} \frac{\ln \left(1+x^n\right)}{1+x^{2}}dx\rightarrow \frac{\pi^{2}}{24n}-\frac{7\pi^{4}}{1440n^{3}}$$

And the final formula

$$\frac{I_n}{nG}\rightarrow 1+\frac{\pi^{2}}{12Gn^{2}}-\frac{7\pi^{4}}{720Gn^{4}}$$

• I think that $$\int_0^1 \frac{\log(1+x^n)}{1+x^2} \, {\rm d}x = \frac{\pi^2}{24n} - \frac{7\pi^4}{1440n^3} + O(1/n^4) \, .$$ Commented Feb 12, 2023 at 19:05
• @Diger A good one! The end result looks much better. I used one crude method. Commented Feb 13, 2023 at 19:52

The command of Mathematica 13.1

Integrate[Log[1 + x^7]/(1 + x^2), {x, 0, Infinity}]


produces $$-\frac{1}{14} e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-\sqrt[14]{-1}\right)+\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-\sqrt[14]{-1}\right)-\frac{1}{14} e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right)+\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right)-\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{3/14}\right)+\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{3/14}\right)-\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right)+\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right)-\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{5/14}\right)+\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{5/14}\right)-\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right)+\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right)+\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{9/14}\right)-\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{9/14}\right)+\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right)-\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right)+\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{11/14}\right)-\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{11/14}\right)+\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right)-\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right)+\frac{1}{14} e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{13/14}\right)-\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{13/14}\right)+\frac{1}{14} e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right)-\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right)+\frac{1}{256} \pi \csc ^2\left(\frac{\pi }{14}\right) \csc ^2\left(\frac{3 \pi }{14}\right) \log (2) \sec ^2\left(\frac{\pi }{7}\right)-\frac{1}{28} \pi ^2 \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \log \left(1-\sqrt[14]{-1}\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{i \pi }{14}} \pi \log \left(1-(-1)^{3/14}\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \log \left(1-(-1)^{5/14}\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{3 i \pi }{14}} \pi \log \left(1-(-1)^{9/14}\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{11 i \pi }{14}} \pi \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{13 i \pi }{14}} \pi \log \left(1-(-1)^{11/14}\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{i \pi }{14}} \pi \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{1}{14} e^{\frac{9 i \pi }{14}} \pi \log \left(1-(-1)^{13/14}\right) \sec \left(\frac{3 \pi }{14}\right)+\frac{1}{14} e^{\frac{5 i \pi }{14}} \pi \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right) \sec \left(\frac{3 \pi }{14}\right)-\frac{\pi ^2 \csc \left(\frac{\pi }{7}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{32 \sqrt{7}}+\frac{e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-\sqrt[14]{-1}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}+\frac{e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{3/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{5/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}+\frac{e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{13 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{9/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}+\frac{e^{\frac{i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}+\frac{e^{\frac{5 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{11/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{9 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}+\frac{e^{\frac{11 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(1-(-1)^{13/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{e^{\frac{3 i \pi }{14}} \pi \csc \left(\frac{\pi }{7}\right) \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec \left(\frac{3 \pi }{14}\right)}{16 \sqrt{7}}-\frac{1}{64} C \csc ^2\left(\frac{\pi }{7}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{256} \pi ^2 \csc ^2\left(\frac{\pi }{7}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{11 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-\sqrt[14]{-1}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{3 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{5 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{3/14}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{9 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{13 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{5/14}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{9/14}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{13 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{9 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{11/14}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{5 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{3 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{13/14}\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{11 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right) \sec ^3\left(\frac{\pi }{14}\right) \sec ^2\left(\frac{3 \pi }{14}\right)+\frac{1}{256} \pi ^2 \csc ^2\left(\frac{\pi }{7}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{9 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-\sqrt[14]{-1}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{5 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{13/14} \left(-1+\sqrt[14]{-1}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{13 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{3/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{11/14} \left(-1+(-1)^{3/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{3 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{5/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{11 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{9/14} \left(-1+(-1)^{5/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{11 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{9/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{3 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{5/14} \left(-1+(-1)^{9/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{11/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{13 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-(-1)^{3/14} \left(-1+(-1)^{11/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)+\frac{1}{128} e^{\frac{5 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(1-(-1)^{13/14}\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)-\frac{1}{128} e^{\frac{9 i \pi }{14}} \pi \csc ^2\left(\frac{\pi }{7}\right) \log \left(-\sqrt[14]{-1} \left(-1+(-1)^{13/14}\right)\right) \sec ^2\left(\frac{\pi }{14}\right) \sec ^3\left(\frac{3 \pi }{14}\right)$$

and for $$n=8$$ $$\frac{1}{8} \pi \csc \left(\frac{\pi }{8}\right) \sec \left(\frac{\pi }{8}\right) \left(\sqrt{2} \log (2)+\sqrt[8]{-1} \left(\left(\left(\sqrt[4]{-1}-i\right) \log \left(1-\sqrt[8]{-1}\right)-\left(\sqrt[4]{-1}-i\right) \log \left(1+\sqrt[8]{-1}\right)-\log \left(1-(-1)^{3/8}\right)+(-1)^{3/4} \log \left(1-(-1)^{3/8}\right)+\log \left(1+(-1)^{3/8}\right)-(-1)^{3/4} \log \left(1+(-1)^{3/8}\right)+\log \left(1-(-1)^{5/8}\right)-(-1)^{3/4} \log \left(1-(-1)^{5/8}\right)-\log \left(1+(-1)^{5/8}\right)+(-1)^{3/4} \log \left(1+(-1)^{5/8}\right)+i \log \left(1-(-1)^{7/8}\right)-\sqrt[4]{-1} \log \left(1-(-1)^{7/8}\right)-i \log \left(1+(-1)^{7/8}\right)+\sqrt[4]{-1} \log \left(1+(-1)^{7/8}\right)\right) \sin \left(\frac{\pi }{8}\right)+\left(\left((-1)^{3/4}-1\right) \log \left(1-\sqrt[8]{-1}\right)-\left((-1)^{3/4}-1\right) \log \left(1+\sqrt[8]{-1}\right)+i \log \left(1-(-1)^{3/8}\right)-\sqrt[4]{-1} \log \left(1-(-1)^{3/8}\right)-i \log \left(1+(-1)^{3/8}\right)+\sqrt[4]{-1} \log \left(1+(-1)^{3/8}\right)-i \log \left(1-(-1)^{5/8}\right)+\sqrt[4]{-1} \log \left(1-(-1)^{5/8}\right)+i \log \left(1+(-1)^{5/8}\right)-\sqrt[4]{-1} \log \left(1+(-1)^{5/8}\right)+\log \left(1-(-1)^{7/8}\right)-(-1)^{3/4} \log \left(1-(-1)^{7/8}\right)-\log \left(1+(-1)^{7/8}\right)+(-1)^{3/4} \log \left(1+(-1)^{7/8}\right)\right) \cos \left(\frac{\pi }{8}\right)\right)\right)$$ which is simplified to $$\frac{1}{4} \pi \log \left(4 \left(833+544 \sqrt{2}+56 \sqrt{410+289 \sqrt{2}}\right)\right).$$

• One may verify these results numerically. Commented Aug 19, 2022 at 17:39
• Mathematica cracks Integrate[Log[1 + x^19]/(1 + x^2), {x, 0, Infinity}] in 22 s. The output is too huge to be presented here. Commented Aug 19, 2022 at 17:51