This question is mostly out of curiosity, but I hope that the answer will advance my understanding of the trigonometric function. While playing around with trigonometric functions on WolframAlpha I stumbled upon this $$\cot(2\arctan(Ax))=\frac{1-(Ax)^2}{2Ax}$$ I suspect that one could prove this using the complex forms of the trigonometric functions $\sin(z) = \dfrac{e^{iz}-e^{-iz}}{2i}$ but I myself do not know the complex form of $\arctan$ so I am unable to do this.
Is there some nice geometric or algebraic proof that explains why $\cot(2\arctan(Ax))=\frac{1-(Ax)^2}{2Ax}$? Or maybe, is WolframAlpha wrong and does $\cot(2\arctan(Ax))$ just happen to be very close to $\frac{1-(Ax)^2}{2Ax}$?