This is a continuation from this thread.
From my work in the link above I found the following.
$$\int_{0}^{\infty}\ln\left(1+\frac{1}{x^2}\right)dx=\lim_{n \to \infty}\frac{1}{n}\sum_{i=1}^n\ln\left(\left(1+\frac{n^2}{i^2}\right)\left(1+\frac{i^2}{n^2}\right)^\frac{n^2}{i^2}\right)=\pi$$ I was looking for clever ways to somehow expand this so it can be expressed with factorials $!$ and powers $n^n$ just like this. $$\sum_{i=1}^n\ln\left(\frac{i}{n}\right)=\ln\left(\frac{1}{n}\right)+\ln\left(\frac{2}{n}\right)+\dotsm+\ln\left(\frac{n}{n}\right)=\ln\left(\frac{1\cdot2 \dotsm n}{n\cdot n \dotsm n}\right)=\ln\left(\frac{n!}{n^n}\right)$$ However, the problem is I can't figure out a way to expand this inside the $\ln$. $$\prod_{i=1}^{n}\left(1+\frac{n^2}{i^2}\right)\left(1+\frac{i^2}{n^2}\right)^\frac{n^2}{i^2}$$ Maybe there's no way? I've tried expanding each product individually but that too I haven't had any success. Do you guys have any ideas?
$$P_n=\prod_{i=1}^{n}\left(1+\frac{n^2}{i^2}\right)\left(1+\frac{i^2}{n^2}\right)^\frac{n^2}{i^2}$$ resisted the different CAS I tried.
Taking the logarithm and looking at the continuous case $$Q_n=\int_1^{n}\left( \log \left(1+\frac{n^2}{i^2}\right)+\frac{n^2 }{i^2}\log \left(1+\frac{i^2}{n^2}\right)\right)\,di$$ $$Q_n=n \left(n \log \left(1+\frac{1}{n^2}\right)+4 \tan ^{-1}(n)-\pi \right)-\log \left(1+n^2\right)$$ which, asymptotically, is $$Q_n=\pi\,n-2\log(n)-3+\sum_{k=1}^\infty \,\frac {(-1)^n}{k (k+1) (2 k+1)\,n^{2k}}$$
Reworking $\log(P_n)$ in this spirit $$\log(P_n)=\left(\frac{1}{2}+\log (\pi )\right)+\pi\,n+\log(n)+O\left(\frac{1}{n}\right)$$