$$\cos 2a=\dfrac{\cos ^{2}a-\sin ^{2}a}{\cos ^{2}a+\sin ^{2}a}=\dfrac{1-\tan ^{2}a}{1+\tan ^{2}a}.$$ Edit: One must note that $\arctan x$ is an odd function , while $\arccos \frac{1-x^{2}}{1+x^{2}}$ is an even one. Only for $x\geq 0$ are both sides of $(1)$ equal. Identity $(2)$ is valid for both positive and negative values of $a$. Blue: $y=\arccos((1-x^2)/(1+x^2))$