In one of my calculations I arrived at the expression $$i\cdot(\arctan(\frac{y}{x})+\arctan(\frac{x}{y}))$$ I know that $$\arctan(\frac{y}{x})=Arg(z)$$ is there something similar for $\arctan(\frac{x}{y})$ ?

I have tried writing $\theta=\arctan(\frac{y}{x})$, taking $\tan$ of both sides, doing $1/$ of both sides and then take the $\arctan$of both sides to get to $\arctan(\frac{x}{y})$ but that didn't get me anything nice - it got me $\arctan(\frac{1}{\tan(\theta)})$

Can anyone please suggest a link between the argument of something related to $z$ and $\arctan(\frac{x}{y})$ ?

  • 3
    $\begingroup$ Here is an identity $\arctan(1/x)+\arctan(x)=\frac{\pi}{2}$. $\endgroup$ – Mhenni Benghorbal Apr 17 '13 at 20:16

We know this result from analysis $$\arctan\left(\frac{y}{x}\right)+\arctan\left(\frac{x}{y}\right)=\mathrm{sign}\left(\frac{y}{x}\right)\frac{\pi}{2}=\pm\frac{\pi}{2}$$

To see this result with a geometric explication: Multiply a complex number $z$ by $e^{i\theta}$ rotate this number by an angle $\theta$.

If $z=x+iy$ then $iz=e^{i\pi/2}z=-y+ix$ so \begin{align}&\arctan\left(\frac{y}{x}\right)=Arg(z)\\ &\arctan\left(\frac{x}{y}\right)=-\arctan\left(\frac{x}{-y}\right)=-Arg(iz)=\left\{\begin{array}{l}-(\frac{\pi}{2}+Arg(z))\\ -(\frac{\pi}{2}+Arg(z)-\pi)\end{array} \right.\end{align} and the last result is justified by the fact $Arg(z)$ is the principal argument of $z$ so it belongs to $(-\pi,\pi]$, hence we find


  • $\begingroup$ One can compute the derivative of $f(x)=\arctan x+\arctan(1/x)$, which is zero; thus the function is constant in each connected component of its domain. Since $f(-1)=-\pi/2$ and $f(1)=\pi/2$ we have the result. $\endgroup$ – egreg Apr 17 '13 at 21:35
  • $\begingroup$ Yes this is a way to prove this equality. $\endgroup$ – user63181 Apr 17 '13 at 21:37
  • $\begingroup$ Some years ago, in the finals for high schools in my country (a nationwide exam), a question was "Prove that $\arctan x + \arctan\frac{1}{x}$ is constant". :( $\endgroup$ – egreg Apr 17 '13 at 21:39
  • $\begingroup$ The exam's questions are unforgettable :) $\endgroup$ – user63181 Apr 17 '13 at 21:46

Let $z=x+iy$. Then $Arg(z)=\arctan(\frac{y}{x})$ , as you have written.

What is the relationship of $arctan(\frac{x}{y})$ with $Arg(z)$?

First, observe that it is the argument of the complex number $w=y+ix$, which the symmetric of z, with respect to the line $y=x$.

If you make a simple sketch, you will be able to see easily that:

$$Arg(w)=Arg(z)+2(\dfrac{\pi}{4}-Arg(z))$$ $$=\dfrac{\pi}{2}-Arg(z)$$


If $x=y=0,$ from here, both the inverse functions are undefined.

If $x\ne y=0, \arctan \frac xy=\arctan \frac x0=$ sgn $(x)\cdot\frac\pi2$

If $xy\ne0,$

we know the general value of $\arctan a+\arctan b$ is $n\pi+\arctan\left(\frac{a+b}{1-ab}\right)$ where $n$ is any integer

So, the general value of $\arctan \frac xy+\arctan \frac yx$ will be

$n\pi+\arctan\left(\frac{\frac yx+\frac xy}{1-\frac yx \cdot\frac xy}\right)$ $=n\pi+\arctan \left(\frac{\frac{x^2+y^2}{xy}}0\right)$ $=n\pi+$sgn$(xy)\cdot\frac\pi2$

As the principal value lies in $\in(-\pi,\pi],$ the principal value of $\left(\arctan \frac xy+\arctan \frac yx\right)$ will be sgn$(xy)\cdot\frac\pi2$

Reference: A question about the arctangent addition formula.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.