Answer :
Recall the geometric sum,
[tex]\displaystyle \sum_{k=0}^{n-1} x^k = \frac{1-x^k}{1-x}[/tex]
It follows that
[tex]1 - x + x^2 - x^3 + \cdots + x^{2020} = \dfrac{1 + x^{2021}}{1 + x}[/tex]
So, we can rewrite the integral as
[tex]\displaystyle \int_0^\infty \frac{x^2 + 1}{x^4 + x^2 + 1} \frac{\ln(1 + x^{2021}) - \ln(1 + x)}{\ln(x)} \, dx[/tex]
Split up the integral at x = 1, and consider the latter integral,
[tex]\displaystyle \int_1^\infty \frac{x^2 + 1}{x^4 + x^2 + 1} \frac{\ln(1 + x^{2021}) - \ln(1 + x)}{\ln(x)} \, dx[/tex]
Substitute [tex]x\to\frac1x[/tex] to get
[tex]\displaystyle \int_0^1 \frac{\frac1{x^2} + 1}{\frac1{x^4} + \frac1{x^2} + 1} \frac{\ln\left(1 + \frac1{x^{2021}}\right) - \ln\left(1 + \frac1x\right)}{\ln\left(\frac1x\right)} \, \frac{dx}{x^2}[/tex]
Rewrite the logarithms to expand the integral as
[tex]\displaystyle - \int_0^1 \frac{1+x^2}{1+x^2+x^4} \frac{\ln(x^{2021}+1) - \ln(x^{2021}) - \ln(x+1) + \ln(x)}{\ln(x)} \, dx[/tex]
Grouping together terms in the numerator, we can write
[tex]\displaystyle -\int_0^1 \frac{1+x^2}{1+x^2+x^4} \frac{\ln(x^{2020}+1)-\ln(x+1)}{\ln(x)} \, dx + 2020 \int_0^1 \frac{1+x^2}{1+x^2+x^4} \, dx[/tex]
and the first term here will vanish with the other integral from the earlier split. So the original integral reduces to
[tex]\displaystyle \int_0^\infty \frac{1+x^2}{1+x^2+x^4} \frac{\ln(1-x+\cdots+x^{2020})}{\ln(x)} \, dx = 2020 \int_0^1 \frac{1+x^2}{1+x^2+x^4} \, dx[/tex]
Substituting [tex]x\to\frac1x[/tex] again shows this integral is the same over (0, 1) as it is over (1, ∞), and since the integrand is even, we ultimately have
[tex]\displaystyle \int_0^\infty \frac{1+x^2}{1+x^2+x^4} \frac{\ln(1-x+\cdots+x^{2020})}{\ln(x)} \, dx = 2020 \int_0^1 \frac{1+x^2}{1+x^2+x^4} \, dx \\\\ = 1010 \int_0^\infty \frac{1+x^2}{1+x^2+x^4} \, dx \\\\ = 505 \int_{-\infty}^\infty \frac{1+x^2}{1+x^2+x^4} \, dx[/tex]
We can neatly handle the remaining integral with complex residues. Consider the contour integral
[tex]\displaystyle \int_\gamma \frac{1+z^2}{1+z^2+z^4} \, dz[/tex]
where γ is a semicircle with radius R centered at the origin, such that Im(z) ≥ 0, and the diameter corresponds to the interval [-R, R]. It's easy to show the integral over the semicircular arc vanishes as R → ∞. By the residue theorem,
[tex]\displaystyle \int_{-\infty}^\infty \frac{1+x^2}{1+x^2+x^4}\, dx = 2\pi i \sum_\zeta \mathrm{Res}\left(\frac{1+z^2}{1+z^2+z^4}, z=\zeta\right)[/tex]
where [tex]\zeta[/tex] denotes the roots of [tex]1+z^2+z^4[/tex] that lie in the interior of γ; these are [tex]\zeta=\pm\frac12+\frac{i\sqrt3}2[/tex]. Compute the residues there, and we find
[tex]\displaystyle \int_{-\infty}^\infty \frac{1+x^2}{1+x^2+x^4} \, dx = \frac{2\pi}{\sqrt3}[/tex]
and so the original integral's value is
[tex]505 \times \dfrac{2\pi}{\sqrt3} = \boxed{\dfrac{1010\pi}{\sqrt3}}[/tex]