How to prove that ${\int}\big[\frac{\log x -1}{1 + (\log x)^2}\big]^2\,dx =\frac{x} {(\log x)^2 +1}.$ How to prove that: $${\int}\left[\frac{\log x -1}{1 + (\log x)^2}\right]^2\,dx =\frac{x} {(\log x)^2 +1}.$$

The easy way to prove that some expression $A(x)$ is the indefinite integral of some other expression $B(x)$ is to differentiate $A(x)$ and show that the answer is $B(x)$.  Here, using the quotient rule,
$$
\frac{d}{dx} \frac{x}{1+(\log x)^2} = \frac{1\cdot \left(1+(\log x)^2 \right) - x \frac{d}{dx}\left(1+(\log x)^2 \right) }{\left(1+(\log x)^2 \right)^2 }
$$
And using the chain rule to differentiate $(\log x)^2$,
$$
\frac{d}{dx} \frac{x}{1+(\log x)^2} = \frac{ 1+(\log x)^2  - x \frac{1}{x} 2 \log x  }{\left(1+(\log x)^2 \right)^2 } = \frac{ 1 - 2 \log x + (\log x)^2    }{\left(1+(\log x)^2 \right)^2 }
$$
$$
\frac{d}{dx} \frac{x}{1+(\log x)^2} = = \frac{ \left( 1 - \log x \right)^2   }{\left(1+(\log x)^2 \right)^2 }
$$
as wanted.
