Let θ=cos-1((x2-1)/(x2+1)), so (x2-1)/(x2+1)=cosθ making tanθ=2x/(x2-1) (Pythagoras).
(We have a right triangle with hypotenuse length =x2+1 and the other two side lengths are 2x and x2-1.)
So tan(-θ)=-tanθ=2x/(1-x2). Therefore tan-1(2x/(1-x2)=-θ.
The given expression becomes xθ-θ or θ(x-1). If x=1 the expression becomes zero.