## 0179: "E to the Pi times I"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

quantheory
Posts: 11
Joined: Tue Oct 24, 2006 6:16 am UTC

### 0179: "E to the Pi times I" I have never been totally satisfied by the explanations for why e to the ix gives a sinusoidal wave.

It's funny, I've seen almost this exact scenario happen once.
Last edited by quantheory on Tue Nov 07, 2006 3:00 am UTC, edited 1 time in total.

joelkelly
Posts: 2
Joined: Mon Oct 30, 2006 3:13 am UTC
i have the correct (i hope!) version of this tattooed on my wrist. you should have seen my mom's reaction:

Mom: You're getting a tattoo? Gasp!
Mom: Wait, and it's a math equation! Hah! Nerd!

rglenn
Posts: 4
Joined: Fri Nov 03, 2006 5:34 am UTC
This comic confused me. Those of us in Electrical and Computer Engineering don't use i (that means current!).

For us, j = sqrt(-1).

And 22/7 is close enough to get the job done spatulated
Posts: 12
Joined: Wed Aug 30, 2006 4:31 pm UTC
Contact:
you know whats fun i^(-i) is a real number too! its like 1.3 something.
Huzza

iabervon
Posts: 61
Joined: Fri Nov 03, 2006 5:25 am UTC

The thing you always have to consider when extending previously-developed concepts to complex numbers is what definition of the existing concept you're using, because you can't just assume that all of the definitions will give the same extension. (In fact, you get all sorts of weird stuff like different branch cuts if you're not careful. But e^z turns out to be well-behaved.)

One good definition of e^x is that de^x/dx=e^x and e^0=1. That is, it's the function whose derivative is itself and whose value at 0 is 1. From the chain rule, we can see that de^ix/dx=ie^ix. That is, e^ix is the function such whose derivative is i times the function, and e^i0=e^0=1. For any complex value, iz is that value rotated 90 degrees around the origin. So what we've got so far is that e^ix starts at 1, and its derivative at any point is at right angles to the line from the origin, and the magnitude of its derivative is equal to its distance from the origin.

The bit about the derivates is exactly the right thing to make a circle (look up the velocity of something in orbit). This means that it will keep the same magnitude all the time, so it's the unit circle. And it's velocity is 1, which means that it'll go all the way around when x is the circumference of the circle, which is 2 pi. So at pi, it's gone halfway around, and e^i pi = -1.

NMcCoy
Posts: 390
Joined: Sun Jul 23, 2006 4:25 pm UTC
Location: Portland, OR
Regarding the sine wave thing: Are you familiar with Taylor series? The Taylor expansion of sin(x) is the odd terms of the Taylor expansion of e^x with alternating signs reversed, and the Taylor expansion of cos(x) is the even terms with alternating signs. Thus e^(x*i) = sin(x) + cos(x); in the case of pi, -1.

yy2bggggs
Posts: 1261
Joined: Tue Oct 17, 2006 6:42 am UTC
rglenn wrote:This comic confused me. Those of us in Electrical and Computer Engineering don't use i (that means current!).

For us, j = sqrt(-1)

i, j, k, -i, -j, -k... what's the difference?

iabervon
Posts: 61
Joined: Fri Nov 03, 2006 5:25 am UTC
In order to trust the Taylor series explanation, you have to establish that those series converge for complex values, which requires establishing that having the real and imaginary parts both converge is sufficient, which is true, but is awkwardly similar to some false statements about the safety of rearranging terms of series before demonstrating that they converge.

Drostie
Posts: 262
Joined: Fri Nov 03, 2006 6:17 am UTC
I'm assuming that it will get edited to -1 to be properly done, soon.

I remember one of my E&M classes at Cornell was taught out of an electrical engineering book by Staelin et al. ... the back cover was typo-ridden and the guy used j instead of i. He had the nasty habit of writing {%omega t - k x } instead of {k x - %omega t}.

Our prof's response to this, knowing that the sign of the imaginary number is a convention, was to say that "j = -i". DAMN that confused a lot of kids for no good reason.

I don't think it needs an explanation. Anyone who understands the calculus needed to get this result has probably already seen a proof of it. Nonetheless, here's my favorite such proof:

The exponential function f(x) = e^{kx} is something which satisfies the equation f'' = k^2 f, with boundary conditions of f(0) = 1 and f'(0) = k.

The sinusoids (sin and cos) satisfy the equation f'' = - f, and there are two of them, so any other function fitting that equation can be written as A cos(x) + B sin(x) for some A and B. Letting k = i, it's easy to see that e^{i x} = A cos(x) + B sin(x) for some A and B. Solving for A gives 1, solving for B gives i, and evaluating cos(x) + i sin(x) at %pi gives -1.

This explanation kicks the crap out of the Taylor expansion arguments.

ERTW
Posts: 37
Joined: Wed Sep 20, 2006 4:44 am UTC
NMcCoy wrote:Regarding the sine wave thing: Are you familiar with Taylor series? The Taylor expansion of sin(x) is the odd terms of the Taylor expansion of e^x with alternating signs reversed, and the Taylor expansion of cos(x) is the even terms with alternating signs. Thus e^(x*i) = sin(x) + cos(x); in the case of pi, -1.

Just a quick correction here: e^(i*x)=isin(x)+cos(x). This is also the flaw in the alt text since it's only Im(e^(i*x))=sin(x).

Drostie wrote:the guy used j instead of i. He had the nasty habit of writing {%omega t - k x } instead of {k x - %omega t}.

Using j instead of i is fairly standard practice for EE's because (particularly in circuit analysis) i stands for current. Also e^i(wt-kx) and e^i(kx-wt) both represent forward travelling waves.

edit: Should have known Wikipedia would have a good description of the Taylor series proof (as well as a few others).

grim4593
Posts: 116
Joined: Tue Aug 22, 2006 1:23 am UTC
DAMN YOU! Oye, we are in the middle of learning complex numbers in my Advanced Engineering Math class. We have covered all the complex functions and derivatives and on Monday are going to start integrals of complex numbers. Heh, I bet the test on that is going to be a real fun one... /me looks at notes... Lets see here:
e^(z) =/= 0
e^(2*pi*i) = 1
e^(pi*i) = -1
e^(1/2*pi*i) = i

We just looked at branch cuts and stuff too. What a fun class. You think you know alot of math and then they redefine the term "number" and come up with a whole new system. I am going to school to be an electrical engineer. So far the only class that used "j" was my circuits 1 (and probably 2) class. Calc 1-3, Differential Equations, Advanced Engineering Math, Physics, etc all use "i". To me it is rather pointless to redefine an existing value as something else. Physics gets along fine and they use "v" for voltage, volume, velocity, etc. Also when I see an "i" and a "j" in an equation I start thinking vectors...
Last edited by grim4593 on Fri Nov 03, 2006 7:12 am UTC, edited 1 time in total.

DigitalMeatball
Posts: 11
Joined: Tue Oct 24, 2006 9:12 pm UTC
Drostie wrote:I remember one of my E&M classes at Cornell was taught out of an electrical engineering book by Staelin et al. ... the back cover was typo-ridden and the guy used j instead of i. He had the nasty habit of writing {%omega t - k x } instead of {k x - %omega t}.

([omega]*t - kx) isn't wrong. It just implies that your wave is propagating in the negative x direction, as opposed to (kx - [omega]*t), which propagates in the positive x direction. Inconsistency is another issue.

Drostie
Posts: 262
Joined: Fri Nov 03, 2006 6:17 am UTC
DigitalMeatball wrote:([omega]*t - kx) isn't wrong. It just implies that your wave is propagating in the negative x direction, as opposed to (kx - [omega]*t), which propagates in the positive x direction. Inconsistency is another issue.

That's incorrect. That wave is propagating in the positive x direction either way you look at it.

It's {kx + [omega]t} that propagates in the negative x direction.

I wasn't implying that e^{ i ([omega] t - k x) } was wrong; perish the thought. It's completely right, because e^(-ix) = cos(x) + (-i) sin(x), so it doesn't matter whether you use i = + sqrt(-1) or i = - sqrt(-1); the plus or minus sign in the original definition is a matter of arbitrary convention. (And it should be that way. That makes the universe an ok place to live in, by my books.)

However, the fact that Staelin specifically says, in an appendix, j = sqrt(-1), with the teacher saying that j = -i and i = sqrt(-1), confused the living crap out of the kids in that class.

Basically, the prof was fully aware that Staelin was writing his argument backwards, and that it didn't matter; and she was just trying to save headaches from students thinking. But because it's Cornell, the students went on thinking anyways and got even bigger headaches from the proposed remedy.

Charon
Posts: 5
Joined: Tue Oct 17, 2006 4:54 am UTC
yy2bggggs wrote:i, j, k, -i, -j, -k... what's the difference?

Pretty important if you're talking about the quaternions EM-002.rv-L "Tem Cu
Posts: 35
Joined: Thu Sep 21, 2006 4:30 am UTC
Location: Seattle
I read this and I thank the FSM that I'm an English major...
When you have at your disposal a hammer made of three spacefaring battleships, do you still need to pay taxes?

paige42
Posts: 44
Joined: Wed Jul 05, 2006 5:50 am UTC
Location: Michigan
grim4593 wrote:Oye, we are in the middle of learning complex numbers in my Advanced Engineering Math class. We have covered all the complex functions and derivatives and on Monday are going to start integrals of complex numbers.

Wow! We are in the middle of learning complex analysis in my Mathematical Methods of Theoretical Physics class. We covered complex derivatives on Wednesday and used permanence of form to derive Euler's formula, and in *checks clock* a little over nine hours we are going to do integrals of complex numbers.

aldimond
Otter-duck
Posts: 2665
Joined: Fri Nov 03, 2006 8:52 am UTC
Location: Uptown, Chicago
Contact:
spatulated wrote:you know whats fun i^(-i) is a real number too! its like 1.3 something.

I'm getting i^(-i) = e^(-i^2*pi/2) = e^(pi/2). Which is about 4.8.

i^i, of course, would be the reciprocal of that, so a bit more than a fifth. A bit more than a fifth, 'eh? Well, I don't make too much sense when I've had that much to drink either.

xkcd
Site Ninja
Posts: 365
Joined: Sat Apr 08, 2006 8:03 am UTC
Contact:
Oh God. I woke up to glance at things and I have dozens and DOZENS of emails, of course, because that's a -1, not +1. I did think about it a little bit, and made the mistake for a pretty simple and straightforward reason, but that's of course no excuse or anything. Sigh. Fixed.

Now back to sleep, maybe.

Of course, this gives me the wonderful opportunity to reply to every email with "Sorry, I'm not really that into Pokemon."

Gelsamel
Lame and emo
Posts: 8237
Joined: Thu Oct 05, 2006 10:49 am UTC
Location: Melbourne, Victoria, Australia
*pats xkcd*

I knew e^(pi)i = -1 but I don't full understand the math (only in highschool here D:). Is it just because ax^b*Sqrt(-1) have the ability to produce negatives?

macronencer
Posts: 80
Joined: Fri Nov 03, 2006 9:57 am UTC
This was written on a sign on the noticeboard when I was at uni (Southampton, UK, maths, 1983, yes I'm old).

It said:

"Maths lecturers are number -e^(i pi)"

Someone had written on it in pencil:

"pi i-ed" I think those are crocodile tears: you must be in de Nile.

ohki
Posts: 187
Joined: Wed Aug 23, 2006 9:27 am UTC
Location: San Luis Obispo, California
Contact:
This is the only thing about calculus III that made me go "ooooh, haha cool." Well, that and figuring out how computers CAN calculate pi to the billionth digit.

moopanda
Posts: 339
Joined: Tue Aug 22, 2006 12:35 am UTC
Location: Brisbane, Australia
Contact:
Dammit. I read this and thought "Ooh I'm a maths major I can contribute something meaningful here." but NOOO the topic seems just about covered. Then someone mentioned i, j and k and I thought hah I can be a smart arse about quaternions....but NOOOOO. So instead I'll just whinge about me being too slow ... I'm too slow.

Gelsamel
Lame and emo
Posts: 8237
Joined: Thu Oct 05, 2006 10:49 am UTC
Location: Melbourne, Victoria, Australia
moopanda wrote:Dammit. I read this and thought "Ooh I'm a maths major I can contribute something meaningful here." but NOOO the topic seems just about covered. Then someone mentioned i, j and k and I thought hah I can be a smart arse about quaternions....but NOOOOO. So instead I'll just whinge about me being too slow ... I'm too slow.

/pat

You can explain to me how you get negative numbers through powers using i.

moopanda
Posts: 339
Joined: Tue Aug 22, 2006 12:35 am UTC
Location: Brisbane, Australia
Contact:
Gelsamel wrote:/pat

You can explain to me how you get negative numbers through powers using i.

Cheers.

The quick and nasty version just relates back to e^(i*x) = cos x + i*sin x.

Consider the natural log of a negative number (crazy I know). In the Argand plane, a negative number -r in polar co-ordinates is (r, pi). So we can write the number as r*e(i*pi), or e^(ln r)*e^(i*pi), or e^(ln r + i*pi). So the natural log (principle value) of a negative number is (ln r + i*pi).

SO, where I'm kinda shooting with this is that the real part of the exponent gives the magnitude, and the imaginary part gives the angle.

x^(a + b*i) = e^(ln x * a + i * b*ln x) = x^a * (cos(b*ln x) + i*sin(b*ln x)) ... Let's assume that x, a and b are all non-negative real. If we make sure that b*ln x is pi (plus or minus any multiple of 2*pi), we're in business for getting negative numbers through complex powers.
(EDIT: I logified the wrong thing. And logified is totally a word.)

Of course we can get negative number through real powers as well (-1)^3 = -1

Gelsamel
Lame and emo
Posts: 8237
Joined: Thu Oct 05, 2006 10:49 am UTC
Location: Melbourne, Victoria, Australia
moopanda wrote:Of course we can get negative number through real powers as well (-1)^3 = -1

Well obviously I meant a negative number from a power of a positive constant. I haven't learnt e^(i*x) = cos x + i*sin x, but everything would make sense to me if I knew how that came about. So basically how the hell does e^(i*x) = cos x + i sinx? Doesn't that mean e^(i*x) = cis x?

Also would 5^a*i give me a negative number, ever? Or is it just because e is so special that it relates to cis in such a way it can produce effective negatives or something?

moopanda
Posts: 339
Joined: Tue Aug 22, 2006 12:35 am UTC
Location: Brisbane, Australia
Contact:
Gelsamel wrote:Doesn't that mean e^(i*x) = cis x?

Right you are.
Gelsamel wrote:Also would 5^a*i give me a negative number, ever?

Yup, if a*ln 5 = pi + 2*k*pi (k an integer), then 5^a*i will equal -1.

For the exponent, the real part (in this case 0) affects the magnitude, and the imaginary part (in this case a) is a rotation in the complex plane. Everything is related back to e because of the way complex functions are defined. Indeed, z^w is defined as e^(w* ln z), z and w both complex. But then we need the definition of the ln of a complex number! Which necessitates the need for the definition of the exponentiation of a complex number, which brings us to...
Gelsamel wrote:So basically how the hell does e^(i*x) = cos x + i sinx?

The reason for this is that it works. Suppose you're the first person to ever want to perform e^z. How do we do it? We want the power laws to hold so...
e^z = e^(x+i*y) = e^x * e^(i*y)
e^x is easy. We already know a lot about that. But what to do with e^(i*y)? Basically the best answer I can give is that e^(i*y) = cis(y) because... it keeps the appropriate properties of e^z. As has been previously mentioned, defining e^z as e^x*cis(y) is analytic everywhere (behaves nicely).

Complex functions, like most of mathematics, don't exist per se, they are defined in a consistent manner. Even concepts as simple as the number 2 are abstract. Nothing has an intrinsic "twoness" about it. You could show me two of something, or a symbol for two, but you can't show me... "two". (Ok that made a lot more sense in my head than it does on screen)

A fun exercise is to delve into the relationship between complex numbers, trig functions, and hyperbolic trig functions.

moopanda
Posts: 339
Joined: Tue Aug 22, 2006 12:35 am UTC
Location: Brisbane, Australia
Contact:
There's a nice proof on wiki which involves taking the derivative of (cos x + i*sin x) / e^(i*x) ... but this presupposes a definition of a complex exponential and a complex derivative. In which case you might as well use the Taylor Series proof (which satisfies me).

Gelsamel
Lame and emo
Posts: 8237
Joined: Thu Oct 05, 2006 10:49 am UTC
Location: Melbourne, Victoria, Australia
Thank you, I get it now! spatulated
Posts: 12
Joined: Wed Aug 30, 2006 4:31 pm UTC
Contact:
aldimond wrote:
spatulated wrote:you know whats fun i^(-i) is a real number too! its like 1.3 something.

I'm getting i^(-i) = e^(-i^2*pi/2) = e^(pi/2). Which is about 4.8.

i^i, of course, would be the reciprocal of that, so a bit more than a fifth. A bit more than a fifth, 'eh? Well, I don't make too much sense when I've had that much to drink either.

looks right. I was trying to pull that from memory from a class i took a year ago. good call.
Huzza

justinhj
Posts: 14
Joined: Wed Aug 23, 2006 7:50 pm UTC
Isn't the actual answer a complex number (-1, 0)

or is that assumed equivalent?

moopanda
Posts: 339
Joined: Tue Aug 22, 2006 12:35 am UTC
Location: Brisbane, Australia
Contact:
A complex number that has no imaginary part (i.e. Im(z) = 0) is real.

Sort of like a real number that is a multiple of 1 is an integer... but still a real number (and by extension, a complex number).

justinhj
Posts: 14
Joined: Wed Aug 23, 2006 7:50 pm UTC
That makes sense, thanks.

Drostie
Posts: 262
Joined: Fri Nov 03, 2006 6:17 am UTC
moopanda wrote:Sort of like a real number that is a multiple of 1 is an integer... but still a real number (and by extension, a complex number).

Since what you really mean is "a real number that is an integral multiple of 1 is an integer", that's the most wonderfully circular definition I've seen all day. Well, thanks for teh lulz. Now time for class.

yy2bggggs
Posts: 1261
Joined: Tue Oct 17, 2006 6:42 am UTC
Charon wrote:
yy2bggggs wrote:i, j, k, -i, -j, -k... what's the difference?

Pretty important if you're talking about the quaternions Any number whose square is -1 makes just as good an i as any other.

SpitValve
Not a mod.
Posts: 5130
Joined: Tue Sep 26, 2006 9:51 am UTC
Location: Lower pork village
yy2bggggs wrote:
Charon wrote:
yy2bggggs wrote:i, j, k, -i, -j, -k... what's the difference?

Pretty important if you're talking about the quaternions Any number whose square is -1 makes just as good an i as any other.

Except when [i,j,k,l] are all different roots of -1... and ij=k, jk=l, li=j. And that's everything I know about quaternions.

ooh and you use them to rotate things.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
SpitValve wrote:Except when [i,j,k,l] are all different roots of -1... and ij=k, jk=l, li=j. And that's everything I know about quaternions.

ooh and you use them to rotate things.

And they can be used to make pretty fractals

william
Not a Raptor. Honest.
Posts: 2418
Joined: Sat Oct 14, 2006 5:02 pm UTC
Location: Chapel Hill, NC
Contact:
SpitValve wrote:
yy2bggggs wrote:
Charon wrote:
yy2bggggs wrote:i, j, k, -i, -j, -k... what's the difference?

Pretty important if you're talking about the quaternions Any number whose square is -1 makes just as good an i as any other.

Except when [i,j,k,l] are all different roots of -1... and ij=k, jk=l, li=j. And that's everything I know about quaternions.

ooh and you use them to rotate things.

There's only i, j, and k. Where'd you get l from? (There's 7 of them in the octoctonions which are even weirder, but we're talking quaternions here)

I'm amazed that nobody's mentioned noncommutativity of the quaternions here. x*y may or may not equal y*x.

yy2bggggs
Posts: 1261
Joined: Tue Oct 17, 2006 6:42 am UTC
Any triplet of vectors i, j, k such that i^2=j^2=k^2=ijk=-1 make just as good quaternions as any other triplet. Erase the coordinates of your quaternion vectors, and let someone else label them, and you'll likely get different labels even with the same math (and specifically, i can be chosen to be your original j, k, -i, -j, and -k).

Isn't symmetry fun?
I'm amazed that nobody's mentioned noncommutativity of the quaternions here.

I'm not really that into pokemon.

no-genius
Seemed like a good idea at the time
Posts: 4221
Joined: Wed May 17, 2006 6:32 pm UTC
Location: UK
Contact:
we had to do i^i in Oscillations and Waves last year. Think it was e^ipi/2

Edit: no, it was e^pi/2. I just wasted a post
I don't sing, I just shout. All. On. One. Note.
Official ironmen you are free, champions officially

The Mighty Thesaurus wrote:Why? It does nothing to address dance music's core problem: the fact that it sucks.

clg
Posts: 1
Joined: Sat Nov 04, 2006 1:20 am UTC
no-genius wrote:we had to do i^i in Oscillations and Waves last year. Think it was e^ipi/2

Edit: no, it was e^pi/2. I just wasted a post

Actually, it's e^{-pi/2}.

Even that isn't quite right, however. The only way to define a^b, when a is an arbitrary nonzero complex number, is as e^{b ln a}, and there is no unambiguous definition for ln on the punctured complex plane. (If a is real and positive, generally ln a is taken to be real, but that doesn't canonically extend.) You have to make a choice, which can vary by an integer multiple of 2pi i. In general, this gives you a range of possible values. In this case, ln i = (pi/2 -2pi k)i (where k is an arbitrary integer), so i^i could be taken to be any value of the form e^{-pi/2 + 2pi k}.

Great comic, by the way; it is now posted on my office door. (I'm currently TAing a class on ODEs, so the students have to deal with functions like this.)