Why is the definite integral of $\int_{1}^{\infty} \frac {\ln (1+x^2)}{x^2}$ equal $\frac{\pi}{2} + \ln(2)$? I currently have a question on why when you partially integrate the definite integral.
$$\int_{1}^{\infty} \frac {\ln (1+x^2)}{x^2} = \frac{\pi}{2} + \ln(2) $$
I obtained this result via plugging it into a WolframAlpha right after partially integrating the function by hand. Though what confuses me and makes me curious is why $\frac{\pi}{2}$ is one of the results of it, rather than anything that has nothing to do with trigonometrical equations on the surface. Is there any identity i was not aware of ?
Anyone that can provide an answer is thanked in advance.
 A: 
For fun :)

Let
$$I(y) = \int_{1}^{\infty} \frac {\ln (1+y x^2)}{x^2}\mathrm dx$$
Then, we need to find $I(1)$.
Differentiate with respect to $y$:
$$\begin{align}
I'(y) &= \int_1^\infty \frac{x^2}{(1+yx^2)x^2}\mathrm dx \\
&= \int_1^\infty \frac{\mathrm dx}{1+(x\sqrt y)^2} \\
&= \frac{1}{\sqrt y}\arctan(x\sqrt y)\bigg|_1^\infty\\
&=\frac{\pi}{2\sqrt y}-\frac{\arctan(\sqrt y)}{\sqrt y}\end{align}$$
Integrate to find $I(y)$:
$$\begin{align}
I(y) &= \int \frac{\pi}{2\sqrt y}-\frac{\arctan(\sqrt y)}{\sqrt y}\mathrm dy \\
&= \pi\sqrt y - 2\sqrt y\arctan(\sqrt y) + \ln(1+y) + C\end{align}$$
Since $I(0) = \int 0 = 0$, we must have $C \equiv 0$. Therefore $$I(y) = \pi\sqrt y - 2\sqrt y\arctan(\sqrt y) + \ln(1+y)$$ Thus
$$\boxed{I(1) = \frac{\pi}{2} + \ln 2}$$
A: It comes from the integration by part with $u = \ln(1+x^2), v = -\dfrac{1}{x}$. You can work it out and see the $\pi$ comes up.
A: The derivative of $\ln(1+x^2)$ is $\frac{2x}{1+x^2}$.  The integral of $\frac{1}{x^2}$ is $\frac{-1}{x}$.  If you integrate by parts, you get $\frac{1}{1+x^2}$ with integral arctangent $x$.
