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}.$$
 A: $$I=\int \left(\frac{\log x-1}{1+(\log x)^2}\right)^2\,dx=\int \frac{1+(\log x)^2-2\log x}{(1+(\log x)^2)^2}\,dx$$ 
$$\Rightarrow I=\int \left(\frac{1}{1+(\log x)^2}-\frac{2\log x}{(1+(\log x)^2)^2}\right)\,dx$$
Use the substitution $\log x=u \Rightarrow dx=e^u\,du$ to get:
$$I=\int e^u\left(\frac{1}{1+u^2}-\frac{2u}{(1+u^2)^2}\right)\,du$$
Since $\displaystyle \int e^u(f(u)+f'(u))\,du=e^uf(u)+C$, here $f(u)=1/(1+u^2)$, hence
$$I=\frac{e^u}{1+u^2}+C=\frac{x}{1+(\log x)^2}+C$$
$\blacksquare$
A: 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.
