binglee said:
I know this one is stupid, but i am still confused. why e^(iy) = cosy + i siny?
As other people have stated, we start with some basic facts about the functions e^x, sin x, and cos x. Namely, we write them out as a power series:
\cos x = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n}
\sin x = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!} x^{2n+1}
e^x = \sum_{n=0}^\infty \frac{1}{n!} x^n
So just for this conversation, we're agreeing that these are true statements.
To show the relation, we simply evaluate e^{ix} and expand out the series.
e^{ix} = \sum_{n=0}^\infty \frac{1}{n!} {(ix)}^n = \sum_{n=0}^\infty \frac{1}{n!} i^n x^n
You see? All we did was substitute xi for x and did a teeny bit of algebra. But Something interesting happens with the i^n expression.
When n is divisible by 4, (so n = 0, 4, 8, 12, 16, etc), i^n = 1.
When n is one greater than a number divisible by 4 (n = 1, 5, 9, 13, 17, etc), then i^n = i.
When n is two greater than a number divisible by 4 (n = 2, 7, 10, 14, etc), then i^n = -1.
When n is three greater than a number divisible by 4 (n = 3, 8, 11, 15, etc), then i^n = -i.
The notation isn't great for this next step, but if you think about it logically, you can split the sum into four sums: a positive real part, a negative real part, a positive imaginary part, and a negative imaginary part. If you put the real parts with the other real parts, you get a sum which alternates between positive and negative terms with even powers. Play with it a bit and you'll notice this is exactly the series for cosine! Then take the imaginary terms. They too alternate signs. But they are all odd powers! This is exactly the series for sine, multiplied by i.
When we put them together, we see the result is in fact,
e^{ix} = \sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} x^{2n} + i \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!} x^{2n+1} = \cos x + i \sin x<br />
Note, lastly, that this only works when x is a real number. Otherwise, the imaginary part of x would interfere with the argument above and mess everything up! This isn't a big problem though. If z = a + bi is a complex number, and a and b are the real and imaginary parts respectively, then e^z = e^{a + bi} = e^a e^{bi} = e^a (\cos b + i \sin b). In fact, it's quite convenient because the imaginary part rotates in the complex plane and the real part scales it as an exponent.