I need to prove that:

$ \arctan{\dfrac{1}{x}}=\dfrac{\pi}{2}- \arctan{x}, \forall x>0$.

Now, I assumed $\arctan{\dfrac{1}{x}}=\arccot{x}$. So, I've tried to do this:

$\cot{y}=x \implies y=arccot{x} \\ \tan{y}=\dfrac{1}{\cot{y}}=\dfrac{1}{x} \implies y=\arctan{\dfrac{1}{x}} \\ \implies \arccot{x}=\arctan{\dfrac{1}{x}}$. I've tried to put in some numbers and it seems that it workes for every real number.

Also, $\tan{(\dfrac{\pi}{2}-y)}=\cot{y}=x \implies \dfrac{\pi}{2}-y=\arctan{x} \land y=\arccot{x} \\ \implies \arctan{x}+\arccot{x}=\dfrac{\pi}{2}$, which also works for every real number. But, why is it then when you plug in $\arccot{x}=\arctan{\dfrac{1}{x}}$ in the second equation, it doesn't work for every x. But, the first equation and the second equation work for every real number but their combination doesn't. I know that my approach wasn't that good anyway, but I didn't know what else to do to prove this.