Given the complex number $x+y\mathrm{i} = -3\mathrm{i}$, I want to calculate the polar form $r\mathrm{e}^{\varphi\mathrm{i}}$ using this definition for $\varphi$:
$\varphi = \begin{cases} \arctan(\frac y x) &\text{if } x > 0, \\ \arctan(\frac y x) + \pi &\text{if } x < 0 \text{ and } y \ge 0, \\ \arctan(\frac y x) - \pi &\text{if } x < 0 \text{ and } y < 0, \\ +\frac{\pi}{2} &\text{if } x = 0 \text{ and } y > 0, \\ -\frac{\pi}{2} &\text{if } x = 0 \text{ and } y < 0. \end{cases}$
so, if I understand correctly, since $x=0$ and $y = -3 < 0$, $\varphi$ should be $-\frac{\pi}{2}$ in this case, yielding
$3\mathrm{e}^{-\frac{\pi}{2}\mathrm{i}}$
but instead, the correct answer seems to be
$3\mathrm{e}^{\frac{3\pi}{2}\mathrm{i}}$.
I cannot see where I made the mistake and would be happy if you could help me with showing why exactly (and where) I am wrong. Thanks in advance.
It is only a matter of definition for the principal argument.
It can be
or
Thus both the polar form represent the same complex number $-3i$.