Proving that $\arctan(x)+\arctan(1/x)=\pm \pi/2$, could this line of reasoning possibly be correct?

Right triangle with legs $1$ and $x$, just remembering the sum of all the angles of a triangle, is $\pi$. In case of a right triangle, $\alpha+\beta={\pi\over2}$ for any $x$.

enter image description here


Whatever you have done is correct and nothing is wrong there.You could get the same as follows also: Note that : $\tan^{-1}x=\tan^{-1}1/x -\pi$, when $x\lt0$...(A) and is equal to $\tan^{-1}1/x$ when $x\gt0$..(B)

PROOF:I am proving for $x$ being negative.For +ve $x$ it's quite easy to prove.

Suppose, $y=-z$, ($z$ is positive ), hen $\cot^{-1}(y)=\cot^{-1}(-z)=\pi -\cot^{-1}(z)$ Now you might be knowing :$\cot^{-1}(z)=\tan^{-1}(1/z)$ for positive $z$, hence $\cot^{-1}(-z)=\pi - \tan^{-1}(1/z)$. Now substitue $z=-y$, then use $\tan^{-1}(-1/y)=-\tan^{-1}(1/y)$ and you get the result.

Now you may argue: why $\cot^{-1}(-z)=\pi-\cot^{-1}z$?

Well, it's because :Let $z=\cot\theta$, $0<\theta<\pi$[principal branch of $\cot$]. So $-z=\cot(\pi-\theta)$ , Note that $\pi- \theta$ is also in between $0$ and $\pi$. So you can define $\cot^{-1}(-z)$, which in this case will be: $\pi -\theta$, Now put $\theta=\cot^{-1}(z)$, Hence proved.

So coming to: $\tan^{-1}x +\tan^{-1}1/x=I$, say

So $I=\tan^{-1}x +\cot^{-1}x=\pi/2$, when $x\gt0$ [by (B)]

And $I=\tan^{-1}x +\cot^{-1}x-\pi=\pi/2-\pi=-\pi/2$, when $x \lt0$ [by (A)]


Here's a proof in the case when $x > 0$.

Draw a right triangle with legs $1$ and $x$, with the leg of length $x$ opposite angle $A$.

Then $\tan(A) = x$ and $\tan(B) = 1/x$, so $A = \arctan(x)$ and $B = \arctan(1/x)$.

Since $A+B = \pi/2$, $\arctan(x)+\arctan(1/x) = \pi/2 $.