Argument of $-1+\sqrt3i$ 
Find the Argument of $-1+\sqrt3 i$.

My book has given the answer is $\frac{2\pi}3$.
But I got $\frac{4\pi}3$.
Since $$\theta =\tan^{-1}(-\sqrt3)=\frac{-\pi}3$$ As it lies in the second quadrant therefore $$\theta =\pi-\frac{-\pi}3=\frac{4\pi}3$$
Where am I wrong? 
 A: The result of the inverse tangent function is only correct modulo $\pi$; this means that $\pi$ may have to be added to obtain the correct angle. Here $-\frac\pi3$ is in the fourth quadrant but the given complex number is in the second quadrant, so $\pi$ has to be added and this yields the correct answer:
$$-\frac\pi3+\pi=\frac{2\pi}3$$
Note that $\frac{4\pi}3$ is in the third quadrant, so it is wrong.
The function returning the correct argument of a complex number sometimes called atan2 in computer programming.
A: $$z=-1+\sqrt3i$$
$$z=x+yi$$
$$z=2(-\frac{1}{2}+\frac{\sqrt3}{2}i)$$
$$z=\cos\theta+\sin \theta i$$
$$\cos\theta=-\frac{1}{2}$$
$$\sin \theta=\frac{\sqrt3}{2}$$
Since we know that $\sin\theta$ is only positive in the first and second quadrant by inspection. So, we have two choices to make. 
Also, we know that $\cos\theta$ is negative in the second and third quadrant. By it, we can conclude that the angle must lie inside the second quadrant.
$$\theta=\arcsin \frac{\sqrt {3}}{2}$$
$$\theta=\frac{\pi}{3}$$
The $\theta$ that we have here is in the first quadrant.
To get the second quadrant which $\sin\theta$ is also positive. Utilizing $\pi-\theta$
By it,
$$\theta=\pi-\frac{\pi}{3}$$
$$\theta=\frac{2\pi}{3}$$
A: As you (correctly!) said yourself,

it lies in the second quadrant

but notice that the answer you proposed, $\color{red}{\displaystyle\frac{4\pi}{3}}$, is NOT in the second quadrant, but lies in the third quadrant. So you're contradicting yourself here, and that should've alerted you that something isn't right. On the other hand, the answer provided in the book is much more plausible, because it actually lies in the second quadrant, and in fact it is the correct answer.
Where are you wrong? On a meta-level, your mistake is blindly following meaningless (to you) rules. As for your mathematical steps, you were wrong twice: both when you said that
$$\color{red}{\theta=\tan^{-1}(-\sqrt3)}$$
and when you said that
$$\color{red}{\theta =\pi-\frac{-\pi}3=\frac{4\pi}3}.$$
First mistake: you knew that it isn't true anyway, since you went ahead and changed the angle, so you shouldn't have said that it's your $\theta$ in the first place.
Second mistake: why? Where does this "rule" come from? Do you understand why you should do that? Because if not, but you're just going thru the motions because somebody gave you the formula, you're bound to get wrong answers.
How should you approach such questions? You had all the right pieces! You need to find an angle $\theta$ satisfying the following two conditions:
$$\tan\theta=-\sqrt{3} \quad \text{and} \quad \theta\in\text{quadrant II}.$$
There are essentially two different angles on the unit circle (ignoring periodicity, i.e. let's not bother with "$+2\pi n$") whose tangent is $-\sqrt{3}$: they are $\displaystyle-\frac{\pi}{3}$ and $\displaystyle\frac{2\pi}{3}$. Which one of them lies on the second quadrant?
A: $-1+i\sqrt{3}=2\left(-\dfrac{1}{2}+i\dfrac{\sqrt{3}}{2}\right)=2\left(\cos\dfrac{2\pi}{3}+i\sin\dfrac{2\pi}{3}\right)$
A: Here's a foolproof way of finding the argument of a complex number.
First ignore all the signs of the imaginary and real parts. Take the ratio of the absolute values of the imaginary and the real parts and find the arctangent of that. In your case, that would be $\arctan \sqrt 3 = \frac{\pi}{3}$.
This is the reference angle (call it $\alpha$) of the argument, just like in "usual" trigonometry. The reference angle always lies in the first quadrant.
Now decide which quadrant the complex number lies in. Plot it on an Argand diagram (Cartesian plane). In this case, since the real value ($x$ axis) is negative and the imaginary value ($y$ axis) is positive, the number lies in the second quadrant.
For first quadrant, the argument equals the reference angle $\alpha$.
For second quadrant, the argument equals $\pi-\alpha$
For third quadrant, the argument equals $\pi+\alpha$. However, the principal value of the argument (by convention) lies in the interval $(-\pi, \pi]$. The equivalent value is then $\alpha - \pi$, since angles that differ by a multiple of $2\pi$ are equivalent.
For the fourth quadrant, the argument equals $2\pi - \alpha$. Again, to get the argument within the conventional range of the reference value, we take the argument to be simply $-\alpha$.
In your case, the argument would follow the second quadrant case, and that's $\pi - \frac{\pi}{3} = \frac{2\pi}{3}$
