Computing $\int_0^\infty \frac{\ln x}{(x^2+1)^2}dx$ I'm trying to compute
$$I=\int_0^\infty \frac{\ln x}{(x^2+1)^2}dx$$

The following is my effort,
$$I(a)=\int_0^\infty\frac{\ln x}{x^2+a^2}dx$$
Let $x=a^2/y$ so that $dx=-(a^2/y^2)dy$ which leads to
$$I(a)=\int_0^\infty \frac{\ln(a/y)}{a^2+y^2}dy=\int_0^\infty\frac{\ln a}{y^2+a^2}dy-I(a)$$
$$I(a)=\frac{1}{2}\int_0^\infty\frac{\ln a}{y^2+a^2}dy=\frac{1}{2}\frac{\ln a}{a}\arctan\left( \frac{y}{a}\right)_0^\infty=\frac{\ln a}{a}\frac{\pi }{4}$$
Differentiating with respect to $a$ then
$$\frac{dI(a)}{a}=-2aI'(a)=\frac{\pi}{4}\left( \frac{1}{a^2}-\frac{\ln a}{a^2}\right)$$
where $$I'(a)=\int_0^\infty \frac{\ln y}{(y^2+a^2)^2}dx$$
$$I'(a)=\frac{\pi}{-8a}\left( \frac{1}{a^2}-\frac{\ln a}{a^2}\right)$$
$$I'(a=1)=-\frac{\pi}{8}$$
But the correct answer is $-\pi/4$.

Can you help me figure where I mistake? Please give some method if there is which is much better than what I have done?

I would like to find a more general integral using trigonometric substitution  $x=a\tan \theta.$
$\displaystyle \begin{aligned} \int_0^{\infty} \frac{\ln x}{\left(a^2+x^2\right)^2} d x &=\frac{1}{a^3} \int_0^{\frac{\pi}{2}} \cos ^2 \theta \ln (a \tan \theta) d \theta\\ &=\frac{\ln a}{a^3}\int _0^\frac{\pi}{2} \cos ^2 \theta d \theta+\frac{1}{a^3} \int^{\frac{\pi}{2}} \cos ^2 \theta \ln (\tan \theta) d \theta\\ &=\frac{\ln a}{2 a^3} \int_0^{\frac{\pi}{2}}\left(1+\cos 2 \theta\right) d \theta+\frac{1}{2a^3} \int_0^{\frac{\pi}{2}}(1+\cos 2 \theta) \ln (\tan \theta) d \theta \\ &=\frac{\pi\ln a}{4 a^3}+\frac{1}{4a^3} \int_0^{\frac{\pi}{2}} \ln (\tan \theta) d(\sin 2 \theta)\quad \left(\textrm{ By }\int_0^{\frac{\pi}{2}} \ln (\tan \theta) d \theta=0 \right)\\&=\frac{\pi \ln a}{4a^3}+\frac{1}{4a^3}[\sin 2 \theta \ln (\tan \theta)]_0^{\frac{\pi}{2}}-\frac{1}{4a^3} \int_0^{\frac{\pi}{2}} \frac{\sin 2 \theta \sec ^2 \theta}{\tan \theta} d \theta \\&=\frac{\pi}{4 a^3}(\ln a-1)\end{aligned} \tag*{} $
