The principal value of $\tan^{-1}\theta$ is always between $-\frac{\pi}2$ and $\frac{\pi}2$. The principal value of $\arg z$, on the other hand, is always in the interval $(-\pi,\pi]$. Thus, for $z$ in the first quadrant it’s between $0$ and $\frac{\pi}2$; for $z$ in the second quadrant it’s between $\frac{\pi}2$ and $\pi$; for $z$ in the third quadrant it’s between $-\frac{\pi}2$ and $-\pi$; and for $z$ in the fourth quadrant it’s between $0$ and $-\frac{\pi}2$. This means that the $\tan^{-1}$ function gives you the correct angle only when $z$ is in the first and fourth quadrants.

When $z$ is in the second quadrant, you have to find an angle between $\frac{\pi}2$ and $\pi$ that has the same tangent as the angle $\theta$ returned by the $\tan^{-1}$ function, which satisfies $-\frac{\pi}2<\theta\le 0$. The tangent function is periodic with period $\pi$, so $\tan(\theta+\pi)=\tan\theta$, and $$\frac{\pi}2=-\frac{\pi}2+\pi<\theta+\pi\le0+\pi=\pi\;,$$ so $\theta+\pi$ is indeed in the second quadrant.

When $z$ is in the third quadrant, you have to find an angle between $-\pi$ and $-\frac{\pi}2$ that has the same tangent as the angle $\theta$ returned by the $\tan^{-1}$ function, which satisfies $0\le\theta<\frac{\pi}2$. This time **subtracting** $\pi$ does the trick: $\tan(\theta-\pi)=\tan\theta$, and

$$-\pi=0-\pi<\theta-\pi<\frac{\pi}2-\pi=-\frac{\pi}2\;.$$

There’s just one slightly tricky bit. If $z$ is a negative real number, should you consider it to be in the second or in the third quadrant? The tangent is $0$, so the $\tan^{-1}$ function will return $0$. If you treat $z$ as being in the second quadrant, you’ll add $\pi$ and get a principal argument of $\pi$. If instead you treat $z$ as being in the third quadrant, you’ll subtract $\pi$ and get a principal argument of $-\pi$. But by definition the principal argument is in the half-open interval $(-\pi,\pi]$, which does not include $-\pi$; thus, you **must** take $z$ to be in the second quadrant and assign it the principal argument $\pi$.

more rigorous solution which specifically bases on $\operatorname{Arg}(z)=\arctan(y/x)+\pi$?

The problem with using $\arctan(y/x)$ is that it's actually continuous across the negative real axis; its discontinuities are along the imaginary axis.

To make the branch cut you want, the definition should be like this:
$$ \operatorname{Arg}(z)=\begin{cases} \arctan(y/x),\quad &x>0
\\
\arctan(y/x) + \pi,\quad &x<0, \ y>0 \\
\arctan(y/x) - \pi,\quad &x<0, \ y<0 \\
\pi/2,\quad &x=0, \ y>0 \\
-\pi/2,\quad &x=0, \ y<0
\end{cases}$$

You can check that these pieces match on both halves of the imaginary axis. Along the negative real axis, $\arctan(y/x)$ is continuous but $\pi$ clashes with $-\pi$.

As for the paths, two vertical paths will do

- Along $x=x_0$, $y=y_0+t$, where $t\to 0^+$, we get $\operatorname{Arg} \to \pi$
- Along $x=x_0$, $y=y_0+t$, where $t\to 0^-$, we get $\operatorname{Arg} \to -\pi$

## Best Answer

The complex argument is an equivalence, and is generally written as $\theta \mod 2\pi$, although other notations are also used, such as $\mathbb{R}/2\pi\mathbb{Z}$ at Wikipedia.