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

I know that two questions have already been asked about this exercise, but what I'm asking here is if this solution, which sounds rather strange to me, could possibly be correct. The problems is as follows:

Prove that $\,f(x)=\arctan(x)+\arctan(1/x)= \pi/2\,$ if $\,x>0\,$ and $\,-\pi/2\,$ if $\,x<0$.

What I did was this: first of all we note that, since $-\pi/2<\arctan y<\pi/2$ for all $y$, $-\pi<f(x)<\pi$. Now , consider $$ \tan\big(f(x)\big) = \tan\left(\arctan(x)+\arctan\left(\frac{1}{x} \right)\right) = \frac{\tan\left(\arctan(x)\right) + \tan\left(\arctan\left(\frac{1}{x} \right)\right)} {1 - \tan\big(\arctan\left(x\right)\big) \tan\left(\arctan\left(\frac{1}{x} \right)\right)}=\frac{x+(1/x)}{0}, $$ which is undefined. Since the tangent function is undefined, in $[-\pi, \pi]$, if and only if its argument is $\pm \pi/2$, then $f(x)=\pm \pi/2$. It's easy to see that if $x<0$, then $\arctan(x)<0$, hence $f(x)=-\pi/2$ and viceversa.

I have found a few other solution to this problem, but I wanted to know if this one is logically acceptable.


Solution 1:

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

Solution 2:

I just figured I'd throw this in.

Let $f(x) = \arctan(x) + \arctan(1/x)$ for all $x \in (0, \infty)$.

Then $f'(x) = \dfrac{1}{1+x^2} - \dfrac{\dfrac{1}{x^2}}{1 + \dfrac{1}{x^2}} = 0$.

Hence $f(x)$ is constant on $(0, \infty)$.

Since $f(1) = \dfrac{\pi}{4} + \dfrac{\pi}{4} = \dfrac{\pi}{2}$, we conclude that

$f(x) = \dfrac{\pi}{2}$ for all $x \in (0, \infty)$.


Addendum

If you're not ready for calculus, for the same $x \in (0, \infty)$, Consider the point $P = (1, x)$, in the first quadrant, with corresponding angle $0 \lt \theta \lt \dfrac{\pi}{2}$.

Let $\hat{\theta} = \dfrac{\pi}{2} - \theta$. Then, also, $0 \lt \hat{\theta} \lt \dfrac{\pi}{2}$ and $\tan(\hat \theta) = \tan \left( \dfrac{\pi}{2} - \theta \right) = \cot \theta = \dfrac 1x$

It follows that $\arctan x + \arctan \dfrac 1x = \theta + \hat \theta = \dfrac{\pi}{2}$


For all $x \in (-\infty, 0)$, we have

$\arctan x + \arctan \dfrac 1x = -\left(\arctan(-x) + \arctan \left(-\dfrac 1x \right) \right) = -f(-x) = -\dfrac{\pi}{2}$.

Solution 3:

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)]

Solution 4:

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 $.