Question: Let $z=a+ib.$ Why does the following formula not hold in general?
$$\mathrm{Arg}(z)=\arctan\left(\frac ba\right)$$
Answer: Suppose that $b<0.$
Then $Z \text{ lies in quadrant }2\;\text{or}\;3.$
So $\;\mathrm{Arg}(z)>\frac{\pi}2\quad\text{or}\quad\mathrm{Arg}(z)<-\frac{\pi}2.$
But since $-\frac\pi2<\arctan\left(\frac ba\right)<\frac\pi2,\quad\mathrm{Arg}(z)$ cannot possibly equal $\arctan\left(\frac ba\right).$
There are several compact formulae for $\mathrm{Arg}(z)$, one of which is $$\mathrm{Arg}\left(a+ib\right)=\begin{cases}
\quad\arccos \left(\frac a{\sqrt{a^2+b^2}}\right) \text{ if } b\geq0;\\
-\arccos \left(\frac a{\sqrt{a^2+b^2}}\right) \text{ if } b<0.\end{cases}$$
However, it is easiest to just use an Argand diagram:
- locate the angle between $OZ$ and its projection on the real axis;
- evaluate it by taking $\arctan$ of the corresponding ratio of
lengths;
- take the adjacent supplementary angle iff Re$(z)<0;$
- assign a negative sign iff the resultant angle is directed clockwise from the positive real axis;
- the desired principal argument is thus obtained.
For example, $$\mathrm{Arg}\left(-2-3i\right)\\=-\left[\pi-\arctan\left(\frac32\right)\right]\\=\arctan\left(\frac32\right)-\pi.$$