<s>[INST] The value of the definite integral The value of the definite integral $\displaystyle\int\limits_0^\infty \frac{\ln x}{x^2+4} \, dx$ is
(A) $\dfrac{\pi \ln3}{2}$   (B) $\dfrac{\pi \ln2}{3}$  (C) $\dfrac{\pi \ln2}{4}$  (D) $\dfrac{\pi \ln4}{3}$
I tried using integration by parts,
\begin{align}
& \int_0^\infty \frac{\ln x}{x^2+4}dx = \ln x\int_0^\infty \frac{1}{x^2+4}dx-\int_0^\infty \left(\frac{d}{dx}\ln x\int_0^\infty \frac{1}{x^2+4}\right) \, dx \\[10pt]
= {} & \left[\ln x \frac{1}{2}\tan^{-1}\frac{x}{2}\right]-\int_0^\infty \frac{1}{x}\frac{1}{2}\tan^{-1}\frac{x}{2} \, dx
\end{align}
I could not move ahead. Can someone help me to get final answer?
 [/INST] Let $$\displaystyle I = \int_{0}^{\infty}\frac{\ln x}{x^2+4}dx = \int_{0}^{2}\frac{\ln x}{x^2+4}dx+\underbrace{\int_{2}^{\infty}\frac{\ln x}{x^2+4}dx}_{J}$$
Now for Calculation of $$\displaystyle J = \int_{2}^{\infty}\frac{\ln x}{x^2+4}dx\;,$$ Now put $\displaystyle x=\frac{4}{y}\;,$ Then $\displaystyle dx = -\frac{4}{y^2}dy$
So we get $$\displaystyle J = -\int_{2}^{0}\left[\frac{\ln 4-\ln y}{y^2+4}\right]dy = \int_{0}^{2}\frac{\ln 4}{x^2+4}dy-\int_{0}^{\infty}\frac{\ln y}{x^2+4}dx$$
Above we have used $$\displaystyle \bullet\; \int_{a}^{b}f(y)dy = \int_{a}^{b}f(x)dx$$
And we also used  $$\displaystyle \bullet\; \int_{a}^{b}f(x)dx = -\int_{b}^{a}f(x)dx$$
Now Put value of $\displaystyle J$ in $\displaystyle I\;,$ So we get
$$\displaystyle I = \int_{0}^{2}\frac{\ln x}{x^2+4}dx+\int_{0}^{2}\frac{\ln 4}{x^2+4}dx-\int_{0}^{2}\frac{\ln x}{x^2+4}dx$$
So we get $$\displaystyle I = \ln 4\cdot \left[\tan^{-1}\left(\frac{x}{2}\right)\right]_{0}^{2} = \ln (4)\cdot \frac{1}{2}\cdot \frac{\pi}{4}= \frac{\ln (2)\cdot \pi}{4}$$
</s>