I was surprised to discover that
$$\frac{d}{dx}\arcsin(x)=\frac{1}{\sqrt{1-x^2}}$$
$$\frac{d}{dx}\arccos(x)=\frac{-1}{\sqrt{1-x^2}}$$
This would seem to imply $\arcsin=-\arccos$ up to a constant, but then I discovered the identity
$$\arcsin(x)+\arccos(x)=\frac{\pi}{2}$$
and then it all made sense.
As a consequenc, if I am integrating $\frac{\pm 1}{\sqrt{1-x^2}}$ I can arbitrariy pick either $\arcsin$ or $\arccos$ as an antiderivative. So far so good.
I then discovered that, similarly,
$$\frac{d}{dx}\arctan(x)=\frac{1}{1+x^2}=-\frac{d}{dx}\mathrm{arccot}(x)$$
and assumed the explanation would be the same. But I sanity-checked it, and it turns out
$$\arctan(x)+\mathrm{arccot}(x)=\pm\frac{\pi}{2}$$
is not a constant.
So, if I am integrating $\frac{1}{1+x^2}$, how do I pick an antiderivative?
The derivatives are $$\DeclareMathOperator{\arccot}{arccot} \arctan'x=\frac{1}{1+x^2} \qquad \arccot'x=-\frac{1}{1+x^2} $$ This of course implies that $$ f(x)=\arctan x+\arccot x $$ is constant. Since $f(0)=\arctan0+\arccot0=\pi/2$, we can conclude that $$ \arctan x+\arccot x=\frac{\pi}{2} $$