Proving a formula for $\int_0^\infty \frac{\log(1+x^{4n})}{1+x^2}dx $ if $n=1,2,3,\cdots$ I came across the formula
$$\int_0^\infty \frac{\log \left(1+x^{4n} \right)}{1+x^2}dx = \pi \log \left\{2^n \prod_{k=1  ,\ k \text{ odd}}^{2n-1} \left(1+\sin \left( \frac{\pi k}{4n}\right) \right)\right\} $$
where $n=1,2,3,4,\cdots$
I checked it for a few values of $n$ and it seems to give correct results.
Please help me prove this result.

Evaluate
$J=\int_0^\infty\frac{\ln(1+x^{4n})}{1+x^2} \,dx $
with
$1+x^{4n} = \prod_{k=1}^{2n}(1+e^{i\pi\frac{2n+1-2k}{2n} }x^2)
$
and
$\int_0^\infty \frac{\ln(1+r x^2)}{1+x^2}dx= \pi\ln(1+r^{\frac12})
$
\begin{align}
J& =\int_0^\infty\frac{dx}{1+x^2} \sum_{k=1}^{2n}
\ln (1+e^{i\pi\frac{2n+1-2k}{2n} }x^2)
= \pi\sum_{k=1}^{2n} \ln (1+e^{i\pi\frac{2n+1-2k}{4n} })\\
 &=2\pi\sum_{k=1}^{n} \ln \left(2\cos\frac{(2n+1-2k)\pi}{8n} \right)
=2\pi\sum_{j=1,odd}^{2n-1} \ln \left(2\cos\frac{(2n-j)\pi}{8n}\right) \\
  &=\pi \sum_{j=1,odd}^{2n-1} \ln \left(4\cos^2\frac{(2n-j)\pi}{8n} \right)
=\pi \sum_{j=1,odd}^{2n-1} \ln \left(2(1+\sin\frac{\pi j}{4n} )\right)\\
& =\pi \ln \bigg( 2^n \prod_{j=1,odd}^{2n-1} \left(1+\sin \frac{\pi j}{4n}\right)\bigg)
\end{align}
