Jun 29, 2005

part 4 - more math functions

At the end of the last post we converted how we described our complex number z from a (x,y) coordinate system to a (r,θ) coordinate system. Let's stay with this system for now. How exactly do we write z now with our definitions of r and θ?
z = a + bi in (x,y)

and

z = r (cos(θ) + i*sin(θ)) in (r,θ)
This is straightforward because the trigonometric terms are extracting the x and y components respectively and r is scaling it appropriately. This is known as the polar form of z. There's actually another way to write z. Using exponents. It looks like this
r e(iθ)
Notice I've used the same variables r and θ here. Surely I don't mean the same r and θ I used in the polar form do I? In one equation you're using cosines and sines which are wavelike and in the other you're using an exponent which is not wavelike at all. Surely these can't be the same two variables if I hope both equations to represent z. In fact I am using the same two variables. How is this possible? Well let's derive it.

First let me point out that e here is a number. About 2.7. It's an irrational number. Raising this number to a number means I multiply e that many times. But in this case I've got an 'i' up there. What on earth does it mean to raise something to the i power and how on earth did anyone come up with this?

They came up with it in a very simple way. Remember Taylor's series? That's how. Here's how you do it. First let's show what the Taylor's series looks like for our three mathematical operators for a generic x

ex = 1 + x/1! + x2/2! + x3/3! + x4/4!...

sin(x) = x - x3/3! + x5/5! - x7/7!...

cos(x) = 1 - x2/2! + x4/4! - x6/6!...

Again these are infinite series. You can see the patterns. ! here is a factorial operator. in particular, n! = 1*2*3*4*....*n. For example, 4! = 4*3*2*1 = 24. Notice something else. Sine uses only odd powers of x and cosine uses only even powers of x. Mean while ex uses both types of powers. You can probably see where this is heading.

Now think back to our polar form z = r(cosθ + isinθ). Take our Taylor's series for the sine and cosine and plug them into this equation replacing x with θ. We get the following
z = r(1 + iθ - θ2/2 - iθ3/6 + θ4/24 + iθ5/120 ...)
Now consider e(iθ). What does that expansion look like? Well replace x with iθ. We get,
e(iθ) = 1 + iθ - θ2/2 + iθ3/6 + θ4/24 + iθ5/120....
Notice the similarities? we just need to add an 'r' to our exponent to make them the same. Thus,
z = re(iθ) = r(cosθ + i sinθ)
Holy shit that is cool. I just love that part. It still makes me giddy. You can see why I get turned on by Taylor's series as well. They are just so useful in math. So clearly a number raised to something with the imaginary number 'i' in it causes it to become wavelike. It is for this VERY reason that you see imaginary numbers manifest themselves in governing equations of waves such as Maxwell's light equations or Schrodinger's quantum proxy wave equations.

So how do we visualize re(iθ)? Well let's look at the polar form of z and plug in a few values. Let's confine r to equal 1. Now let's look at θ = 0°, 90°, 180°, 270°
0° = 1 + i(0) = 1
90° = 0 + i(1) = i
180° = -1 + i(0) = -1
270° = 0 + i(-1) = -i
So what do we make of this? Well now we know that for r = 1 (and converting our degrees to radians)
e(i0) = 1
e(iπ /2) = i
e(iπ) = -1
e(3iπ/2) = -i
What's going on here? Well as we increase the degrees or radians we are swinging around the unit circle. Look at the third one. Look familiar? That's the infamous equation
e(iπ) + 1 = 0
But now you realize what is going on. We're just swinging around the unit circle. So when you look at that equation you realize the power that e is being raised to is an angle. In this case 180°. And that flips you around to -1. So now next time this equation comes up you can stump people with what the other angles equal. But in your head it's easy to calculate.