Where does complex exponential come from? The complex exponential function is defined as : $$e^{ix} = \cos x + i\sin x$$ It shares most of its properties with real exponential and it allows a lot of trigonometric calculations such as de Moivre's formula : $$(\cos x+i\sin x)^n = \cos{nx}+i\sin{nx}$$
But where does this definition come from and why does it work ?
 A: People have given you some good algebraic answers that show that the equations work out; here's a hand-wavy justification that may make you more comfortable with the idea in general.
The derivative of $f(x)$ is how $f(x)$ changes as you change $x$ a little.
What's the derivative of $f(x) = e^{ix}$? It's $ie^{ix}$, which is $i$ times $f(x)$ itself. So the way in which $f$ changes as you wiggle $x$ by $dx$ is $i \cdot f \cdot dx$.
So what does it mean to multiply something by $i$? It means rotating it 90 degrees counterclockwise in the complex plane. (Try this yourself with some simple complex numbers if you didn't notice this already.)
So when $x=0$, and $f(x)=1$, $f'(0) = i \cdot f(0) = i \cdot 1 = i$; $f(0)$ is changing to the north when its value is to the east. The same argument works for other values of $x$; $f(x)$ will be changing at a 90 degree clockwise angle from the current value of $f(x)$.
The equation of motion that satisfies this rule (velocity is always perpendicular to the direction from the origin to the current point) is a circle. $f(x) = e^{ix}$ moves in a counterclockwise circle around the complex plane, and that's exactly what $\cos x + i \sin x$ does too.
A: Another way to look at it is to view the exponential and trigonometric functions as defined by a power series:
$$\exp(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$$
$$\sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots$$
$$\cos(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots$$
This has the advantage that the $x$ can be anything, as long as we know how to multiply two of them, add two of them together, and divide them by a real number. In particular, it makes sense for both real and complex numbers.
Now you can put $ix$ into the definitions in place of $x$, and compute:
$$\begin{align}
\exp(ix)
& = 1 + ix + \frac{(ix)^2}{2!} + \frac{(ix)^3}{3!} + \cdots \\
& = \left( 1 - \frac{x^2}{2!} + \cdots\right) + i \left( x - \frac{x^3}{3!} + \cdots\right) \\
& = \cos x + i \sin x
\end{align}$$
so the formula you quoted is seen to be a theorem rather than a definition. If we now assume that the familiar law
$$\exp(a+b) = \exp(a) \exp(b)$$
holds for arbitrary $a$ and $b$ (it does, and you can prove it from the power series definition)  then we now have a way to compute the exponential of any complex number:
$$\exp(x+iy) = \exp(x) (\cos y + i\sin y)$$
where $x$ and $y$ are real.
A: One approach is to start with $$e^z = \lim_{n\to\infty}(1+\frac{z}{n})^n$$
Now, when $z=ix$ and $n$ is large, you can show geometrically that $1+\frac{ix}{n}$ is "very close" to $\cos \frac{x}{n} + i\sin\frac{x}{n}$. You just need that "close enough" to be enough to show:
$$e^{ix} = \lim_{n\to\infty} (\cos \frac{x}{n} + i\sin\frac{x}{n})^n = \cos x + i\sin x$$
So this can ultimately be seen as a result of the fact that if $\theta$ is small, $\cos \theta \approx 1$ and $\sin \theta \approx \theta$.  In particular, the error in both cases is $O(\theta^2)$, which turns out to be all you need.
