Notice, substitute $\text{u}=\text{f}\left(\text{x}\right)$ and $\text{d}\text{u}=\text{f}\space'\left(\text{x}\right)\space\text{d}\text{x}$:
$$\int\frac{\text{f}\space'\left(\text{x}\right)}{\text{f}\left(\text{x}\right)}\space\text{d}\text{x}=\int\frac{1}{\text{u}}\space\text{d}\text{u}=\ln\left|\text{u}\right|+\text{C}=\ln\left|\text{f}\left(\text{x}\right)\right|+\text{C}$$
Now, when:
$$\text{f}\left(\text{x}\right)=\arctan\left\{x+\frac{1}{x}\right\}$$
And:
$$\text{f}\space'\left(\text{x}\right)=\frac{x^2-1}{x^4+3x^2+1}$$
So, when you want to prove the result:
$$\int\frac{\frac{x^2-1}{x^4+3x^2+1}}{\arctan\left\{x+\frac{1}{x}\right\}}\space\text{d}\text{x}=\int\frac{x^2-1}{\left(x^4+3x^2+1\right)\arctan\left\{x+\frac{1}{x}\right\}}\space\text{d}\text{x}=\ln\left|\arctan\left\{x+\frac{1}{x}\right\}\right|+\text{C}$$