Interesting identity about Trig Functions and Complex Numbers I recently discovered the beautiful identity
$$(\cos\theta+i\sin\theta)^n=\cos n\theta+i\sin n\theta$$
and I proved it using induction. However, I can't figure out if this identity also applies to non-integer values of $n$. How can I determine this, and how do I prove it? Certainly not with induction...
NOTE: If I could prove the original identity without induction, then that should do it... but I'm not sure how to do that.
Thanks!
 A: The identity almost holds for any $n\in\mathbb C$, but only under appropriate definitions and appropriate values of $\theta$.  Take $n=1/2$ and $\theta=2\pi$, for example, and you will get
$$1^{1/2}\stackrel?=-1$$
Which usually isn't taken to be true.  Of course, you could argue that $1^{1/2}=-1$ and $4^{1/2}=-2$, but then for $n=1/2$ and $\theta=0$, you will get
$$1^{1/2}\stackrel?=1$$
Surely, we have
$$(\cos(0)+i\sin(0))^{1/2}=(\cos(2\pi)+i\sin(2\pi))^{1/2}$$
Indeed, this must surely be true regardless of our definition of $x^{1/2}$, but it most certainly cannot be the case that these expressions are both positive one and negative one simultaneously:
$$\cos(0/2)+i\sin(0/2)\ne\cos(2\pi/2)+i\sin(2\pi/2)$$
If you did decide they were, then expressions such as $1^\pi$ would become extraordinarily vague and very much misleading.

So when does this hold?  Well, it depends on your definition of exponentiation at non-integer values.  For the most part, we generally define exponentiation as follows:
$$x^n=e^{x\ln(n)}$$
But $\ln(n)$ is quite vague (since $e^t=e^{t+2\pi i}$), which is why we have principal logarithm,
 using the $\operatorname{atan2}$ function:
$$\operatorname{Log}(z)=\ln|z|+i\operatorname{atan2}(\Im(z),\Re(z))$$
Under this definition, we have
$$(\cos(0)+i\sin(0))^{1/2}=\cos(0/2)+i\sin(0/2)$$
But,
$$(\cos(2\pi/2)+i\sin(2\pi/2))^{1/2}\ne\cos(2\pi/2)+i\sin(2\pi/2)$$
More generally, for any $n\in\mathbb R-\mathbb Z$, the identity holds for $\theta\in(-\pi,\pi]$ and fails everywhere else.  For $n\in\mathbb Z$, the identity holds for all $\theta$.
A: HINT
$$e^{i\theta} = \cos \theta + i \sin\theta$$
EDIT
Just to be clear, the power works for $n$ as integers, but we do need to be careful for non-integer $n$ as $\log$ function could has lots of branches for complex parameter. This post has a good explanation:  Complex power of complex number.
