Proving an equality on $\arctan x$ To demonstrate the following equality
\begin{equation}
\arctan x=\pi/2- \arctan(1/x)
\end{equation}
I have proceeded in this way. I know that
\begin{equation}
\arctan x= \int \frac{1}{1+x^2} dx + C
\end{equation}
But:
\begin{equation}
\int \frac{1}{1+x^2} dx=\int \frac{1}{x^2(1+1/x^2)} dx=-\int \frac{1}{1+t^2} dt
\end{equation}
with $t=1/x$. Then:
\begin{equation}
\arctan x= -\arctan\left(\frac{1}{x}\right)+C
\end{equation}
And if we apply the limit
\begin{equation}
\lim_{x\rightarrow0}\ \arctan x=\lim_{x\rightarrow0}\ -\arctan\left(\frac{1}{x}\right)+C
\end{equation}
we obtain: $C=\pi/2$.
What do you think of my proof? Write down your ideas, I'm curious and I want to compare myself with you.
Thank you very much.
 A: Let $f(x) = \arctan x$. Then $f'(x) = \frac{1}{1+x^2}$. Let $\phi(x) = f(\frac{1}{x})$, then $\phi'(x) = f'(\frac{1}{x}) (- \frac{1}{x^2}) = - \frac{1}{1+x^2}$.
Hence $f'(x)+\phi'(x) = 0$, and so $x \mapsto f(x)+\phi(x)$ is constant on $(-\frac{\pi}{2}, \frac{\pi}{2})$. Since $f(1) = \phi(1) = \frac{\pi}{4}$, we have the desired result.
A: $$\tan(\pi/2- \arctan(1/x))=\frac{\sin(\pi/2- \arctan(1/x))}{\cos(\pi/2- \arctan(1/x))}=\frac{\cos (\arctan(1/x)}{\sin(\arctan(1/x))}$$
$$=\frac{1}{\tan(\arctan(1/x))}=\frac{1}{1/x}=x$$
Note: The proof doesn't end here, since $\tan(x)$ is not 1-1.
But $\arctan(1/x) \in (-\frac{\pi}{2}, \frac{\pi}{2}) \Rightarrow \frac{\pi}{2}-\arctan(1/x) \in (0, \pi)$.
One needs to split the problem now into $\frac{\pi}{2}-\arctan(1/x) $ into QI and QII, that is into $x>0$ and $x<0$.
A: Assume $0<x<\infty$ and put $\arctan x=:\alpha\in\ ]0,{\pi\over2}[\ $. It follows that $$\tan\biggl({\pi\over2}-\alpha\biggr)={1\over\tan\alpha}={1\over x}>0\ .$$
As ${\pi\over2}-\alpha\in \ ]0,{\pi\over2}[\ $ as well we therefore can conclude that
$$\arctan{1\over x}={\pi\over2}-\alpha\ .$$
In this way we obtain
$$\arctan x+\arctan{1\over x}={\pi\over2}\qquad(x>0)\ .$$
For $x<0$ this equality is false, as is exemplified putting $x:=-1$, giving $-{\pi\over2}$ on the left hand side.
