i used a quite different method which actually turned out simpler: i used the identity arctan(x)+arctan(1/x)=pi/2, to rewrite the starting integral as pi/2-arctan(1/x) all over x (and all squared), expanding the square we get 3 integrals, 2 of which trivially go to zero (odd functions), and we're left with the integral of arctan(1/x)^2/x^2, and being even i multiplied by 2 and changed the bounds to from 0 to inf i then subbed 1/x=u, which easily simplifies, and with some further calculations you end up with twice the integral from 0 to inf of ln(x^2+1)/(x^2+1), where subbing tan(t)=x transforms the integral into 4 times the integral from 0 to pi/2 of -ln(cost), which is a known integral which evaluates to -pi/2ln2. multiplying with the -4 in front we get 2*pi*ln2