How do you solve $\int_0^\infty \frac {\log(x)} {1+x^2} dx $ ?Explain your motivation and thought process. Although i already know its solution, which is by substituting $x=\frac{1}{t}$,which will leads to the result:
$$\int_0^1 \frac{\log(x)}{1+x^2} dx=-\int_1^\infty \frac{\log(x)}{1+x^2} dx,$$
which solves the question i.e.
$$\int_0^\infty \frac {\log(x)} {1+x^2} dx =0.$$
But what i want to know is that if anyone could solve it in a new way or method then please share you motivation and thought process behind the solution.
 A: $$\int_0^\infty \frac {\ln x} {1+x^2} dx 
= \frac d{da} \bigg(\int_0^\infty \frac {x^{a-1}} {1+x^2} dx \bigg)_{a=1}
 = \frac\pi2 \frac d{da} \csc\frac{a\pi}2\bigg|_{a=1}=0
$$
A: A way with complex analysis techniques is the following:
Choose the branch cut of complex logarithm as $[0, \infty)$ so that $\Im\log z \in [0, 2\pi)$. Then consider the function
$$ f(z) = \frac{\log^2 z}{z^2 + 1}, $$
where $\log^2 z = (\log z)^2$ is the square of the logarithm. Then using the keyhole contour $C$ described as in the following picture
$\hskip{2in}$ 
we find that
\begin{align*}
\oint_{C} f(z) \, \mathrm{d}z
&= 2\pi i \left( \underset{z=i}{\operatorname{Res}} f(z) + \underset{z=-i}{\operatorname{Res}} f(z) \right) \\
&= \frac{\pi}{1} \left( \left(\log 1 + \frac{i\pi}{2} \right)^2 - \left(\log 1 + \frac{3i\pi}{2} \right)^2 \right) \\
&= \frac{2\pi^3}{1} - \frac{2\pi^2 i \log 1}{1}=2\pi^3. \tag{1}
\end{align*}
On the other hand, shrinking the inner circle $\gamma$ to the origin and letting the outer circle $\Gamma$ to the infinity, it follows that
$$ \oint_{C} f(z) \, \mathrm{d}z \xrightarrow[\substack{\gamma \to 0 \\ \Gamma \to \infty}]{} \int_{0}^{\infty} \frac{\log^2 x}{x^2 + 1} \, \mathrm{d}x - \int_{0}^{\infty} \frac{(\log x + 2\pi i)^2}{x^2 + 1} \, \mathrm{d}x. \tag{2} $$
Comparing imaginary parts of $\text{(1)}$ and $\text{(2)}$, it follows that
$$ \int_{0}^{\infty} \frac{\log x}{x^2 + 1} \, \mathrm{d}x = \frac{\pi \log 1}{2}=0. $$
A: Let $x=\tan t$ then the given integral becomes $I=\int_{0}^{\pi/2} \tan t dt= \int_{0}^{\pi/2} \sin t dt - \int_0^{\pi/2} \cos t dt=0$,
by virtue of the property $\int_0 ^a f(x) dx=\int_0^a f(a-x) dx$.
