# How to prove that $\tan^{-1}(x)+\tan^{-1}(\dfrac{1}{x})=\pi/2$? [duplicate]

How to prove that $$\tan^{-1}(x)+\tan^{-1}(\dfrac{1}{x})=\pi/2?$$

I have tried to use $$\tan^{-1}(x)+\cot^{-1}(x)=\pi/2.$$ But I do not know how to go further.

• How about drawing a right triangle with base of length $1$ and height of length $x$? – Sangchul Lee Oct 6 '16 at 19:29
• 7 persons have given answers : very well ; but noone seems to know that it is a very classical question which has answers everywhere ; among many, here is a reference: (math.stackexchange.com/q/720517). – Jean Marie Oct 6 '16 at 19:36
• – lab bhattacharjee Oct 7 '16 at 8:16

Hint: compute the derivative of $f:(0,+\infty)\longrightarrow\mathbb{R},\quad x\mapsto \tan^{-1}(x) + \tan^{-1}\left(\frac{1}{x}\right)$.

• Thank you for the hint. However, I got $f'=0$, so $f=constant$. And plug in $x=1$, I got $f=\pi/2$ a,d plug in $x=-1$, I got $f=-\pi/2$. So this proof problem is not right? I also use Wolfram Alpha to plotted it out and it does show a step function. – Nan Oct 6 '16 at 19:13
• Yes, $f$ is a constant, so it's always equal to $f(1)$, which is $\frac{\pi}{4}$. – Augustin Oct 6 '16 at 19:15
• $f' = 0$ means $f$ is constant on any interval on which it is defined. But $f$ is undefined at $0$, so it is only constant on $(0,\infty)$ and $(-\infty,0)$ (and it takes different values on the different intervals). – arkeet Oct 6 '16 at 19:17
• Yes, the formula is only valid for $x>0$. – Augustin Oct 6 '16 at 19:19

Another way (assuming $x>0$):

\begin{align*} \arctan x+\arctan\frac1x&= \int_0^x\frac{dt}{1+t^2}+\int_0^{1/x}\frac{dt}{1+t^2}= \int_0^x\frac{dt}{1+t^2}+\int_{x}^{\infty}\frac{dt}{1+t^2}\\ &=\int_0^\infty\frac{dt}{1+t^2}= \lim_{t\to\infty}\arctan(t)-\arctan(0)= \frac\pi2. \end{align*}

We have used the change of variable $x\mapsto 1/x$ in the second integral.

• For the change of variables part, why it is not from $\infty$ to $x$? – Nan Oct 6 '16 at 19:40
• It is indeed from $\infty$ to $x$, but the derivative of $1/x$ has a minus sign, so I reversed the limits. – user246336 Oct 6 '16 at 19:42

I think first equality should be $\;\;\cfrac\pi2\cdot\text{sign}(x)\;$

Presumably $x > 0$; otherwise this is false.

Hint: Write $x = \tan\theta$, with $0 < \theta < \pi/2$. Then you can rewrite the equation as $$\tan^{-1}(1/\tan\theta) = \pi/2 - \theta$$ which (since both sides are between $-\pi/2$ and $\pi/2$) is equivalent to $$1/\tan\theta = \tan(\pi/2 - \theta).$$ How can you show this?

Start with a right-angled triangle $ABC$, as shown below.

Looking at the angle $\angle BAC$ we have $\tan \theta = \frac{x}{1}$.

Looking at the angle $\angle ACB$ we have $\tan(\frac{1}{2}\pi-\theta)=\frac{1}{x}$.

Hence $\theta = \arctan x$ and $\frac{1}{2}\pi-\theta=\arctan \frac{1}{x}$, and so $$\arctan x + \arctan \tfrac{1}{x} = \tfrac{1}{2}\pi$$  (This space intentionally left blank.)