# Using De Moivre's theorem with relation to the argument of a complex number

Given that $Z^4 = 64(\cos\pi+ i\sin\pi)= 64(-1+0i) = -64$

I understand that the argument [$arg(Z^4)$] is $\pi$, now if instead given the form $Z^4 =64(-1+0i)$ and I desired to find the argument [$arg(Z^4)$] I would use $\arctan(\frac{0}{-64})=0 + 2k\pi$. But this is not the same as the argument $\pi$. What did I do wrong?

If I was to solve $Z^4 = 64(\cos\pi+ i\sin\pi)$ using De Moivre's theorem by my way $Z=2\sqrt{2}(\cos\frac{2k\pi}{4}+ isin\frac{2k\pi}{4})$ for $k =0,1,2,3$

But the correct answer is $Z=2\sqrt{2}(\cos\frac{\pi+2k\pi}{4}+ isin\frac{\pi+2k\pi}{4})$ for $k =0,1,2,3$

EDIT Resolved Question: I was neglecting the signs in the different quadrants as pointed out by some other users earlier.

• It was pointed out in a similar earlier problem today that taking the $\arctan$ is not correct. We must use an angle whode cosine is $-1$ and whose sine is $0$. Commented Aug 1, 2014 at 1:50
• yes but it was also said earlier that taking arctan was ok by other viewers Commented Aug 1, 2014 at 1:55
• You need to use atan2 rather than simple atan. Commented Aug 1, 2014 at 1:56
• Well, if they meant the standard $\arctan$, they were mistaken. Perhaps you misinterpreted. I remember leaving a comment to the effect that $\arctan$ does not distinguish between the first quadrant and the third, or the second and the fourth. Commented Aug 1, 2014 at 2:10

The tangent function repeats at a period of $\pi$ rather than $2\pi$. If you try to take the arc tangent by the "simple" method, as a function of a single variable, the range of that function is only from $-\frac \pi 2$ to $\frac \pi 2$ (using the usual definition).
To put it another way, if $t = \tan \theta,$ then also $t = \tan (\theta + \pi).$ So for every case where taking the arc tangent of the ratio of real and imaginary parts of a complex number $z$ gives you that complex number's argument (modulo $2\pi$), there is another case (namely, $-z$) where the arc tangent gives you the argument plus $\pi$ (modulo $2\pi$).
As noted in the comments, there is a function of two parameters, called atan2, that you can use to correctly identify the argument of a non-zero complex number in all cases. Or you could use the arc tangent only for complex numbers whose real part is positive, and add $\pi$ to the arc tangent for complex numbers whose real part is negative.