I have $-1 + \tan(3)i$ and must find its modulus and its argument. I tried to solve it by myself for hours, and then I looked at the answer, but I am still confused with a part of the solution.
Here is the provided solution: $\begin{align} z &= -1 + \tan(3)i \\ &= -1 + \frac{\sin(3)}{\cos(3)}i \\ &= \frac1{\left|\cos(3)\right|} ( \cos(3) + i(-1)\sin(3)) \\ &= \frac1{\left|\cos(3)\right|} e^{-3i} \\ &= \frac1{\left|\cos(3)\right|} e^{(2\pi-3)i} \end{align}$
I don't understand how we get to $ \frac1{\left|\cos(3)\right|}(\cos(3) + i(-1)\sin(3)) $ How did they get this modulus $1/|\cos(3)|$, and the $-1$ in the imaginary part? How did they reorder the previous expression to obtain this?
I also don't see why they developed the last equality. They put $2\pi-3$ instead of $-3$; OK, it is the same, but what was the aim of a such development?
Thanks!