Here is another solution using calculus. (Since this topic is started in the Calculus section, I presume it is okay to use calculus. )

$\displaystyle f(x)\,=\,\arctan\left(\frac1x\right)+\arctan x$

$\displaystyle \implies\ f'(x)\,=\,\frac{-\frac1{x^2}}{1+\left(\frac1x\right)^2}+\frac1{1+x^ 2}$

$\displaystyle =\,\frac{-1}{1+x^2}+\frac1{1+x^2}$

$\displaystyle =\,0$

Hence $\displaystyle f$ is constant over any interval on which it is continuous. Since it is continuous over $\displaystyle (0,\,\infty)$ and over $\displaystyle (-\infty,\,0),$ determine the constant value of $\displaystyle f$ in each of these two invervals. For example, for $\displaystyle x>0,$ we have $\displaystyle f(1)=\arctan1+\arctan1=\frac\pi2$ and so $\displaystyle f(x)=\frac\pi2$ for all $\displaystyle x>0.$ Do the same thing for the negative interval.