How to prove
$$\int_0^1\frac{\ln(1+a^2x)}{1+a^2x^2}dx=\int_0^1\frac{\ln\left(\frac{1-x}{x}\right)}{1+a^2x^2}dx\tag{1}$$
Here is how I came up with this relation:
In this solution @Kemono Chen elegantly proved
$$\int_0^a\frac{\ln(1+ax)}{1+x^2}dx=\int_0^1\frac{a\ln(1+a^2x)}{1+a^2x^2}dx=\frac12\arctan a\ln(1+a^2)\tag{2}$$
and while trying to prove the identity in (2) starting from RHS, I ended up with the relation in (1). So any straightforward method to prove (1)? Plus any good applications of (1)?
The transformation of the integral in (2) was done by @Jack D'Aurizio here.
I will post my proof in the answer section soon and I am tagging "harmonic number" as the proof involves it in case you are curious. Thanks
UPDATE: If we let $\frac{1-x}{x}\mapsto x$ in (1) then combine with (2) we have
$$\int_0^1\frac{\ln(1+a^2x)}{1+a^2x^2}dx=\int_0^\infty\frac{\ln x}{a^2+(1+x)^2}=\frac1{2a}\arctan a\ln(1+a^2)\tag{3}$$