De Moivre's theorem, which typically is stated as

#[r(cos(theta)+isin(theta))]^n=r^n(cos(ntheta)+isin(ntheta))#

does not apply to non integer values for #n#. This is because *non integer powers of complex numbers are multiple-valued*, whereas the trigonometric representation is single-valued.

For example, letting #z=i# and #n=1/2#, we have

#i = cos(pi/2)+isin(pi/2) = cos((5pi)/2)+isin((5pi)/2)#

Using Euler's formula #e^(itheta)=cos(theta)+isin(theta)#, we can see that these representations, despite both being equal to #i#, produce different results when taken to the power of #1/2#:

#(e^(ipi/2))^(1/2) = e^(ipi/4) = cos(pi/4)+isin(pi/4) = sqrt(2)/2+sqrt(2)/2i#

and

#(e^(i(5pi)/2))^(1/2) = e^(i(5pi)/4)=cos((5pi)/4)+isin((5pi)/4)=-sqrt(2)/2-sqrt(2)/2i#

Thus #(cos(pi/2)+isin(pi/2))^(1/2)# has two values, whereas #(cos(1/2*pi/2)+isin(1/2*pi/2))# has only one.

As De Moivre's theorem requires the left hand side to be single valued to match with the right hand side, #n# is restricted to integers.