Answer: If x<0, the identity does not always hold.
Step-by-step explanation:
If [tex]0 < \theta < \frac{\pi}{2}[/tex], let [tex]\arctan x=\theta[/tex], implying [tex]x=\tan \theta[/tex], and vice versa.
We know that [tex]\tan \left(\frac{\pi}{2}-\theta \right)=\cot \theta=\frac{1}{\tan \theta}[/tex], so this means that if we let [tex]\tan \theta=x[/tex]
[tex]\tan \left(\frac{\pi}{2} -\theta \right)=\frac{1}{x}\\\frac{\pi}{2}-\theta=\arctan \left(\frac{1}{x} \right)\\\theta+\arctan \left(\frac{1}{x} \right)=\frac{\pi}{2}[/tex]
Substituting back, we obtain that [tex]\arctan (x)+\arctan \left(\frac{1}{x} \right)=\frac{\pi}{2}[/tex], as required.