How to evaluate $ \int_0^\infty \frac{\log x}{(x^2+a^2)^2} dx $ Evaluate $$  \int_0^\infty \frac{\log x}{(x^2+a^2)^2} dx $$ $$(a>0) $$
How can I use contour appropriately?
What is the meaning of this integral?

(additionally posted)
I tried to solve this problem.
First, I take a branch $$  \Omega=\mathbb C - \{z|\text{Re}(z)=0\; \text{and} \; \text{Im}(z)\le0\}  $$ 
Then ${\log_\Omega z}=\log r +i\theta (-\frac{\pi}{2}\lt\theta\lt\frac{3\pi}{2})$
Now, $\frac{\log z}{(z^2+a^2)^2}$ is holomorphic in $\Omega - \{ai\}$ with double poles at $ai$.
Now I'll take the contour which forms an indented semicircle.
For any $0\lt\epsilon\lt{a}$, where $\max (1,a)\lt R$, $\Gamma_{R,\epsilon}\subseteq\Omega - \{ai\}$ and in $\Omega$, $i=e^{i\pi/2}$.
Now using the residue formula, $$2\pi{i}\operatorname*{Res}_{z=ai}\frac{\log_\Omega{z}}{(z^2+a^2)^2}=2\pi{i}\operatorname*{lim}_{z\to ai}\frac{d}{dz}(z-ai)^2\frac{\log_\Omega{z}}{(z^2+a^2)^2}=\frac{\pi}{2a^3}(\log_\Omega{ai}-1)$$
Now, the last part, take $i=e^{i\pi/2}$, then is equal to $\frac{\pi}{2a^3}(\log{a}-1+i\pi/2)$
So, I can split integrals by four parts, 
$$\int_{\epsilon}^R dz + \int_{\Gamma_R} dz + \int_{-R}^{-\epsilon} dz + \int_{\Gamma_\epsilon} dz$$
First, evaluate the second part,
$$\left|\int_{\Gamma_R} dz\right|\le\int_0^{\pi}\left|\frac{\log_\Omega{Re^{i\theta}}}{(R^2e^{2i\theta}+a^2)^2}iRe^{i\theta}\right|d\theta$$
Note that
$$\left|\log_\Omega{Re^{i\theta}}\right|=\left|\log R+i\theta\right|\le\left|\log R\right|+|\theta|$$
$$\left|R^2e^{2i\theta}+a^2\right|\ge R^2-a^2\quad (R\gt a)$$
Then, 2nd part $\le\frac{R(\pi R+\frac{\pi^2}{2})}{(R^2+a^2)^2}\to 0\; \text{as} \; R \to \infty\quad \left|\log R\right|\lt R\;\text{where}\;(R\gt 1)$
So, 4th part similarly, goes to $\;0$.
Then 3rd part, substitute for $\;t=-z$,
$$\int_\epsilon^{R}\frac{\log t}{(t^2+a^2)^2}dt + i\pi\int_\epsilon^{R}\frac{dt}{(t^2+a^2)^2}$$
And $\;i\pi\lim\limits_{{\epsilon \to 0},\;{R\to\infty}}\int_\epsilon^{R}\frac{dt}{(t^2+a^2)^2}=\frac{\pi}{4a^3}$
With tedious calculations, I got $\frac{\pi}{4a^3}(\log a -1)$.

I thought that it might be instructive to add to the answer posted by @RonGordon.  We note that the integral of interest $I_1(a^2)$ can be written
$$I_1(a^2)=\int_0^\infty \frac{\log^2 x}{(x^2+a^2)^2}\,dx=-\frac{dI_2(a^2)}{d(a^2)}$$
where 
$$I_2(a^2)=\int_0^\infty\frac{\log^2x}{x^2+a^2}\,dx$$
Now, we can evaluate the integral $J(a^2)$
$$J(a^2)=\oint_C \frac{\log^2z}{z^2+a^2}\,dz$$
where $C$ is the key-hole contour defined in the aforementioned post.   There, we have
$$\begin{align}
J(a^2)&=-4\pi i\,I_2(a^2)+4\pi^2\int_0^\infty \frac{1}{x^2+a^2}\,dx \\\\
&=-4\pi i\, I_2(a^2)+\frac{2\pi^3}{a}\\\\
&=2\pi i \left(\text{Res}\left(\frac{\log^2 z}{z^2+a^2},ia\right)+\left(\text{Res}\left(\frac{\log^2 z}{z^2+a^2},-ia\right)\right)\right)
\end{align}$$
Finally, after calculating the residues, and simplifying, we obtain the integral $I_2(a^2)$ whereupon differentiating with respect to $a^2$ recovers the integral of interest $I_1(a^2)$.  And we are done.
