The Wikipedia page on De Moivre's Formula says the formula doesn't hold for non-integer $n$, since non-integer powers of a complex number can have multiple values.
It then goes on to say that this does not apply to Euler's formula since:
No such problem occurs with Euler's formula since there is no identification of different values of its exponent. Euler's formula involves a complex power of a positive real number and this always has a defined value
I don't really understand what Wikipedia means. The formula's are very similar, so I would have expected them to have identical properties. Could someone maybe expand on Wikipedia's explanation? Thank you.
The problem is a bit subtle. The point it's trying to make is that the formula $(\cos x + i \sin x)^z = \cos(zx) + i \sin (zx)$ doesn't really make sense if $z$ is allowed to be a complex number. Everything else does make sense, including $e^{ixz} = \cos xz + i \sin xz$. You just can't say that's equal to $(e^{ix})^z$ because the power law $ (a^b)^c = a^{bc}$ is not valid when $a$ and $b$ are not positive real numbers.
Here's for example what could go wrong:
$$ -1 = i^2 = i^{4\frac{1}{2}} \overset{!}= (i^4)^{\frac{1}{2}} = 1^{\frac{1}{2}} = \sqrt{1}=1.$$
What happened? It's the middle step where I used the power law with the imaginary number $i$ as base. It's not true that $(i^4)^{1/2} = i^2$.
For the same reason $(\cos x + i \sin x)^z = (e^{ix})^z$ is not in general equal to $e^{izx}$, because $e^{ix}$ is (usually) not a positive real number.